Training method and device of psychological counseling model, electronic equipment and storage medium

By using multimodal data processing and cross-modal feature mapping, combined with expert validation and resource optimization, the problem of insufficient semantic consistency of multi-source data in psychological counseling models was solved, enabling the generation of personalized and safe counseling solutions and improving the training efficiency and counseling effectiveness of the model.

CN120781052BActive Publication Date: 2026-04-21SHAANXI RUISHAN INFORMATION CONSULTING CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHAANXI RUISHAN INFORMATION CONSULTING CO LTD
Filing Date
2025-06-27
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, psychological counseling models lack semantic consistency between voice, micro-expression, and text features when integrating multi-source data, resulting in counseling solutions that deviate from the actual psychological state.

Method used

By acquiring and preprocessing multimodal data, mapping cross-modal feature spaces, generating dynamic psychological guidance strategies, generating expert-verified consultation plans, incremental multi-scenario continuous training, and optimizing adaptive resource allocation, we achieve unified semantic embedding of speech, micro-expression, and text features and generation of personalized consultation plans.

Benefits of technology

This improved the accuracy and relevance of the consultation plan, ensuring its alignment with the actual psychological state. Furthermore, clinical expert validation and resource optimization enhanced the efficiency and safety of model training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120781052B_ABST
    Figure CN120781052B_ABST
Patent Text Reader

Abstract

This invention proposes a training method, device, electronic device, and storage medium for a psychological counseling model, comprising the following steps: Step 1, Multimodal Data Acquisition and Preprocessing: Acquiring speech, micro-expression, and text interaction data of clients, and generating a multimodal aligned raw dataset through noise suppression and timestamp synchronization techniques; Step 2, Cross-Modal Feature Space Mapping: Based on cross-modal contrastive learning, mapping the speech, micro-expression, and text features of unstructured data to a unified semantic embedding space. This invention maps speech, micro-expression, and text features to a unified semantic embedding space through cross-modal contrastive learning, and uses a cosine similarity threshold to constrain alignment errors, solving the problem of insufficient semantic consistency in multimodal data. Simultaneously, based on the real-time multimodal characteristics of clients, a dynamic weight adjustment mechanism is used to select appropriate psychological school guidance strategies, generating phased counseling goals and achieving personalized counseling guidance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and specifically to training methods, devices, electronic devices, and storage media for psychological counseling models. Background Technology

[0002] In recent years, large model technology has developed rapidly, and its performance in dialogue systems has far exceeded people's expectations. These dialogue systems can not only realize simple dialogue communication, but also assist in knowledge retrieval and document summarization, enhancing the role of dialogue systems in real life. However, psychological counseling scenarios are different from traditional dialogue scenarios, and they place more stringent requirements on counselors. Psychological counselors not only need to have rich psychological knowledge, but also need to master superb communication skills. With the continuous advancement of large model technology, its application in the field of psychological counseling has gradually expanded, providing new technical means and solutions for psychological counseling.

[0003] A search revealed that Chinese patent CN119742030A discloses a training method, apparatus, electronic device, and storage medium for a psychological counseling model, comprising the following steps: For each target psychological scenario category, obtaining sample psychological counseling information for multiple sample clients corresponding to that target psychological scenario category; for each sample client, determining the age of the sample client and the sample psychological guidance strategy corresponding to the target psychological scenario category; inputting the sample psychological counseling information and the sample psychological guidance strategy into a large language model to obtain sample counseling plans for different counseling stages output by the large language model; and training an initial psychological counseling model based on the sample counseling plans of each sample client to obtain the psychological counseling model. This solution primarily generates sample counseling plans for different counseling stages, thereby enabling the trained psychological counseling model to generate counseling plans for different counseling stages, thus improving the stylistic diversity of psychological counseling dialogues. However, the above solution still has shortcomings in practical use.

[0004] Although diverse counseling solutions can be generated through large language models, the semantic consistency between unstructured data of clients, such as voice, micro-expressions and text features, may be insufficient. When integrating multi-source data, the model may generate counseling solutions that deviate from the actual psychological state due to the mismatch between the embedding spaces of text features and behavioral features. Summary of the Invention

[0005] This invention provides a training method, apparatus, electronic device, and storage medium for a psychological counseling model, which solves the problem in related technologies that the semantic consistency of unstructured data of clients, such as voice, micro-expressions, and text features may be insufficient, and that when the model integrates multi-source data, the generated counseling plan may deviate from the actual psychological state due to the mismatch between the embedding space of text features and behavioral features.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a training method for a psychological counseling model, comprising the following steps:

[0007] Step 1: Multimodal Data Acquisition and Preprocessing: Collect voice, micro-expression, and text interaction data from visitors, and generate a multimodal aligned raw dataset through noise suppression and timestamp synchronization techniques;

[0008] Step 2, Cross-modal feature space mapping: Based on cross-modal contrastive learning, speech, micro-expression and text features of unstructured data are mapped to a unified semantic embedding space, and the cosine similarity threshold between modalities is calculated to constrain alignment error;

[0009] Step 3: Generation of dynamic psychological guidance strategies: Based on the real-time multimodal characteristics of the client, a suitable psychological school of thought is selected through a dynamic weight adjustment mechanism to generate phased counseling goals;

[0010] Step 4: Generation of expert-verified consultation plans: After inputting multimodal alignment features and dynamic strategies into the large language model to generate consultation plans, semantic matching verification is performed through a clinical expert knowledge base.

[0011] Step 5, Incremental Multi-Scenario Continuous Training: Using the elastic parameter isolation technique, the model sub-networks are divided according to the psychological scenario category. New data only updates the parameters of the corresponding sub-networks to avoid catastrophic forgetting.

[0012] Step 6: Adaptive Resource Allocation Optimization: Based on the characteristics of the visitor group, dynamically allocate GPU computing resources and prioritize high-frequency modes through a lightweight edge computing module.

[0013] Preferably, the multimodal data acquisition and preprocessing in step one specifically includes:

[0014] Multi-source sensor data acquisition: Voice signals are acquired through a microphone array, and the micro-expression movement trajectory of key facial points is captured using a 3D structured light camera, while the semantic context of text interaction is recorded simultaneously.

[0015] Heterogeneous data noise suppression: Spectral subtraction is used to eliminate environmental noise in speech data, and optical flow is used to extract muscle motion vectors and filter out non-psychologically relevant physiological tremors in micro-expression data;

[0016] Cross-modal time axis alignment: Aligning the timestamps of speech emotion peaks, micro-expression bursts and text keywords based on dynamic time warping algorithm.

[0017] Preferably, the cross-modal feature space mapping in step two specifically includes:

[0018] Modal feature encoding: MFCC+Log-Mel spectrogram features are extracted from speech data, dynamic texture features are extracted from micro-expression data using ResNet-18, and 768-dimensional semantic embedding vectors are generated from text data using BERT.

[0019] Contrastive learning framework construction: Using text embedding as the anchor point, text-to-speech and text-to-micro-expression models are constructed. Other visitor data is randomly sampled to generate negative sample pairs. Cross-modal similarity is optimized through the triplet loss function.

[0020] Alignment error dynamic constraint: Calculate the cosine similarity distribution between each modality pair, set an adaptive threshold δ = μ - 2σ, where μ is the mean and σ is the standard deviation, and reject feature matching pairs with similarity lower than δ from entering the downstream task.

[0021] Preferably, the generation of dynamic psychological guidance strategies in step three specifically includes:

[0022] Real-time psychological state modeling: Analyze multimodal feature sequences using an LSTM network and output the current psychological state vector;

[0023] School of thought weight competition mechanism: Based on the psychological state vector and the fit of each school of thought, the strategy weight is dynamically allocated and the Top-K candidate guidance strategies are generated;

[0024] Phased goal optimization: By combining the consultation phase number, the nth session, and the DSM-5 standard, a progressive goal sequence is generated.

[0025] Preferably, the generation of the expert-verified consultation plan in step four specifically includes:

[0026] Multimodal cueing engineering: converting aligned feature vectors into structured cue templates;

[0027] The structured prompt template includes: the visitor's voice tremor level, micro-expression fear index, and keywords in the self-report text;

[0028] Clinical rules are double-checked: the expert knowledge base pre-sets DSM-5 diagnostic rules and contraindication checklists, and the rule engine matches and generates high-risk instructions in the treatment plan;

[0029] Manual review trigger mechanism: When a risky keyword or rule conflict is detected, the model output is automatically frozen and an early warning signal is sent to the supervisor's terminal.

[0030] Preferably, the incremental multi-scenario continuous training in step five specifically includes:

[0031] Psychological scene topology partitioning: Define psychological scene subspaces according to DSM-5 classification, and assign an independent sparse subnetwork to each subspace;

[0032] Gradient update gating design: When new training data is added, only the gradients of the parameters of the corresponding sub-network are allowed to pass through, while the gradients of other sub-networks are set to zero. Parameter isolation is achieved through a mask matrix.

[0033] Catastrophic forgetting monitoring: Periodically test historical scenario task performance on the validation set. If the accuracy drops by more than 5%, activate the global parameter fine-tuning mode to restore the base model's capabilities.

[0034] Preferably, the adaptive resource allocation optimization in step six specifically includes:

[0035] Group characteristic profile construction: Based on visitor metadata, age, gender, and SCL-90 scale scores are clustered to create resource demand profiles, with 80% of resources allocated to micro-expression analysis for the adolescent group;

[0036] Lightweight edge computing model: TensorRT is used to perform INT8 quantization on the micro-expression recognition model, reducing its inference latency from 120ms to 35ms, and the high-frequency call model is fixed to the GPU memory resident area;

[0037] Dynamic resource preemption scheduling: GPU computing flow is divided through CUDA-MPS service, reserving 50% of computing units for crisis intervention sessions and interrupting low-priority batch processing tasks.

[0038] The training device for the psychological counseling model, employing the aforementioned training method for the psychological counseling model, includes:

[0039] Multimodal acquisition module: connects to microphone, camera, and text input interface, and outputs synchronized data to feature alignment module;

[0040] Feature alignment module: Receives data from the multimodal acquisition module, generates a unified embedding vector through cross-modal comparative learning, and outputs it to the policy generation module;

[0041] Strategy generation module: Based on embedded vectors, it dynamically allocates psychological school weights, generates staged strategies, and transmits them to the solution generation module;

[0042] Solution generation module: calls LLM to generate consultation solutions, and connects to the expert verification module for semantic correction;

[0043] Incremental training module: Divides the model into sub-networks according to scene categories, updates only the corresponding sub-networks after receiving new data, and outputs the data to the resource allocation module;

[0044] Resource allocation module: Dynamically allocates GPU memory and computing cores based on the characteristics of the visitor group, and feeds back the resource status to the multimodal acquisition module and incremental training module.

[0045] An electronic device includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the training method of the aforementioned psychological counseling model.

[0046] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the training method for the aforementioned psychological counseling model.

[0047] The beneficial effects of this invention are as follows:

[0048] 1. By cross-modal contrastive learning, speech, micro-expression and text features are mapped to a unified semantic embedding space, and the cosine similarity threshold between modalities is calculated to constrain the alignment error. This effectively solves the problem of insufficient semantic consistency of unstructured data of visitors, enabling the model to integrate multi-source data more accurately and generate consultation solutions that are more in line with the actual psychological state.

[0049] 2. Based on the real-time multimodal characteristics of visitors, a dynamic weight adjustment mechanism is used to select appropriate psychological school guidance strategies and generate phased counseling goals. This enables personalized counseling guidance to be provided for different visitors' specific situations, thereby improving the pertinence and effectiveness of counseling.

[0050] 3. After inputting multimodal alignment features and dynamic strategies into a large language model to generate a consultation plan, semantic matching verification is performed using a clinical expert knowledge base. At the same time, a dual verification mechanism based on clinical rules and a manual review trigger mechanism are set up to promptly identify and correct potential risks, ensuring the professionalism and safety of the consultation plan.

[0051] 4. Incremental multi-scenario continuous training and adaptive resource allocation optimization techniques are adopted. The model sub-network is divided according to the psychological scenario category. New data only updates the parameters of the corresponding sub-network to avoid catastrophic forgetting. GPU computing resources are dynamically allocated based on the characteristics of the visitor group, and high-frequency modalities are processed first, which improves the model training efficiency, makes reasonable use of computing resources, and reduces costs. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 This is a flowchart illustrating the training method for the psychological counseling model proposed in this invention.

[0054] Figure 2 This is a schematic diagram of the training device for the psychological counseling model proposed in this invention. Detailed Implementation

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

[0056] according to Figure 1 and Figure 2 As shown, the training method for the psychological counseling model includes the following steps:

[0057] Step 1: Multimodal Data Acquisition and Preprocessing: Collect voice, micro-expression, and text interaction data from visitors, and generate a multimodal aligned raw dataset through noise suppression and timestamp synchronization techniques;

[0058] In practical applications, such as in a psychological counseling room, microphone arrays are deployed to collect the voice signals of visitors. These voice signals contain information such as the content, tone, and intonation of the visitors' speech. Simultaneously, 3D structured light cameras are installed to accurately capture the micro-expression movement trajectories of key facial points. Micro-expressions can reflect the instantaneous emotional changes of visitors, which is crucial for understanding their psychological state. During text interactions between visitors and counselors, semantic context, such as chat logs and questionnaire entries, is recorded synchronously. After collecting this multi-source heterogeneous data, spectral subtraction is used to process the voice data, removing environmental noise and ensuring that the voice content is clearly identifiable. For micro-expression data, optical flow is used to extract muscle movement vectors, filtering out non-psychologically related physiological tremors caused by physical fatigue or physiological reactions, making the micro-expression data more accurately reflect psychological states. Finally, based on the dynamic time warping algorithm, cross-modal time axis alignment is achieved using voice emotion peaks, micro-expression burst points, and text keywords as time markers, generating a multimodal aligned raw dataset to provide high-quality data for subsequent model training.

[0059] Step 2, Cross-modal feature space mapping: Based on cross-modal contrastive learning, speech, micro-expression and text features of unstructured data are mapped to a unified semantic embedding space, and the cosine similarity threshold between modalities is calculated to constrain alignment error;

[0060] For speech data, MFCC and Log-Mel spectrogram features are extracted. These features can effectively characterize the acoustic properties and frequency distribution of speech. For micro-expression data, dynamic texture features are extracted using the ResNet-18 neural network. This network performs well in image feature extraction and can uncover subtle changes in micro-expressions. For text data, a 768-dimensional semantic embedding vector is generated using the BERT model to represent the semantic information of the text. Using the text embedding vector as anchor, a text-speech and text-micro-expression contrastive learning framework is constructed. Negative sample pairs are randomly sampled from other visitor data. The triplet loss function is used to optimize cross-modal similarity, making features of different modalities more similar in a unified semantic space. The cosine similarity distribution between each modal pair is calculated, and an adaptive threshold δ = μ - 2σ (μ is the mean and σ is the standard deviation) is set to exclude feature matching pairs with similarity lower than δ from downstream tasks, ensuring the quality of feature matching in subsequent tasks.

[0061] Step 3: Generation of dynamic psychological guidance strategies: Based on the real-time multimodal characteristics of the client, a suitable psychological school of thought is selected through a dynamic weight adjustment mechanism to generate phased counseling goals;

[0062] By using LSTM (Long Short-Term Memory Network) to analyze multimodal feature sequences, LSTM can effectively process time series data, learn long-term dependencies in feature sequences, and output the current psychological state vector. Based on the fit between the psychological state vector and different psychological schools of thought (such as psychoanalysis and cognitive behavioral therapy), strategy weights are dynamically allocated to generate Top-K candidate guidance strategies. Combining the consultation stage number (such as the first consultation and subsequent follow-up consultation), the specific situation of the nth session, and the DSM-5 (Diagnostic and Statistical Manual of Mental Disorders, Fifth Edition) standard, a progressive goal sequence is formulated. For example, in the first consultation, the goal may be to initially understand the client's problems, and then gradually delve deeper to solve the core psychological problems.

[0063] Step 4: Generation of expert-verified consultation plans: After inputting multimodal alignment features and dynamic strategies into the large language model to generate consultation plans, semantic matching verification is performed through a clinical expert knowledge base.

[0064] The aligned multimodal feature vectors are converted into structured prompt templates, such as specifying the client's voice tremor level (reflecting the degree of tension), micro-expression fear index (measuring the intensity of fear), and keywords in the self-reported text (extracting key questions). The expert knowledge base is pre-set with DSM-5 diagnostic rules and contraindication checklists. The rule engine is used to match and generate high-risk instructions in the plan, such as erroneous guidance instructions that may aggravate the client's condition. When risky keywords (such as words involving suicidal tendencies, extreme violence, etc.) or rule conflicts are detected, the model output is automatically frozen and an early warning signal is sent to the supervisor's terminal for manual review by the supervisor to ensure the safety and reliability of the consultation plan.

[0065] Step 5, Incremental Multi-Scenario Continuous Training: Using the elastic parameter isolation technique, the model sub-networks are divided according to the psychological scenario category. New data only updates the parameters of the corresponding sub-networks to avoid catastrophic forgetting.

[0066] Based on the DSM-5 classification, different psychological scenario subspaces are divided, such as anxiety disorder scenarios and depressive disorder scenarios. An independent sparse subnetwork is assigned to each subspace. When new training data is added, only the gradient of the corresponding subnetwork is allowed to pass through, while the gradients of other subnetworks are set to zero. Parameter isolation is achieved through a mask matrix, so that new data only updates the parameters of the corresponding subnetwork. The performance of historical scenario tasks is tested on the validation set periodically. If the accuracy drops by more than 5%, the global parameter fine-tuning mode is activated to fine-tune the base model, restore the model's ability on historical scenario tasks, and avoid catastrophic forgetting.

[0067] Step 6, Adaptive Resource Allocation Optimization: Based on the characteristics of the visitor group, dynamically allocate GPU computing resources and prioritize high-frequency modes through a lightweight edge computing module;

[0068] Collect visitor metadata, such as age, gender, and SCL-90 scale scores, and perform cluster analysis to construct a resource demand profile. For example, if it is found that the adolescent group has a high demand for micro-expression analysis, 80% of the resources can be allocated to micro-expression analysis. TensorRT is used to perform INT8 quantization on the micro-expression recognition model, reducing the model inference latency from 120ms to 35ms, thereby improving the processing speed. The high-frequency model is also fixed to the GPU memory resident area to reduce the time spent on repeated loading. The GPU computing flow is divided through the CUDA-MPS service, reserving 50% of the computing units for crisis intervention sessions. When a crisis intervention task is encountered, low-priority batch processing tasks are interrupted to prioritize the crisis intervention needs.

[0069] In a specific embodiment, the multimodal data acquisition and preprocessing in step one specifically includes:

[0070] Multi-source sensor data acquisition: Voice signals are acquired through a microphone array, and the micro-expression movement trajectory of key facial points is captured using a 3D structured light camera, while the semantic context of text interaction is recorded simultaneously.

[0071] Heterogeneous data noise suppression: Spectral subtraction is used to eliminate environmental noise in speech data, and optical flow is used to extract muscle motion vectors and filter out non-psychologically relevant physiological tremors in micro-expression data;

[0072] Cross-modal time axis alignment: Aligning the timestamps of speech emotion peaks, micro-expression bursts and text keywords based on dynamic time warping algorithm.

[0073] In practice, multi-source sensor data acquisition equipment needs to be precisely installed and debugged to ensure the accuracy and synchronization of voice, micro-expression, and text data acquisition. The position and sensitivity settings of the microphone array should be optimized according to the consultation room environment to avoid incomplete sound acquisition or excessive noise. The shooting angle and resolution of the 3D structured light camera must meet the requirements for clearly capturing micro-expressions. In the heterogeneous data noise suppression process, the parameter settings of spectral subtraction and optical flow methods need to be optimized through multiple experiments based on the data characteristics to achieve the best noise reduction and feature extraction effect. When aligning across modal time axes, the parameter selection of the dynamic time warping algorithm will also affect the alignment accuracy. It is necessary to ensure that voice, micro-expressions, and text correspond accurately in time to provide a foundation for subsequent feature fusion and analysis.

[0074] In a specific embodiment, the cross-modal feature space mapping in step two specifically includes:

[0075] Modal feature encoding: MFCC+Log-Mel spectrogram features are extracted from speech data, dynamic texture features are extracted from micro-expression data using ResNet-18, and 768-dimensional semantic embedding vectors are generated from text data using BERT.

[0076] Contrastive learning framework construction: Using text embedding as the anchor point, text-to-speech and text-to-micro-expression models are constructed. Other visitor data is randomly sampled to generate negative sample pairs. Cross-modal similarity is optimized through the triplet loss function.

[0077] Alignment error dynamic constraint: Calculate the cosine similarity distribution between each modality pair, set an adaptive threshold δ = μ - 2σ, where μ is the mean and σ is the standard deviation, and reject feature matching pairs with similarity lower than δ from entering the downstream task.

[0078] When encoding features across different modalities, the selection of hyperparameters for different models can affect the feature extraction results. When using BERT to generate semantic embedding vectors, the selection of pre-trained models and the fine-tuning of parameters will affect the quality of the final vectors. In the construction of contrastive learning frameworks, the sampling strategy for negative sample pairs is also crucial. Reasonable sampling can improve the model's ability to distinguish the similarity between different modalities. In the dynamic constraint of alignment error, the method for calculating the cosine similarity distribution and the setting of the adaptive threshold need to be adjusted based on a large amount of experimental data to ensure that low-quality matching pairs can be effectively filtered out without excessively discarding useful information.

[0079] In a specific embodiment, the generation of the dynamic psychological guidance strategy in step three includes:

[0080] Real-time psychological state modeling: Analyze multimodal feature sequences using an LSTM network and output the current psychological state vector;

[0081] School of thought weight competition mechanism: Based on the psychological state vector and the fit of each school of thought, the strategy weight is dynamically allocated and the Top-K candidate guidance strategies are generated;

[0082] Phased goal optimization: By combining the consultation phase number, the nth session, and the DSM-5 standard, a progressive goal sequence is generated.

[0083] In real-time psychological state modeling, hyperparameters such as the number of layers and hidden units in the LSTM network need to be adjusted according to the complexity of the multimodal feature data to accurately output the psychological state vector. In the school-based weight competition mechanism, the algorithm for determining the fit between the psychological state vector and each school of thought must be designed based on psychological theory and numerous practical cases to ensure reasonable weight allocation. When optimizing phased goals, the progressive goal sequence, formulated by combining the consultation stage number, number of sessions, and the DSM-5 standard, must be operable and measurable, such as clearly defining specific indicators for achieving each stage goal.

[0084] In a specific embodiment, the generation of the expert-verified consultation plan in step four includes:

[0085] Multimodal cueing engineering: converting aligned feature vectors into structured cue templates;

[0086] The structured prompt template includes: the visitor's voice tremor level, micro-expression fear index, and keywords in the self-report text;

[0087] Clinical rules are double-checked: the expert knowledge base pre-sets DSM-5 diagnostic rules and contraindication checklists, and the rule engine matches and generates high-risk instructions in the treatment plan;

[0088] Manual review trigger mechanism: When a risky keyword or rule conflict is detected, the model output is automatically frozen and an early warning signal is sent to the supervisor's terminal.

[0089] The structured prompt template design for multimodal prompting engineering should be concise, clear, and accurately convey key information to facilitate understanding and solution generation by large language models. When performing dual verification of clinical rules, the DSM-5 diagnostic rules and contraindication checklist in the expert knowledge base should be updated in a timely manner to ensure consistency with the latest medical standards. The matching algorithm of the rule engine should be efficient and accurate, and able to quickly identify high-risk instructions. The risk keyword library for the manual review trigger mechanism should also be continuously improved to enhance the accuracy of early warnings and avoid false alarms and missed alarms.

[0090] In a specific embodiment, the incremental multi-scenario continuous training in step five includes:

[0091] Psychological scene topology partitioning: Define psychological scene subspaces according to DSM-5 classification, and assign an independent sparse subnetwork to each subspace;

[0092] Gradient update gating design: When new training data is added, only the gradients of the parameters of the corresponding sub-network are allowed to pass through, while the gradients of other sub-networks are set to zero. Parameter isolation is achieved through a mask matrix.

[0093] Catastrophic forgetting monitoring: Periodically test historical scenario task performance on the validation set. If the accuracy drops by more than 5%, activate the global parameter fine-tuning mode to restore the base model's capabilities.

[0094] When implementing incremental multi-scenario continuous training, the topology partitioning of psychological scenarios should be scientific and reasonable, taking into full account the characteristics and differences of different psychological problems. In the gradient update gating design, the generation and application of the mask matrix should ensure the accuracy of parameter isolation and prevent mutual interference between parameters of different sub-networks. The test frequency and validation set selection for catastrophic forgetting monitoring should be appropriate so as to detect the decline in model performance in a timely manner without increasing the computational burden too much.

[0095] In a specific embodiment, the adaptive resource allocation optimization in step six includes:

[0096] Group characteristic profile construction: Based on visitor metadata, age, gender, and SCL-90 scale scores are clustered to create resource demand profiles, with 80% of resources allocated to micro-expression analysis for the adolescent group;

[0097] Lightweight edge computing model: TensorRT is used to perform INT8 quantization on the micro-expression recognition model, reducing its inference latency from 120ms to 35ms, and the high-frequency call model is fixed to the GPU memory resident area;

[0098] Dynamic resource preemption scheduling: GPU computing flow is divided through CUDA-MPS service, reserving 50% of computing units for crisis intervention sessions and interrupting low-priority batch processing tasks.

[0099] When implementing adaptive resource allocation optimization, the clustering algorithm for constructing group feature profiles should be selected and optimized according to the characteristics of visitor data to ensure that the resource demand profile accurately reflects the needs of different groups. During the lightweighting of the edge computing model, the parameter settings of TensorRT quantization and the model solidification strategy should be tested to ensure a balance between model performance and resource utilization efficiency. In dynamic resource preemption scheduling, the configuration of CUDA-MPS service and the division of computing flows should be reasonable to ensure that crisis intervention tasks can obtain sufficient computing resources in a timely manner.

[0100] like Figure 2 As shown, the training device for the psychological counseling model employs the aforementioned training method for the psychological counseling model, including:

[0101] Multimodal acquisition module: connects to microphone, camera, and text input interface, and outputs synchronized data to feature alignment module;

[0102] Feature alignment module: Receives data from the multimodal acquisition module, generates a unified embedding vector through cross-modal comparative learning, and outputs it to the policy generation module;

[0103] Strategy generation module: Based on embedded vectors, it dynamically allocates psychological school weights, generates staged strategies, and transmits them to the solution generation module;

[0104] Solution generation module: calls LLM to generate consultation solutions, and connects to the expert verification module for semantic correction;

[0105] Incremental training module: Divides the model into sub-networks according to scene categories, updates only the corresponding sub-networks after receiving new data, and outputs the data to the resource allocation module;

[0106] Resource allocation module: Dynamically allocates GPU memory and computing cores based on the characteristics of the visitor group, and feeds back the resource status to the multimodal acquisition module and incremental training module.

[0107] In the training device of the psychological counseling model, when the multimodal acquisition module is connected to the microphone, camera, and text input interface, it is necessary to ensure interface compatibility and data transmission stability. After the feature alignment module receives the data, the implementation of cross-modal contrastive learning should be consistent with the method in cross-modal feature space mapping to ensure the quality of the generated unified embedding vectors. The strategy generation module allocates psychological school weights based on the embedding vectors, and its algorithm should correspond to the school weight competition mechanism in the dynamic psychological guidance strategy generation. When the solution generation module calls LLM (Large Language Model) to generate counseling solutions, it should select an appropriate large language model and fine-tune it according to the counseling scenario. The incremental training module divides the model sub-network according to the scenario category, which should be consistent with the psychological scenario topology division in incremental multi-scenario continuous training. The resource allocation module allocates GPU memory and computing cores according to the characteristics of the client group, which should be coordinated with the adaptive resource allocation optimization method in adaptive resource allocation optimization to achieve efficient resource utilization and timely feedback of resource status so that other modules can adjust their work.

[0108] An electronic device includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the training method of the aforementioned psychological counseling model.

[0109] In terms of electronic devices, the memory must have sufficient capacity to store training data, model parameters, and intermediate calculation results. The processor's performance must meet the requirements for running complex training algorithms, such as being able to quickly process multimodal data acquisition, feature extraction, and model training. The computer program must follow the training method of the psychological counseling model to ensure that the processor can accurately implement each training step when executing the program, from data acquisition to model training and resource allocation optimization.

[0110] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a training method for the aforementioned psychological counseling model.

[0111] When a computer program stored on a computer-readable storage medium is executed by a processor, its instruction sequence must correspond to the training method of the psychological counseling model. The performance indicators of the storage medium, such as read / write speed and stability, must meet the requirements of the computer program's operation to ensure reliable storage and retrieval of data during training and to ensure the smooth progress of the psychological counseling model training.

[0112] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A training method for a psychological counseling model, characterized in that... This includes the following steps: Step 1: Multimodal Data Acquisition and Preprocessing: Collect voice, micro-expression, and text interaction data from visitors, and generate a multimodal aligned raw dataset through noise suppression and timestamp synchronization techniques; Step 2, Cross-modal feature space mapping: Based on cross-modal contrastive learning, speech, micro-expression and text features of unstructured data are mapped to a unified semantic embedding space, and the cosine similarity threshold between modalities is calculated to constrain alignment error; Step 3: Generation of dynamic psychological guidance strategies: Based on the real-time multimodal characteristics of the client, a suitable psychological school of thought is selected through a dynamic weight adjustment mechanism to generate phased counseling goals; Step 4: Generation of expert-verified consultation plans: After inputting multimodal alignment features and dynamic strategies into the large language model to generate consultation plans, semantic matching verification is performed through a clinical expert knowledge base. Step 5, Incremental Multi-Scenario Continuous Training: Using the elastic parameter isolation technique, the model sub-networks are divided according to the psychological scenario category. New data only updates the parameters of the corresponding sub-networks to avoid catastrophic forgetting. Step 6, Adaptive Resource Allocation Optimization: Based on the characteristics of the visitor group, dynamically allocate GPU computing resources and prioritize high-frequency modes through a lightweight edge computing module; The multimodal data acquisition and preprocessing in step one specifically includes: Multi-source sensor data acquisition: Voice signals are acquired through a microphone array, and the micro-expression movement trajectory of key facial points is captured using a 3D structured light camera, while the semantic context of text interaction is recorded simultaneously. Heterogeneous data noise suppression: Spectral subtraction is used to eliminate environmental noise in speech data, and optical flow is applied to extract muscle motion vectors from micro-expression data and filter out non-psychologically relevant physiological tremors; Cross-modal timeline alignment: Aligning the timestamps of speech emotion peaks, micro-expression bursts, and text keywords based on a dynamic time warping algorithm; The cross-modal feature space mapping in step two specifically includes: Modal feature encoding: MFCC+Log-Mel spectrogram features are extracted from speech data, dynamic texture features are extracted from micro-expression data using ResNet-18, and 768-dimensional semantic embedding vectors are generated from text data using BERT. Contrastive learning framework construction: Using text embedding as the anchor point, text-to-speech and text-to-micro-expression models are constructed. Other visitor data is randomly sampled to generate negative sample pairs. Cross-modal similarity is optimized through the triplet loss function. Alignment error dynamic constraint: Calculate the cosine similarity distribution between each modality pair, set an adaptive threshold δ=μ-2σ, where μ is the mean and σ is the standard deviation, and reject feature matching pairs with similarity lower than δ from entering the downstream task; The generation of dynamic psychological guidance strategies in step three specifically includes: Real-time psychological state modeling: Analyze multimodal feature sequences using an LSTM network and output the current psychological state vector; School of thought weight competition mechanism: Based on the psychological state vector and the fit of each school of thought, the strategy weight is dynamically allocated and the Top-K candidate guidance strategies are generated; Phased goal optimization: By combining the consultation phase number, the nth session, and the DSM-5 standard, a progressive goal sequence is generated.

2. The training method for the psychological counseling model according to claim 1, characterized in that, The generation of the expert-verified consultation plan in step four specifically includes: Multimodal cueing engineering: converting aligned feature vectors into structured cue templates; The structured prompt template includes: the visitor's voice tremor level, micro-expression fear index, and keywords in the self-reported text; Clinical rules are double-checked: the expert knowledge base pre-sets DSM-5 diagnostic rules and contraindication checklists, and the rule engine matches and generates high-risk instructions in the treatment plan; Manual review trigger mechanism: When a risky keyword or rule conflict is detected, the model output is automatically frozen and an early warning signal is sent to the supervisor's terminal.

3. The training method for the psychological counseling model according to claim 2, characterized in that, The incremental multi-scenario continuous training in step five specifically includes: Psychological scene topology partitioning: Define psychological scene subspaces according to DSM-5 classification, and assign an independent sparse subnetwork to each subspace; Gradient update gating design: When new training data is added, only the gradients of the parameters of the corresponding sub-network are allowed to pass through, while the gradients of other sub-networks are set to zero. Parameter isolation is achieved through a mask matrix. Catastrophic forgetting monitoring: Periodically test historical scenario task performance on the validation set. If the accuracy drops by more than 5%, activate the global parameter fine-tuning mode to restore the base model's capabilities.

4. The training method for the psychological counseling model according to claim 3, characterized in that, The adaptive resource allocation optimization in step six specifically includes: Group characteristic profile construction: Based on visitor metadata, age, gender, and SCL-90 scale scores are clustered to create resource demand profiles, with 80% of resources allocated to micro-expression analysis for the adolescent group; Lightweight edge computing model: TensorRT is used to perform INT8 quantization on the micro-expression recognition model, reducing its inference latency from 120ms to 35ms, and the high-frequency call model is fixed to the GPU memory resident area; Dynamic resource preemption scheduling: GPU computing flow is divided through CUDA-MPS service, reserving 50% of computing units for crisis intervention sessions and interrupting low-priority batch processing tasks.

5. A training device for a psychological counseling model, employing the training method for a psychological counseling model as described in any one of claims 1-4, characterized in that, include: Multimodal acquisition module: connects to microphone, camera, and text input interface, and outputs synchronized data to feature alignment module; Feature alignment module: Receives data from the multimodal acquisition module, generates a unified embedding vector through cross-modal comparative learning, and outputs it to the policy generation module; Strategy generation module: Based on embedded vectors, it dynamically allocates psychological school weights, generates staged strategies, and transmits them to the solution generation module; Solution generation module: calls LLM to generate consultation solutions, and connects to the expert verification module for semantic correction; Incremental training module: Divides the model into sub-networks according to scene categories, updates only the corresponding sub-networks after receiving new data, and outputs the data to the resource allocation module; Resource allocation module: Dynamically allocates GPU memory and computing cores based on the characteristics of the visitor group, and feeds back the resource status to the multimodal acquisition module and incremental training module.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the training method for the psychological counseling model as described in any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the training method of the psychological counseling model as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Psychological counseling robot based on multi-modal data and large vertical model

    CN119167308A

  • Method and apparatus for continuous learning of tasks

    CN119631086A

  • Psychological consultation model training method and device, electronic equipment and storage medium

    CN119742030A