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

Through multimodal data processing and cross-modal feature mapping, combined with expert verification and resource optimization, the problem of insufficient semantic consistency of multi-source data in the psychological counseling model is solved, personalized and secure counseling plan generation is achieved, and the model training efficiency and counseling effect are improved.

CN120781052AActive Publication Date: 2025-10-14SHAANXI RUISHAN INFORMATION CONSULTING CO LTD

Patent Information

Application Number
CN202510876827.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-10-14
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

In the existing technology, when psychological counseling models integrate multi-source data, the semantic consistency of voice, micro-expression and text features is insufficient, resulting in the generated counseling plan deviating from the actual psychological state.

Method used

Through multimodal data collection and preprocessing, cross-modal feature space mapping, dynamic psychological guidance strategy generation, expert-verified consultation plan generation, incremental multi-scenario continuous training and adaptive resource allocation optimization, unified semantic embedding of voice, micro-expression and text features and generation of personalized consultation plans are achieved.

Benefits of technology

The accuracy and pertinence of the consultation plan are improved, ensuring the consistency of the consultation plan with the actual psychological state, and the efficiency and safety of model training are improved through clinical expert verification and resource optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120781052A_ABST
    Figure CN120781052A_ABST
Patent Text Reader

Abstract

The invention provides a psychological counseling model training method and device, electronic equipment and a storage medium, and the method comprises the following steps: 1, multi-modal data collection and preprocessing: collecting voice, micro-expression and text interaction data of a visitor, and generating a multi-modal aligned original data set through a noise suppression and timestamp synchronization technology; step 2, cross-modal feature space mapping: based on cross-modal comparative learning, mapping voice, micro-expression and text features of unstructured data to a unified semantic embedding space; according to the method, voice, micro-expression and text features are mapped to a unified semantic embedding space through cross-modal contrast learning, an alignment error is constrained by using a cosine similarity threshold value, the problem of insufficient semantic consistency of multi-modal data is solved, and meanwhile, according to the real-time multi-modal features of visitors, the semantic consistency of the multi-modal data is improved. And a dynamic weight adjustment mechanism is adopted to select an adaptive psychological genre guide strategy, a staged consultation target is generated, and personalized consultation guide is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a training method, device, electronic device and storage medium for a psychological consultation model. Background Art

[0002] In recent years, large model technology has achieved rapid development, and its application in dialogue systems has far exceeded people's expectations. These dialogue systems can not only realize simple conversational exchanges, but also assist in knowledge query and document summary, enhancing the role of dialogue systems in real life. However, psychological counseling scenarios are different from traditional dialogue scenarios and have more stringent requirements for counselors. Psychological counselors need not only rich psychological knowledge but also 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] After searching, the Chinese patent with announcement number CN119742030A discloses a training method, device, electronic device and storage medium for a psychological counseling model, comprising the following steps: for each target psychological scene category, obtaining sample psychological counseling information of a plurality of sample visitors corresponding to the target psychological scene category; for each sample visitor, determining the age of the sample visitor and the sample psychological guidance strategy corresponding to the target psychological scene category; inputting the sample psychological counseling information and the sample psychological guidance strategy of the sample visitor into a large language model, obtaining sample counseling plans for different counseling stages of the sample visitors output by the large language model; training an initial psychological counseling model based on the sample counseling plans of each sample visitor to obtain the psychological counseling model; the above scheme mainly generates sample counseling plans for different counseling stages, and the trained psychological counseling model can generate counseling plans for different counseling stages, thereby improving the style diversity of psychological counseling dialogues; however, the above scheme still has shortcomings in actual use:

[0004] Although diverse consultation plans are generated through large language models, the semantic consistency between the visitor's unstructured data, such as voice, micro-expressions and text features, may be insufficient. When the model integrates multi-source data, the generated consultation plan may deviate from the actual psychological state due to the mismatch between the embedding space of text features and behavioral features. Summary of the Invention

[0005] The present invention provides a training method, device, electronic device and storage medium for a psychological counseling model, which solves the problem in related technologies that the semantic consistency of the visitor's unstructured data, such as voice, micro-expressions and text features, may be insufficient. When the model integrates multi-source data, the embedding space of text features and behavioral features may not match, resulting in the generated counseling plan deviating from the actual psychological state.

[0006] In order to achieve the above-mentioned object, the present invention provides the following technical solution: a training method for a psychological consultation model, comprising the following steps:

[0007] Step 1: Multimodal data collection and preprocessing: Collect the visitor's voice, micro-expression, and text interaction data, and generate a multimodal aligned raw data set through noise suppression and timestamp synchronization technology;

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

[0009] Step 3: Dynamic psychological guidance strategy generation: Based on the real-time multimodal characteristics of the client, the adaptive psychological guidance strategy is selected through the dynamic weight adjustment mechanism to generate phased consultation goals;

[0010] Step 4: Generate expert-verified consultation plan: Input the multimodal alignment features and dynamic strategies into the large language model to generate the consultation plan, which is then verified by semantic matching against the clinical expert knowledge base.

[0011] Step 5: Incremental multi-scenario continuous training: Using elastic parameter isolation technology, the model sub-network is divided according to the psychological scenario category. New data only updates the corresponding sub-network parameters to avoid catastrophic forgetting;

[0012] Step 6: Adaptive resource allocation optimization: Based on the characteristics of the visitor group, GPU computing resources are dynamically allocated, and high-frequency modes are prioritized through lightweight edge computing modules.

[0013] Preferably, the multimodal data collection and preprocessing in step 1 specifically includes:

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

[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 non-psychological physiological vibrations in micro-expression data.

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

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

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

[0019] Constructing a contrastive learning framework: Using text embedding as an anchor, construct text-to-speech and text-to-microexpressions, randomly sampling other visitor data to generate negative sample pairs, and optimizing cross-modal similarity using a triplet loss function;

[0020] Dynamic constraint on alignment error: 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 the dynamic psychological guidance strategy in step three specifically includes:

[0022] Real-time mental state modeling: Analyze multimodal feature sequences through LSTM networks and output the current mental state vector;

[0023] School weight competition mechanism: Dynamically assigns strategy weights and generates the top-K candidate guidance strategies based on the compatibility between the psychological state vector and each school;

[0024] Phased goal optimization: Combine the consultation phase number, the nth session and the DSM-5 criteria to generate a progressive goal sequence.

[0025] Preferably, the generation of the expert-verified consulting solution in step 4 specifically includes:

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

[0027] The structured prompt template includes: client’s voice tremor level, micro-expression fear indicators, and self-report text keywords;

[0028] Double verification of clinical rules: The expert knowledge base presets DSM-5 diagnostic rules and contraindication checklists, and the rule engine matches and generates high-risk instructions in the plan;

[0029] Manual review trigger mechanism: When risk keywords or rule conflicts are detected, the model output is automatically frozen and an early warning signal is sent to the supervisory expert terminal.

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

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

[0032] Gradient update gating design: New training data only allows the parameter gradients of the corresponding sub-network to pass through, and the gradients of other sub-networks are set to zero, achieving parameter isolation through a mask matrix;

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

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

[0035] Construction of group characteristic profiles: Based on visitor metadata, age, gender, and SCL-90 scale scores, resource demand profiles are clustered. The adolescent group requires 80% of resources to be allocated to micro-expression analysis;

[0036] Lightweight edge computing models: TensorRT is used to perform INT8 quantization on the micro-expression recognition model, reducing its inference latency from 120ms to 35ms. High-frequency call models are also permanently stored in the GPU memory.

[0037] Dynamic resource preemptive scheduling: CUDA-MPS services are used to divide GPU computing flows, reserving 50% of computing units for crisis intervention sessions and interrupting low-priority batch tasks.

[0038] The training device of the psychological consultation model adopts the training method of the psychological consultation model, including:

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

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

[0041] Strategy Generation Module: Dynamically assigns psychological school weights based on the embedding vector, generates a phased strategy, and transmits it to the Solution Generation Module;

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

[0043] Incremental training module: divides the model sub-network by scene category, updates only the corresponding sub-network after receiving new data, and outputs it to the resource allocation module;

[0044] Resource allocation module: Dynamically allocates GPU memory and computing cores based on visitor group characteristics, and feeds back 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 implements the above-mentioned training method of the psychological counseling model when executing the computer program.

[0046] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned training method for the psychological counseling model.

[0047] The beneficial effects of the present invention are:

[0048] 1. Through cross-modal comparative learning, speech, micro-expression, and text features are mapped into a unified semantic embedding space, and the cosine similarity threshold-constrained alignment error between modalities is calculated. This effectively addresses the lack of semantic consistency in unstructured client data, enabling the model to more accurately integrate multi-source data and generate counseling solutions that better align with actual psychological states.

[0049] 2. Based on the real-time multimodal characteristics of the client, a dynamic weight adjustment mechanism is used to select the appropriate psychological guidance strategy and generate phased consultation goals. This can provide personalized consultation guidance based on the specific circumstances of different clients, improving the pertinence and effectiveness of consultation.

[0050] 3. After multimodal alignment features and dynamic strategies are input into a large language model to generate a consultation plan, semantic matching verification is performed using a clinical expert knowledge base. A dual verification of clinical rules and a manual review trigger mechanism are also implemented to promptly identify and correct potential risks, ensuring the professionalism and security of the consultation plan.

[0051] 4. Adopting incremental multi-scenario continuous training and adaptive resource allocation optimization technology, the model sub-network is divided according to psychological scenario categories. New data only updates the corresponding sub-network parameters to avoid catastrophic forgetting. GPU computing resources are dynamically allocated based on the characteristics of the visitor group, and high-frequency modalities are prioritized. This improves model training efficiency, rationally utilizes computing resources, and reduces costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0053] Figure 1 A flow chart of the training method for the psychological consultation model proposed in the present invention;

[0054] Figure 2 This is a structural diagram of the training device for the psychological counseling model proposed in the present invention. DETAILED DESCRIPTION

[0055] The following will clearly and completely describe the technical solution of the present invention in conjunction with the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

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

[0057] Step 1: Multimodal data collection and preprocessing: Collect the visitor's voice, micro-expression, and text interaction data, and generate a multimodal aligned raw data set through noise suppression and timestamp synchronization technology;

[0058] In actual application scenarios, such as psychological counseling rooms, microphone arrays are arranged to collect visitors' voice signals. These voice signals contain information such as the content, tone, and intonation of the visitors' speech. At the same time, 3D structured light cameras are installed to accurately capture the movement trajectory of micro-expressions of key facial points. Micro-expressions can reflect the visitor's instantaneous emotional changes and are crucial to understanding their psychological state. When the visitor interacts with the counselor through text, the semantic context, such as chat records and consultation questionnaire content, is recorded simultaneously. After collecting these multi-source heterogeneous data, spectral subtraction is used to process the voice data to remove environmental noise and ensure that the voice content is clear and discernible. For micro-expression data, the optical flow method is used to extract muscle motion vectors and filter out non-psychological physiological tremors such as those caused by physical fatigue and physiological reactions, so that the micro-expression data can more accurately reflect the psychological state. Finally, based on the dynamic time warping algorithm, the voice emotion peak, micro-expression outbreak point, and text keywords are used as time markers to achieve cross-modal time axis alignment and generate a multi-modal aligned original data set to provide high-quality data for subsequent model training.

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

[0060] For speech data, MFCC and Log-Mel spectrogram features are extracted, which can effectively represent the acoustic characteristics and frequency distribution of speech. Micro-expression data are extracted by ResNet-18 neural network to extract dynamic texture features. This network performs well in image feature extraction and can mine subtle change features in micro-expression. Text data are represented by 768-dimensional semantic embedding vectors generated by BERT model to represent the semantic information of text. With text embedding vectors as anchor points, a text-speech and text-micro-expression contrast learning framework is constructed. Negative sample pairs are randomly sampled from other visitor data. Triplet loss function is used to optimize cross-modal similarity, making different modal features more similar in a unified semantic space. The cosine similarity distribution between modal pairs is calculated. An adaptive threshold δ = μ-2σ (μ is the mean and σ is the standard deviation) is set. Feature matching pairs with similarity lower than δ are excluded from the downstream task to ensure the quality of features entering the subsequent task.

[0061] Step three, dynamic psychological guidance strategy generation: according to the real-time multi-modal features of the visitor, the adaptive psychological school guidance strategy is selected through the dynamic weight adjustment mechanism, and the phased counseling target is generated.

[0062] The multi-modal feature sequence is analyzed by LSTM (Long Short-Term Memory Network). LSTM can effectively process time series data and learn long-term dependencies in feature sequences. The current psychological state vector is output. According to the adaptability of the psychological state vector to different psychological schools (such as psychoanalytic school and cognitive behavioral school), the strategy weight is dynamically allocated, and the Top-K candidate guidance strategy is generated. Combined with the counseling stage number (such as the first counseling and subsequent follow-up counseling), the specific situation of the nth session and the DSM-5 (Diagnostic and Statistical Manual of Mental Disorders, Fifth Edition) standard, a progressive target sequence is developed. For example, in the first counseling, the target may be to understand the visitor's problem initially, and gradually solve the core psychological problem in the follow-up.

[0063] Step four, expert-verified counseling plan generation: input the multi-modal alignment features and dynamic strategies into the large language model to generate the counseling plan, and then perform semantic matching verification through the clinical expert knowledge base.

[0064] The aligned multi-modal feature vector is converted into a structured prompt template, such as explicitly visiting voice tremor level (reflecting tension level), micro-expression fear index (measuring fear emotion intensity), self-report text keywords (extracting key questions), expert knowledge base pre-setting DSM-5 diagnosis rule and contraindication checklist, using rule engine matching to generate high-risk instructions in the scheme, such as incorrect guidance instructions that may cause the patient's condition to worsen, when detecting risk keywords (such as words related to suicidal tendency, extreme violence, etc.) or rule conflicts, automatically freezing the model output, and sending an early warning signal to the supervisor expert terminal, and manually reviewing by the supervisor expert to ensure that the counseling scheme is safe and reliable;

[0065] Step five, incremental multi-scene continuous training: using elastic parameter isolation technology, dividing the model subnetwork according to the psychological scene category, and updating only the corresponding subnetwork parameters to avoid catastrophic forgetting;

[0066] According to the DSM-5 classification, different psychological scene subspaces are divided, such as anxiety disorder scene and depression disorder scene, and an independent sparse subnetwork is allocated to each subspace. When new training data is added, only the parameter gradient of the corresponding subnetwork is allowed to pass, and the gradient of other subnetworks is set to zero. Parameter isolation is achieved through a mask matrix, so that only the corresponding subnetwork parameters are updated by the new data. The performance of the historical scene task is tested on the validation set regularly. If the accuracy decreases by more than 5%, the global parameter fine-tuning mode is activated, and the base model is fine-tuned to restore the model's ability in the historical scene task and avoid catastrophic forgetting.

[0067] Step six, adaptive resource allocation optimization: based on the characteristics of the visitor group, dynamically allocate GPU computing resources, and prioritize high-frequency modalities through a lightweight edge computing module;

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

[0069] In specific embodiments, the multi-modal data acquisition and preprocessing in step one specifically includes:

[0070] Multi-source sensor data collection: voice signals are collected through a microphone array, micro-expression motion trajectories of facial key points are captured using a 3D structured light camera, and the semantic context of text interaction is recorded synchronously;

[0071] Heterogeneous data noise suppression: spectral subtraction is used to eliminate environmental noise for voice data, and optical flow method is applied to extract muscle movement vectors and filter non-psychologically related physiological tremors for micro-expression data;

[0072] Cross-modal time axis alignment: based on dynamic time warping algorithm to align the timestamps of voice emotion peaks, micro-expression burst points and text keywords.

[0073] In actual operation, the equipment for multi-source sensor data collection needs to be accurately installed and debugged to ensure the accuracy and synchronization of voice, micro-expression and text data collection. The position and sensitivity of the microphone array should be optimized according to the consulting room environment to avoid incomplete sound collection or excessive noise. The shooting angle and resolution of the 3D structured light camera should meet the requirements of clearly capturing micro-expression. In the heterogeneous data noise suppression link, the parameters of spectral subtraction and optical flow method need to be optimized through multiple tests according to the characteristics of the data to achieve the best denoising and feature extraction effect. When aligning the cross-modal time axis, the parameter selection of the dynamic time warping algorithm will also affect the alignment accuracy. It is necessary to ensure that voice, micro-expression and text are accurately corresponding in time to provide a basis for subsequent feature fusion and analysis.

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

[0075] Modality-specific feature encoding: MFCC+Log-Mel spectrogram features are extracted from voice data, ResNet-18 is used to extract dynamic texture features from micro-expression data, and BERT is used to generate 768-dimensional semantic embedding vectors from text data;

[0076] Contrastive learning framework construction: taking text embedding as the anchor point, constructing text-voice, text-micro-expression, and randomly sampling other visitor data to generate negative sample pairs, optimizing cross-modal similarity through triple loss function;

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

[0078] In the process of modal feature coding, the selection of hyperparameters of different models affects the feature extraction effect. When using BERT to generate semantic embedding vectors, the selection of pre-trained models and the tuning parameters will affect the quality of the final vectors. In the construction of the contrastive learning framework, the sampling strategy of negative sample pairs is also crucial. Reasonable sampling can improve the model's ability to distinguish the similarity of different modalities. In the dynamic alignment error constraint, the method of 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 are effectively filtered out without discarding useful information.

[0079] In specific embodiments, the dynamic psychological guidance strategy in step three specifically includes:

[0080] Real-time psychological state modeling: analyze the multi-modal feature sequence through the LSTM network to output the current psychological state vector;

[0081] Genre weight competition mechanism: dynamically allocate strategy weights and generate Top-K candidate guidance strategies according to the psychological state vector and the adaptation degree of each genre;

[0082] Phased target optimization: generate a progressive target sequence in combination with the consultation stage number, the nth session, and the DSM-5 standard.

[0083] In real-time psychological state modeling, the number of layers and the number of hidden units of the LSTM network need to be adjusted according to the complexity of the multi-modal feature data to accurately output the psychological state vector. In the genre weight competition mechanism, the algorithm for determining the adaptation degree of the psychological state vector to each genre should be based on psychological theories and a large number of actual cases to ensure reasonable weight allocation. In phased target optimization, the progressive target sequence developed in combination with the consultation stage number, the number of sessions, and the DSM-5 standard should be operational and measurable, such as specifying specific indicators for achieving each stage target.

[0084] In specific embodiments, the expert-verified counseling plan in step four specifically includes:

[0085] Multi-modal prompt engineering: convert the aligned feature vectors into structured prompt templates;

[0086] The structured prompt templates include: visitor voice tremor level, micro-expression fear index, and self-narrative text keywords;

[0087] Clinical rule double-checking: the DSM-5 diagnosis rules and contraindication checklists are preset in the expert knowledge base, and high-risk instructions in the plan are generated through rule engine matching;

[0088] Artificial review triggering mechanism: when risk keywords or rule conflicts are detected, the model output is automatically frozen, and a warning signal is sent to the supervisor expert terminal.

[0089] The structured prompt template design of the multimodal prompt project should be concise and clear and accurately convey key information to facilitate the understanding and solution generation of the large language model. During the double 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 of the manual review trigger mechanism should also be continuously improved to improve the accuracy of the early warning and avoid false alarms and omissions.

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

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

[0092] Gradient update gating design: New training data only allows the parameter gradients of the corresponding sub-network to pass through, and the gradients of other sub-networks are set to zero, achieving parameter isolation through a mask matrix;

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

[0094] When implementing incremental multi-scenario continuous training, the topological division of psychological scenarios must be scientific and reasonable, fully considering the characteristics and differences of different psychological problems. In the gradient update gating design, the generation and application of the mask matrix must ensure the accuracy of parameter isolation and prevent mutual interference between parameters of different sub-networks. The test frequency and verification set selection for catastrophic forgetting monitoring must be appropriate, so as to timely detect the decline in model performance without excessively increasing the computational burden.

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

[0096] Construction of group characteristic profiles: Based on visitor metadata, age, gender, and SCL-90 scale scores, resource demand profiles are clustered. The adolescent group requires 80% of resources to be allocated to micro-expression analysis;

[0097] Lightweight edge computing models: TensorRT is used to perform INT8 quantization on the micro-expression recognition model, reducing its inference latency from 120ms to 35ms. High-frequency call models are also permanently stored in the GPU memory.

[0098] Dynamic resource preemptive scheduling: CUDA-MPS services are used to divide GPU computing flows, reserving 50% of computing units for crisis intervention sessions and interrupting low-priority batch tasks.

[0099] When the adaptive resource allocation optimization is implemented, the clustering algorithm for constructing the group feature portrait needs to be selected and optimized according to the data characteristics of the visitors, so as to ensure that the resource demand portrait accurately reflects the needs of different groups. In the lightweight process of the edge computing model, the parameter settings of TensorRT quantization and the model solidification strategy need to be tested to ensure the balance between model performance and resource utilization efficiency. In the dynamic resource preemption scheduling, the configuration of CUDA-MPS service and the division of computing flow need to be reasonable to ensure that the crisis intervention task can obtain sufficient computing resources in time.

[0100] As shown in Figure 2 The training device of the psychological counseling model adopts the above-mentioned training method of the psychological counseling model, and comprises:

[0101] The multi-modal acquisition module is connected with a microphone, a camera and a text input interface, and outputs synchronous data to the feature alignment module.

[0102] The feature alignment module receives the data of the multi-modal acquisition module, generates a unified embedding vector through cross-modal comparison learning, and outputs it to the strategy generation module.

[0103] The strategy generation module dynamically allocates the weight of the psychological genre based on the embedding vector, generates a phased strategy and transmits it to the scheme generation module.

[0104] The scheme generation module calls the LLM to generate a counseling scheme and connects the expert verification module for semantic correction.

[0105] The incremental training module divides the model subnetwork according to the scene category, updates only the corresponding subnetwork after receiving new data, and outputs it to the resource allocation module.

[0106] The resource allocation module dynamically allocates GPU memory and computing cores according to the group characteristics of the visitors, and feeds back the resource state to the multi-modal acquisition module and the 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, the interface compatibility and data transmission stability must be ensured. After the feature alignment module receives the data, the implementation of cross-modal comparative learning must be consistent with the method in the cross-modal feature space mapping to ensure the quality of generating a unified embedding vector. The strategy generation module allocates psychological school weights based on the embedding vector. Its algorithm must echo the school weight competition mechanism in the dynamic psychological guidance strategy generation. When the solution generation module calls the LLM (large language model) to generate a consulting solution, it must select a suitable large language model and fine-tune it according to the consulting scenario. The incremental training module divides the model sub-network according to the scenario category, which must be consistent with the psychological scenario topology division in the incremental multi-scenario continuous training. The resource allocation module allocates GPU memory and computing cores according to the characteristics of the visitor group. It must cooperate with the adaptive resource allocation optimization method in the adaptive resource allocation optimization to achieve efficient resource utilization and timely feedback on 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. When the processor executes the computer program, the training method of the psychological counseling model is implemented.

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

[0110] A computer-readable storage medium stores a computer program, which implements the above-mentioned training method for the psychological counseling model when executed by a processor.

[0111] When a computer program stored in 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 the reading and writing speed and stability, must meet the requirements for the operation of the computer program to ensure the reliable storage and reading of data during the training process 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 modifications or substitutions that can be easily conceived by a person 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 based on the scope of protection of the claims.

Claims

1. The training method of psychological counseling model is characterized by , including the following steps: Step 1: Multimodal data collection and preprocessing: Collect the visitor's voice, micro-expression, and text interaction data, and generate a multimodal aligned raw data set through noise suppression and timestamp synchronization technology; Step 2: Cross-modal feature space mapping: Based on cross-modal contrastive learning, the speech, micro-expression, and text features of the unstructured data are mapped into a unified semantic embedding space. The cosine similarity threshold between the modalities is calculated to constrain the alignment error. Step 3: Dynamic psychological guidance strategy generation: Based on the real-time multimodal characteristics of the client, the adaptive psychological guidance strategy is selected through the dynamic weight adjustment mechanism to generate phased consultation goals; Step 4: Generate expert-verified consultation plan: Input the multimodal alignment features and dynamic strategies into the large language model to generate the consultation plan, which is then verified by semantic matching against the clinical expert knowledge base. Step 5: Incremental multi-scenario continuous training: Using elastic parameter isolation technology, the model sub-network is divided according to the psychological scenario category. New data only updates the corresponding sub-network parameters to avoid catastrophic forgetting; Step 6: Adaptive resource allocation optimization: Based on the characteristics of the visitor group, GPU computing resources are dynamically allocated, and high-frequency modes are prioritized through lightweight edge computing modules.

2. The training method of the psychological consultation model according to claim 1, characterized in that: The multimodal data collection and preprocessing in step 1 specifically include: Multi-source sensor data acquisition: Voice signals are collected through a microphone array, and the micro-expression movement trajectory of facial key points is captured using a 3D structured light camera, while the semantic context of text interactions is simultaneously recorded. 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 non-psychological physiological vibrations in micro-expression data. Cross-modal timeline alignment: Align the timestamps of speech emotion peaks, micro-expression bursts, and text keywords based on the dynamic time warping algorithm.

3. The training method of the psychological consultation model according to claim 2, characterized in that: The cross-modal feature space mapping in step 2 specifically includes: Modal feature encoding: MFCC+Log-Mel spectrogram features are extracted from speech data, dynamic texture features are extracted using ResNet-18 for micro-expression data, and 768-dimensional semantic embedding vectors are generated using BERT for text data; Constructing a contrastive learning framework: Using text embedding as an anchor, construct text-to-speech and text-to-microexpressions, randomly sampling other visitor data to generate negative sample pairs, and optimizing cross-modal similarity using a triplet loss function; Dynamic constraint on alignment error: 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.

4. The training method of the psychological consultation model according to claim 3, characterized in that: The generation of the dynamic psychological guidance strategy in step three specifically includes: Real-time mental state modeling: Analyze multimodal feature sequences through LSTM networks and output the current mental state vector; School weight competition mechanism: Dynamically assign strategy weights and generate the top-K candidate guidance strategies based on the compatibility between the psychological state vector and each school; Phased goal optimization: Combine the consultation phase number, the nth session and the DSM-5 criteria to generate a progressive goal sequence.

5. The training method of the psychological consultation model according to claim 3, characterized in that: The generation of the consulting solution verified by the expert in step 4 specifically includes: Multimodal prompt engineering: converting aligned feature vectors into structured prompt templates; The structured prompt template includes: client’s voice tremor level, micro-expression fear indicators, and self-report text keywords; Double verification of clinical rules: The expert knowledge base presets DSM-5 diagnostic rules and contraindication checklists, and the rule engine matches and generates high-risk instructions in the plan; Manual review trigger mechanism: When risk keywords or rule conflicts are detected, the model output is automatically frozen and an early warning signal is sent to the supervisory expert terminal.

6. The training method of the psychological consultation model according to claim 5, characterized in that: The incremental multi-scenario continuous training in step 5 specifically includes: Psychological scene topology partitioning: Define psychological scene subspaces according to DSM-5 classification and assign independent sparse subnetworks to each subspace; Gradient update gating design: New training data only allows the parameter gradients of the corresponding sub-network to pass through, and the gradients of other sub-networks are set to zero, achieving parameter isolation through a mask matrix; Catastrophic forgetting monitoring: Regularly test the performance of historical scenario tasks on the validation set. If the accuracy drops by more than 5%, activate the global parameter fine-tuning mode to restore the base model capabilities.

7. The training method of the psychological consultation model according to claim 6, characterized in that: The adaptive resource allocation optimization in step 6 specifically includes: Construction of group characteristic profiles: Based on visitor metadata, age, gender, and SCL-90 scale scores, resource demand profiles are clustered. The adolescent group requires 80% of resources to be allocated to micro-expression analysis; Lightweight edge computing models: TensorRT is used to perform INT8 quantization on the micro-expression recognition model, reducing its inference latency from 120ms to 35ms. High-frequency call models are also permanently stored in the GPU memory. Dynamic resource preemptive scheduling: CUDA-MPS services are used to divide GPU computing flows, reserving 50% of computing units for crisis intervention sessions and interrupting low-priority batch tasks.

8. A training device for a psychological consultation model, using the training method for a psychological consultation model according to any one of claims 1 to 7, characterized in that: include: Multimodal acquisition module: connects to microphone, camera, and text input interface, and outputs synchronized data to the feature alignment module; Feature alignment module: Receives data from the multimodal acquisition module, generates a unified embedding vector through cross-modal contrast learning, and outputs it to the strategy generation module; Strategy Generation Module: Dynamically assigns psychological school weights based on the embedding vector, generates a phased strategy, and transmits it to the Solution Generation Module; Solution generation module: calls LLM to generate consulting solutions and connects to the expert verification module for semantic correction; Incremental training module: divides the model sub-network by scene category, updates only the corresponding sub-network after receiving new data, and outputs it to the resource allocation module; Resource allocation module: Dynamically allocates GPU memory and computing cores based on visitor group characteristics, and feeds back resource status to the multimodal acquisition module and incremental training module.

9. 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, the training method of the psychological counseling model according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the training method of the psychological counseling model according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Psychological consultation data analysis method and device, computer equipment and storage medium

    CN116776220A

  • Image classification continuous learning method based on information bottleneck

    CN118313438A

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

    CN119167308A

  • Psychological counseling man-machine interaction method based on large model

    CN119170204A

  • Method and apparatus for continuous learning of tasks

    CN119631086A

Cited By

  • Auxiliary diagnosis and treatment system and method based on multi-modal fusion large model

    CN121528505A

  • Auxiliary diagnosis and treatment system and method based on multi-modal fusion large model

    CN121528505B

  • Psychological risk dynamic monitoring method and system based on adolescent special large model

    CN122369956A