Intelligent psychological counseling method and system

By combining the BERT emotion perception module with the CBT intervention framework, an emotion intensity matrix and domain keyword set are generated, which solves the problems of response delay and insufficient emotional understanding in online psychological counseling, and realizes rapid and personalized psychological counseling, which is suitable for the special needs of high-risk occupational groups.

CN122177369APending Publication Date: 2026-06-09中国人民解放军海军青岛特勤疗养中心
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
中国人民解放军海军青岛特勤疗养中心
Filing Date
2026-05-09
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing intelligent psychological counseling systems suffer from problems such as high response delays, insufficient emotional understanding, and difficulty in achieving personalized counseling in online psychological consultations. They also struggle to establish a consistent process of emotion recognition, strategy generation, and response optimization, resulting in poor psychological counseling outcomes.

Method used

The BERT emotion perception module is used to identify implicit emotions and generate an emotion intensity matrix. A domain-specific keyword extraction module is used to map domain-specific terms. An initial response strategy is generated based on the CBT intervention framework, and the final coaching response is optimized through natural language processing. Contextual correlation analysis is performed by combining emotion recognition results and historical dialogues. Encryption technology is used to ensure data security.

Benefits of technology

It achieves greater accuracy and efficiency in scenarios where emotional understanding is insufficient, effectively addresses the issue of response delays in online psychological counseling, ensures the compliance and warmth of the psychological counseling process, provides rapid and personalized psychological counseling, and is suitable for the special needs of high-risk occupational groups.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122177369A_ABST
    Figure CN122177369A_ABST
Patent Text Reader

Abstract

This invention relates to the field of psychological counseling technology, and particularly to an intelligent psychological counseling method and system. The method includes: acquiring user consultation input and performing standardized and structured processing; identifying implicit emotions based on a BERT model and generating an emotion intensity matrix, extracting and mapping domain-specific terminology, and generating emotion recognition results through multi-task learning; generating an initial response strategy based on a CBT intervention framework and strategy library for high-pressure environments, and generating a final response through logical verification and NLG; performing contextual analysis by associating with historical dialogues, updating and encapsulating complete dialogue records using a memory network; performing end-to-end encryption and secure storage, and dynamically optimizing system configuration. This invention improves the accuracy, professionalism, and security of emotion recognition and psychological intervention, effectively meeting specific psychological counseling needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of psychological counseling technology, and in particular to an intelligent psychological counseling method and system. Background Technology

[0002] In the field of psychological counseling technology, existing solutions for intelligent psychological counseling methods and systems, targeting specific objects / scenarios, typically rely on human psychological consultation and emotion analysis modules. These solutions suffer from limitations such as high response latency, insufficient emotion understanding, and difficulty in achieving personalized counseling. Existing methods often rely on human intervention and traditional psychological assessment tools for emotion recognition and counseling strategy development. In online psychological counseling scenarios, these methods are prone to slow response times and inaccurate emotion recognition, making it difficult to achieve stable implementation of intelligent psychological counseling. Regarding the joint processing of emotion intensity matrices and domain-specific keyword extraction modules, existing technologies generally have common shortcomings in emotion perception, rapid response, and personalized counseling strategy development. This makes it difficult to establish a consistent process of emotion recognition—strategy generation—response optimization in online psychological counseling applications, resulting in poor counseling outcomes. Summary of the Invention

[0003] This invention provides an intelligent psychological counseling method and system to address the problem of how to achieve rapid and compassionate psychological counseling in online psychological counseling scenarios with high response delays and insufficient emotional understanding, based on the emotion intensity matrix and domain-specific keyword extraction module in the intelligent psychological counseling system, through the emotion perception NLP module and the CBT intervention framework for high-pressure environments.

[0004] To address the aforementioned technical problems, this invention provides an intelligent psychological counseling method, comprising: The system acquires user text / voice input and performs format standardization processing, including character set unification, punctuation standardization, capitalization, and special symbol filtering; noise filtering processing includes removing meaningless stop words, eliminating grammatical errors, and spelling errors; sentence segmentation processing uses a rule-based and machine learning-based sentence segmentation algorithm to identify sentence boundaries and generate structured dialogue units. Based on the BERT emotion perception module, implicit emotions are identified and an emotion intensity matrix is ​​generated. The emotion intensity vector is calculated through an improved attention weight mechanism, domain-specific keywords are extracted and mapped to domain professional terms, similarity matching is performed with a pre-built domain professional terminology library, and emotion recognition results are generated by combining emotion dimension classification based on a multi-task learning framework. Based on a pre-built CBT intervention framework for high-pressure environments, combined with a stress management and emotion regulation strategy library, an initial response strategy is generated, and the psychological intervention logic is validated, including the timing of instruction execution, intervention intensity assessment, and potential risk analysis. Natural language generation processing adopts an NLG model based on the Transformer architecture to generate the final counseling response. The system associates the current response with historical dialogues, performs contextual analysis, calculates cosine similarity using a semantic embedding-based similarity calculation method, and uses a memory network to perform read and write operations using a dynamic memory unit structure. It then encapsulates and generates a complete dialogue record, including dialogue round number, timestamp, emotion tag, and strategy identifier. AES-256 key negotiation is performed using the Diffie-Hellman key exchange protocol, and end-to-end data encryption is performed using AES-256-GCM mode encryption and authentication. Secure storage paths are dynamically allocated, and final storage logs are generated. Collect response latency data from the final storage log, perform resource load analysis and parallel computing resource configuration, and generate an updated system configuration.

[0005] Furthermore, the steps for generating an emotion intensity matrix based on the BERT emotion perception module to identify implicit emotions include: The text in the input structured dialogue unit is segmented into words. The word fragmentation algorithm is used to split the text into sub-word units. Then, the sub-word units are converted into vector representations through an embedding layer and the contextual bidirectional information is fused. A multi-layer Transformer encoder is used to perform self-attention mechanism calculations on sequences to capture potential emotional cues and semantic dependencies in the text. An emotion trigger word weighting adjustment mechanism is introduced, which dynamically weights attention based on emotion cue tags to enhance sensitivity to hidden emotions; Output a multidimensional emotion intensity vector, which covers the intensity scores of various psychological states such as anger, anxiety, depression, and tension, forming an emotion intensity matrix.

[0006] Furthermore, the steps for extracting domain-specific keywords and mapping them to domain-specific terminology include: Regular expressions and custom dictionaries are used to match key terms in a specific domain. At the same time, the TF-IDF algorithm is combined to calculate the weights of high-frequency and distinctive words in the text and filter out potential keywords. The extracted keywords are matched with a pre-built domain terminology database. The mapping process uses a vector space model to calculate the similarity between the keywords and the entries in the terminology database. Keywords that exceed the similarity threshold are replaced with standardized domain terms. A contextual semantic disambiguation algorithm is used for polysemous and ambiguous words. Based on syntactic structure and historical dialogue context, the algorithm determines the accurate meaning of keywords and automatically removes non-core words that are irrelevant to the current psychological counseling.

[0007] Furthermore, the steps of sentiment dimension classification based on a multi-task learning framework include: A sentiment dimension classification model is used to determine the multi-level sentiment labels of the keyword set, integrating lexical sentiment tendency analysis and contextual semantic understanding; The model input is embedded with word vectors, combined with the weight scores of domain keywords and the corresponding sentiment dimension labels, and local sentiment features are extracted using a convolutional neural network. At the same time, a long short-term memory network is used to capture the sequence dependence and sentiment transition between keywords. By integrating the emotion weights in the emotion intensity matrix and dynamically adjusting the classification weights, the ability to identify subtle emotional changes is enhanced. By introducing a knowledge base of psychology experts and combining it with the emotion classification criteria in cognitive behavioral therapy, the division of emotional dimensions is optimized.

[0008] Furthermore, based on a pre-built CBT intervention framework for high-pressure environments, combined with a stress management and emotion regulation strategy library, the steps for generating initial response strategies include: The emotion recognition results are analyzed in multiple dimensions. The current psychological load and emotion fluctuation level are determined based on the emotion category and intensity. Combined with the high-stress task environment parameters and historical dialogue context, applicable CBT intervention strategies are selected. Based on the confidence score of emotion recognition, adjust the strategy priority and response intensity; It adopts a hybrid reasoning mechanism that combines a rule engine and a machine learning model. The rule engine quickly locates the coping solution based on predefined sentiment-policy mapping rules, while the machine learning model is trained on historical data to optimize the accuracy and personalization of policy matching. An integrated abnormal emotion detection mechanism is used to trigger multiple rounds of strategy verification and supplementary analysis for inputs with low confidence or drastic emotional fluctuations.

[0009] Furthermore, the steps for performing logical verification of psychological intervention include: Analyze stress management instructions in strategy data to extract key intervention operations and execution conditions; The psychological intervention logic verification module is invoked to conduct compliance and security reviews of the extracted stress management instructions, including judgment of the timing of instruction execution, assessment of intervention intensity, and analysis of potential risks. The validation process is based on professional mental health management standards and cognitive behavioral therapy guidelines, and dynamically adjusts the intervention plan by taking into account the task urgency of high-risk occupational groups and their historical psychological intervention records. The mechanism combines rule-driven and simulation-based reasoning. The rule-driven part uses an expert knowledge base to ensure that intervention instructions comply with psychological ethics and operational safety, while the simulation-based reasoning part uses a virtual psychological model to predict the intervention effect and possible side effects.

[0010] Furthermore, the steps of natural language generation processing using an NLG model based on the Transformer architecture include: Semantic analysis and structured information extraction are performed on the compliance response content to clarify the semantic hierarchy and logical relationships of intervention measures, implementation steps, and psychological support statements; A deep learning-based natural language generation model is used to convert structured intervention information into text responses that conform to the communication habits and psychological counseling styles of high-risk occupation groups; Based on contextual information and historical dialogue records, dynamically adjust the tone, word choice, and sentence structure of statements; An emotion adaptation mechanism is introduced to adjust the temperature parameters of language based on the intensity and category of the input emotion, and to appropriately control the positivity or soothingness of the response.

[0011] Furthermore, the expression for generating the emotion intensity matrix based on the BERT emotion perception module to identify implicit emotions includes: Data to be analyzed is obtained from structured dialogue units, and implicit emotion recognition is performed through the BERT sentiment perception module; the input data includes text content, semantic tags and timestamp information; An improved attention weighting mechanism is employed to enhance the capture capability of emotion trigger words. The emotion intensity vector is calculated using this improved attention weighting mechanism. The definition of emotion intensity vector calculation is as follows: in, For the first Emotional intensity For the first in the input sequence The position index of each word To improve attention weights, The total number of words in the input text sequence. For the emotion classification weight matrix, The first output of BERT Word vectors, This is a bias term for the emotion category; Furthermore, we perform domain-specific keyword extraction and domain-specific terminology mapping, and use similarity matching with a pre-built domain-specific terminology database to define an improved cosine similarity calculation: in, For the first Similarity score of candidate words This serves as an index for candidate keywords. Indexed by word vector dimension, The total dimension of the word vectors. For the candidate keyword vector, the first... dimensional components, For the domain terminology library vector number dimensional components, These are the TF-IDF weighting coefficients. For the first The term frequency-inverse document frequency value of each word; High-intensity emotional vocabulary vectors and domain-specific terminology vector Input: Keyword similarity score Generate a set of domain keywords.

[0012] Furthermore, the expression that generates the final coaching response includes: Receive the emotion dimension classification results, invoke the CBT intervention framework for high-pressure environments to generate an initial response strategy, and define the strategy priority function: in, For the first Priority scoring of each strategy For the index of the response strategy, For the Sigmoid function, For weight parameters, The degree of match between the strategy and the current sentiment. To ensure the adaptability of the strategy to the task environment, Use a frequency decay factor for strategy history; Furthermore, in the strategy data verification phase, an improved logical consistency scoring mechanism is adopted, and a verification function is defined: in, For the first Verification score of each instruction For indexes of policy instructions, To verify the total number of rules, To verify the rule index, For the policy loss function, the first... The partial derivatives of each parameter, where ReLU is the corrected linear unit function. For rule matching degree, The activation threshold; Furthermore, by optimizing natural language generation through an improved temperature parameter adjustment mechanism, dynamic temperature calculation is defined: in, Generate temperature parameters for natural language. To index the steps, As the reference temperature, The attenuation coefficient is... For the first Sentiment-like weights, This represents the intensity of the emotion. The final coaching response is generated through exponential decay adjustment.

[0013] Furthermore, an intelligent psychological counseling system, applied to any of the methods described above, includes: The installation module is used to acquire intelligent tutoring terminal devices and complete their installation and limitations. The data acquisition module is used to collect psychological state data of high-risk occupational groups, preprocess the data within a preset collection range, and output preprocessed emotional data. The physiological parameter acquisition module is used to collect physiological parameter data of high-risk occupational groups, perform standardized processing, and output standardized physiological data; The alignment module is used to time-synchronize and align preprocessed emotional data with standardized physiological data, and output a time-synchronized sequence. The judgment module is used to judge stress events based on emotion recognition models and behavior judgment rules, and output psychological intervention and control instructions. The output module is used to output psychological intervention control commands to the intelligent counseling terminal to complete the presentation of psychological counseling content. The record update module is used to record the implementation status and time information of psychological counseling and update the emotion recognition parameters.

[0014] The key innovations of this invention include: (1) Implicit emotion recognition is achieved through the BERT emotion perception module, an emotion intensity matrix is ​​generated, and domain-specific keyword extraction module is used to map domain-specific terms to form a domain keyword set.

[0015] (2) The CBT intervention framework for high-pressure environments is used to receive emotion recognition results and generate initial response strategies. Combined with the psychological intervention logic verification of stress management instructions, compliant response content is generated.

[0016] (3) Perform natural language generation processing on the response to be optimized to generate the final counseling response, and achieve rapid psychological counseling through the link optimization of the current response.

[0017] The following are its main beneficial effects: (1) By generating the emotion intensity matrix and domain keyword set, higher accuracy and efficiency can be achieved in the emotion recognition process, which is suitable for scenarios with insufficient emotion understanding.

[0018] (2) The initial response strategy combined with the generation of compliant response content can effectively address the problem of delayed response in online psychological counseling and ensure the compliance and warmth of the psychological counseling process.

[0019] (3) The generation of the final counseling response optimizes the response chain through natural language processing, enabling rapid and personalized psychological counseling in online psychological counseling, which is suitable for the special needs of high-risk occupational groups. Attached Figure Description

[0020] Figure 1 A flowchart illustrating an intelligent psychological counseling method provided in an embodiment of this application; Figure 2 This is a structural block diagram of an intelligent psychological counseling system provided in an embodiment of this application. Detailed Implementation

[0021] Example 1: Refer to Figure 1 This is a flowchart illustrating an intelligent psychological counseling method provided in an embodiment of the present invention. The process may include at least steps S100-S600: S100: Obtain user text / voice input and perform format standardization processing, including character set unification, punctuation standardization, capitalization, and special symbol filtering; noise filtering processing includes removing meaningless stop words, eliminating grammatical errors, and spelling errors; sentence segmentation processing uses a sentence segmentation algorithm that combines rules and machine learning to identify sentence boundaries in the text and generate structured dialogue units.

[0022] S200: Based on the BERT emotion perception module, implicit emotions are identified and an emotion intensity matrix is ​​generated. The emotion intensity vector is calculated through an improved attention weight mechanism. Domain-specific keywords are extracted and mapped to domain professional terms. Similarity matching is performed with a pre-built domain professional terminology library. Combined with emotion dimension classification based on a multi-task learning framework, emotion recognition results are generated.

[0023] S300, based on a pre-built CBT intervention framework for high-pressure environments and combined with a stress management and emotion regulation strategy library, generates an initial response strategy, performs psychological intervention logic verification, including timing judgment of instruction execution, intervention intensity assessment and potential risk analysis, and uses an NLG model based on the Transformer architecture for natural language generation processing to generate the final counseling response.

[0024] S400: Associate the current response with historical dialogues, perform contextual analysis, calculate cosine similarity using a semantic embedding-based similarity calculation method, and use a memory network to perform read and write operations using a dynamic memory unit structure to encapsulate and generate a complete dialogue record including dialogue round number, timestamp, sentiment tag and strategy identifier.

[0025] The S500 performs AES-256 key negotiation using the Diffie-Hellman key exchange protocol, and performs end-to-end data encryption using AES-256-GCM mode encryption and authentication, dynamically allocates secure storage paths, and generates the final storage log.

[0026] S600 collects response latency data from the final storage log, performs resource load analysis and parallel computing resource configuration, and generates an updated system configuration.

[0027] Step S100 includes at least steps S110-S130: S110. Obtain user text / voice consultation input, perform format standardization processing, and obtain preprocessed data; This step specifically receives text or voice consultation input from the user terminal. This input includes, but is not limited to, psychological counseling requests initiated by high-risk occupational groups via mobile devices or dedicated terminals. Text input is received using a unified encoding format, while voice input is converted into text data through a built-in speech recognition module. Specifically, the voice signal undergoes preprocessing, including noise suppression, echo cancellation, and speech rate adjustment, to improve recognition accuracy. The speech recognition module employs a deep neural network model, combined with a specialized domain vocabulary for customized training, ensuring high recognition rates for domain-specific terminology and directive language. The recognized text content, along with the original text input, enters the format standardization process. Specifically, operations such as character set unification, punctuation standardization, capitalization, and special symbol filtering are performed to form a text format conforming to the system's internal processing standards. Furthermore, the format standardization process also includes timestamp synchronization of the input content to ensure the consistency of the time sequence of multimodal inputs. Throughout the processing, the system monitors the integrity of the input data in real time. In case of packet loss or missing information, a re-acquisition mechanism or automatic completion prompt is triggered, and abnormal information is recorded in the system log for subsequent analysis. The preprocessed data, as the output of this step, includes uniformly formatted text content and corresponding metadata. Specific fields include the text body, timestamp, input source identifier, and recognition confidence level. The preprocessed data is passed to the "Data to be analyzed" field in S210 for use by the sentiment perception analysis module based on BERT (Bidirectional Encoder Representations from Transformers). Simultaneously, the input quality metrics generated in this step are also provided for reference by the system performance dynamic optimization module.

[0028] S120. Extract semantic features from the preprocessed data, perform noise filtering, and generate a cleaned input sequence; This step takes the preprocessed data as input and first performs semantic feature extraction through the Natural Language Processing (NLP) pipeline. Specifically, word embedding technology combined with a context-aware model is used to vectorize the text, and a pre-trained language model is used to identify key entities, actions, and emotion trigger words. To adapt to the concise and directive nature of dialogues among high-risk occupational groups, the semantic feature extraction module integrates a customized dictionary and rule base, prioritizing the identification of domain-specific terminology, psychology-specific vocabulary, and emotional expressions. Subsequently, the system performs noise filtering, specifically including removing meaningless stop words, eliminating grammatically and spelled errors, and using a context consistency detection algorithm to remove semantically incoherent segments. This process combines statistical and rule-based methods to ensure that the filtering process does not lose key information while effectively reducing the interference of input noise on subsequent analysis. During the filtering process, the system annotates abnormal semantic structures and generates anomaly reports for subsequent modules to adjust model parameters. After the purification process is completed, the generated purified input sequence is stored in a serialized structure, containing filtered and semantically enhanced word and phrase sequences, along with corresponding context weights and confidence scores. The purified input sequence is passed to the "input sequence" field of S130 as an output field for sentence marking processing. At the same time, the semantic feature information of the sequence also provides auxiliary data for the subsequent sentiment perception analysis module.

[0029] S130. Perform sentence segmentation and tagging on the input sequence to generate structured dialogue units; This step uses the purified input sequence as input. Specifically, the sentence segmentation and tagging process employs a rule-based and machine learning-based algorithm to identify sentence boundaries in the text. This algorithm, combined with the imperative context of domain-specific dialogue, optimizes sentence segmentation rules and accurately identifies the segmentation points of commands, requests, and emotional expressions. Furthermore, the system utilizes syntactic analysis and semantic role labeling techniques to parse the internal structure of each sentence, identifying subject-verb-object relationships and modifiers to form semantically complete and independent dialogue units. These structured dialogue units include sentence text, semantic tags, emotional cue markers, and timestamp information, constructed into a unified data structure for subsequent module calls. During processing, the system automatically detects and corrects sentence segmentation anomalies caused by spoken expression or input errors, and performs multi-round judgments on ambiguous sentences based on contextual information to ensure the accuracy and completeness of the structured units. The structured dialogue unit, as the output of this step, is explicitly passed to the "Dialogue Unit" field of S210 for use by the BERT-based emotion perception analysis module for implicit emotion recognition and keyword extraction. At the same time, this structured data provides basic semantic units for CBT (Cognitive Behavioral Therapy) response generation and multi-turn dialogue context management in high-pressure environments.

[0030] Step S200 includes at least steps S210-S230: S210. Input the data to be analyzed into the BERT emotion perception module to perform implicit emotion recognition and obtain the emotion intensity matrix. This step takes a structured dialogue unit from S130 as input. This structured dialogue unit contains text content, semantic tags, emotion cues, and timestamp information. Specifically, the structured dialogue unit is input as the "dialogue unit" field to the BERT-based emotion perception module. The BERT emotion perception module, tailored to the concise and directive nature of dialogues involving high-risk occupational groups, fine-tunes a pre-trained language model and combines it with a domain-specific corpus and psychological emotion tag data to form a deep learning model for implicit emotion recognition. Specifically, the module first segments the text in the input structured dialogue unit using a word piece algorithm, dividing the text into sub-word units. These sub-word units are then converted into vector representations through an embedding layer, fusing contextual information. Next, a multi-layer Transformer encoder is used to perform self-attention calculations on the sequence, capturing potential emotional cues and semantic dependencies in the text. To adapt to the complexity of implicit directives and emotional expressions in dialogues involving high-risk occupational groups, the model introduces an emotion trigger word weight adjustment mechanism, dynamically weighting attention based on emotion cues to enhance sensitivity to hidden emotions. Furthermore, the model outputs a multi-dimensional emotion intensity vector, encompassing intensity scores for various psychological states such as anger, anxiety, depression, and tension, forming an emotion intensity matrix. This matrix undergoes normalization to ensure comparability between different emotion dimensions and includes a confidence index to reflect the accuracy of recognition. During processing, the system monitors abnormal structures and recognition uncertainties in the input text in real time. For emotion judgments with low confidence, a secondary inference mechanism is triggered, combining contextual information for supplementary analysis to ensure the stability and accuracy of emotion recognition. The emotion intensity matrix, as the output field of this step, is explicitly passed to the "Emotion Data" field in S220 for subsequent use in extracting domain-specific keywords and mapping domain-specific terms. Simultaneously, this matrix provides foundational data support for the emotion recognition results in S310, permeating the emotion perception and response generation process from modules S200 to S300.

[0031] In one embodiment, the system obtains the data to be analyzed from the structured dialogue unit in S130 and performs implicit emotion recognition through the BERT emotion perception module. The input data includes text content, semantic tags, and timestamp information. The module adopts an improved attention weighting mechanism to enhance the ability to capture emotion trigger words, and the emotion intensity vector is calculated through the improved attention weighting mechanism.

[0032] Formula ① defines the calculation of the emotion intensity vector: in, For the first Emotional intensity For the first in the input sequence The position index of each word For improved attention weights ([0,1] interval). The total number of words in the input text sequence. The emotion classification weight matrix (derived from fine-tuning of the pre-trained model). The first output of BERT Each word vector (768 dimensions) This is the emotion category bias term.

[0033] The data source is the text body field in the structured dialogue unit, which is transformed through a word embedding layer. Attention weight It is dynamically calculated and generated from emotion cue tags. Formula ① outputs an emotion intensity matrix as input to the "Emotion Data" field of S220.

[0034] Furthermore, based on the sentiment data, the system performs domain-specific keyword extraction and domain-specific terminology mapping, and uses similarity matching with a pre-built domain-specific terminology database. Formula ② defines the improved cosine similarity calculation: in, For the first The similarity score of each candidate word (in the range of [-1,1]). This serves as an index for candidate keywords. Indexing the dimension of word vectors ( ), The total dimension of the word vectors. For the candidate keyword vector, the first... dimensional components, For the domain terminology library vector number dimensional components, This is the TF-IDF (Term Frequency-Inverse Document Frequency) weighting coefficient (set to 0.3). For the first The term frequency-inverse document frequency value of each word.

[0035] The data source consists of high-emotion-intensity words from the emotion intensity matrix, obtained through formula ①. Candidate words are selected and generated into a set of domain keywords after calculation using a vector space model. These keywords are then passed to the "keyword input" field of S230.

[0036] Formula ①: The encoded output of the input text from the BERT model; Formula ②: Extracted from sentiment data using the TF-IDF algorithm; Formula ① takes the structured dialogue unit text as input and outputs an emotion intensity matrix. This is used as input for the "Emotional Data" field in S220, and will be used for keyword filtering later.

[0037] Formula ② uses the high-intensity emotional word vectors selected by Formula ① and domain-specific terminology vector Input: Keyword similarity score Generate a set of domain keywords and pass it to the "Keyword Input" field in S230.

[0038] S220. Extract domain-specific keywords from sentiment data, map domain-specific terms, and generate a set of domain keywords. This step uses the emotion intensity matrix output by S210 as the input "emotion data". Specifically, it first performs threshold filtering on the multi-dimensional emotion scores in the emotion intensity matrix, filtering out dimensions whose emotion intensity exceeds a preset threshold to determine the main emotional state in the current dialogue. Combining the semantic tags and emotion cue markers in the structured dialogue unit generated by S130, the system activates a domain-specific keyword extraction module. This module uses a combination of rule-based and statistical methods. First, it uses regular expressions and a custom dictionary to match key terms in the domain, such as "task", "alert", "emergency", and "instruction". At the same time, it uses the TF-IDF (Term Frequency-Inverse Document Frequency) algorithm to calculate the weights of high-frequency and distinctive words in the text, filtering out potential keywords. Further, the system introduces a domain-specific terminology mapping mechanism, matching the extracted keywords with a pre-built domain-specific terminology database. The database contains domain-specific professional terms, abbreviations, and codes. The mapping process uses a vector space model to calculate the similarity between keywords and entries in the database. Keywords exceeding the similarity threshold are replaced with standardized domain-specific professional terms to ensure consistency and accuracy. During the mapping process, the system employs a contextual semantic disambiguation algorithm for polysemous and ambiguous words. Based on syntactic structure and historical dialogue context, it determines the accurate meaning of keywords and automatically removes non-core words irrelevant to the current psychological counseling. After mapping, the system integrates the selected standard domain terminology with keywords related to emotion intensity to form a domain keyword set. This set is stored in structured data format, including keyword text, corresponding emotion dimension labels, weight scores, and timestamps, facilitating subsequent emotion dimension classification and emotion recognition. This domain keyword set, as an output field of this step, is passed to the "Keyword Input" field in S230 for the emotion dimension classification module to generate emotion recognition results. Simultaneously, this set provides precise emotion trigger points and semantic basis for the CBT response generation module targeting high-pressure environments, supporting the accurate construction of psychological intervention strategies.

[0039] S230. Classify the keyword input according to the sentiment dimension and generate the sentiment recognition result; This step uses the domain keyword set output by S220 as the "keyword input," and performs similarity matching with a pre-built domain terminology database. It then combines sentiment dimension classification based on a multi-task learning framework to generate emotion recognition results. Specifically, a sentiment dimension classification model is used to determine multi-level sentiment labels for the keyword set. This model, based on a multi-task learning framework, integrates lexical sentiment tendency analysis and contextual semantic understanding, mapping each keyword to a predefined sentiment dimension space, including positive, negative, neutral, and complex mixed sentiment categories. The model input first undergoes word vector embedding, combining the weight scores of domain keywords and their corresponding sentiment dimension labels. A Convolutional Neural Network (CNN) is used to extract local sentiment features, while a Long Short-Term Memory (LSTM) network is used to capture sequence dependencies and sentiment transitions between keywords. Furthermore, the model integrates sentiment weights from the sentiment intensity matrix, dynamically adjusting classification weights to enhance the ability to identify subtle emotional changes. To meet the psychological counseling needs of high-risk occupational groups, the model incorporates a knowledge base of psychology experts and combines it with the emotion classification standards from Cognitive Behavioral Therapy (CBT) to optimize the emotional dimension division and enhance the professionalism and practicality of emotion recognition. During the classification process, the system performs multi-label classification on keywords with emotional conflicts or multiple emotion tags, uses a confidence threshold to filter the final emotion category, and generates a comprehensive emotion recognition result. The emotion recognition result is output in structured data format, including the emotion category corresponding to the keyword, confidence score, emotion intensity, and timestamp information, forming a unified emotion input data structure. This emotion recognition result field, as the output of this step, is explicitly passed to the "Emotion Input" field of S310 for use by the CBT response generation module for high-pressure environments, completing the key link from emotion perception to psychological intervention response. Simultaneously, this result provides the emotional state update basis for the multi-turn dialogue context management module, supporting the maintenance of emotional continuity in the dialogue.

[0040] Step S300 includes at least steps S310-S330: S310. Receive the emotion recognition results, invoke the CBT intervention framework for high-pressure environments, and generate an initial response strategy; This step uses the emotion recognition results from S230 as input. These results include the emotion category corresponding to the keywords, confidence score, emotion intensity, and timestamp information. Specifically, this emotion input field is passed to the CBT (Cognitive Behavioral Therapy) response generation module for high-pressure environments. This module, based on a pre-built CBT intervention framework for high-pressure environments, combines a stress management and emotion regulation strategy library to match response strategies to the psychological state and task context of high-risk occupational groups. Specifically, the system first performs multi-dimensional analysis of the emotion recognition results, determining the current psychological load and emotion fluctuation level based on the emotion category and intensity. Combining high-pressure task environment parameters and historical dialogue context, it then selects applicable CBT intervention strategies. The strategy library includes multi-level stress management solutions, emotion regulation techniques, and cognitive reconstruction methods, all designed based on domain-specific psychology and cognitive behavioral therapy theories, and adapted to the occupational characteristics and psychological needs of high-risk occupational groups. Furthermore, the system adjusts strategy priority and response intensity based on the confidence score of the emotion recognition to ensure the strategy's relevance and effectiveness. During the response strategy generation process, the module employs a hybrid reasoning mechanism combining a rule engine and a machine learning model. The rule engine quickly locates coping strategies based on predefined emotion-policy mapping rules, while the machine learning model optimizes the accuracy and personalization level of strategy matching through training on historical data. The system also integrates an abnormal emotion detection mechanism, triggering multiple rounds of strategy verification and supplementary analysis for inputs with low confidence or drastic emotion fluctuations, ensuring the rationality and safety of the response strategy. The initial response strategy includes a strategy identifier, intervention level, stress management instructions, and emotion regulation plan, forming a structured data package. This data package, as the output field "Initial Response Strategy" of this step, is explicitly passed to the "Strategy Data" field of S320 for subsequent stress management instruction extraction and psychological intervention logic verification. Simultaneously, this strategy data provides a basis for psychological state adjustment for the multi-round dialogue context management module, supporting dynamic optimization and continuous maintenance of response content.

[0041] S320. Extract stress management instructions from strategy data, verify psychological intervention logic, and generate compliant response content. This step uses the initial response strategy output by S310 as input "strategy data." Specifically, the system first parses the stress management instructions in the strategy data, extracting key intervention operations and execution conditions. These stress management instructions cover various psychological intervention measures, including breathing regulation training, cognitive restructuring prompts, and emotion release techniques, all of which comply with occupational mental health standards for high-risk occupational groups. Further, the system calls the psychological intervention logic verification module to conduct compliance and safety reviews of the extracted stress management instructions, specifically including determining the timing of instruction execution, assessing intervention intensity, and analyzing potential risks. The verification process is based on domain-specific professional mental health management standards and cognitive behavioral therapy guidelines, combined with the task urgency of high-risk occupational groups and historical psychological intervention records, dynamically adjusting the intervention plan. The verification module employs a mechanism combining rule-driven and simulation-based reasoning. The rule-driven part is based on an expert knowledge base to ensure that intervention instructions comply with psychological ethics and operational safety, while the simulation-based reasoning part uses a virtual psychological model to predict intervention effects and possible side effects. The system also integrates an anomaly detection mechanism, automatically marking instructions with conflicting or excessive intervention risks and providing manual review prompts. After verification, the system optimizes and adjusts the intervention instructions based on the verification results, generating compliant response content. The compliance response content includes an optimized description of the intervention plan, implementation steps, precautions, and psychological support statements, forming an output format that combines standardized text and structured data. This response content, as the output field "Compliance Response Content" for this step, is passed to the "Response to be Optimized" field of S330 for use in natural language generation processing. Simultaneously, this content provides the semantic basis for psychological counseling for the multi-turn dialogue context management module, supporting the tracking and feedback of dialogue emotional coherence and strategy execution.

[0042] S330. Perform natural language processing on the response to be optimized to generate the final tutoring response; This step uses the compliant response content output by S320 as the input "response to be optimized." Specifically, the system first performs semantic parsing and structured information extraction on the compliant response content, clarifying the semantic hierarchy and logical relationships of intervention measures, implementation steps, and psychological support statements. Further, a deep learning-based Natural Language Generation (NLG) model is used to convert the structured intervention information into a text response that conforms to the communication habits and psychological counseling styles of high-risk occupational groups. The NLG model is based on the Transformer architecture and trained using a specialized domain corpus and psychological counseling dialogue data, supporting diverse expressions and emotional tone adjustments. During the generation process, the system dynamically adjusts the tone, vocabulary, and sentence structure of the statements based on contextual information and historical dialogue records, ensuring that the response content is both professional and rigorous, yet also humane. To enhance the relevance and personalization of the response, the system introduces an emotion adaptation mechanism, adjusting the temperature parameters of the language according to the intensity and category of the input emotion, appropriately controlling the positivity or soothing nature of the response. The natural language generation process includes content planning, sentence generation, semantic consistency verification, and style adjustment. The system monitors the fluency and logical rationality of the generated text in real time and automatically corrects potential ambiguities or inappropriate expressions. After generation, the system formats the final tutoring response, adds a timestamp and dialogue turn information, and forms a complete response data packet. This data packet, as the output field "Final Tutoring Response" of this step, is explicitly passed to the "Current Response" field of S410 for context association analysis and memory network updates by the multi-turn dialogue context management module. At the same time, this response content provides feedback to the CBT response generation module for high-pressure environments and the system performance dynamic optimization module, supporting the continuous improvement of the overall system response quality.

[0043] In another embodiment, the system receives the emotion dimension classification result from S230 and invokes the CBT intervention framework for high-pressure environments to generate an initial response strategy. Formula ③ defines the strategy priority function: in, For the first Priority score of each strategy (in the [0,1] interval). For the index of the response strategy, For the Sigmoid function, for , The degree of match between the strategy and the current sentiment. To ensure the adaptability of the strategy to the task environment, Use a frequency decay factor for the strategy history.

[0044] The data source is the emotion category field in the emotion recognition result. The initial response strategy is calculated through a multi-task learning model and output to the "strategy data" field of S320.

[0045] Furthermore, in the strategy data verification phase, the system employs an improved logical consistency scoring mechanism. Formula ④ defines the verification function: in: For the first Verification score of each instruction For indexes of policy instructions, To verify the total number of rules, To verify the rule index ( ), For the policy loss function, the first... The partial derivatives of each parameter, where ReLU is the corrected linear unit function. For rule matching degree, The activation threshold is set to 0.6.

[0046] The data source is the stress management instruction field in the strategy data. The compliant response content is optimized and generated through the gradient back-transmission mechanism and then transmitted to the "Response to be Optimized" field of S330.

[0047] Furthermore, the system optimizes natural language generation through an improved temperature parameter adjustment mechanism. Formula ⑤ defines dynamic temperature calculation: in, Generate temperature parameters for natural language. To index the steps, The reference temperature is 1.2. The attenuation coefficient is 0.05. For the first Sentiment-like weights, This represents the intensity of the emotion.

[0048] The data source is the emotion intensity data in the compliant response content. The final counseling response is generated through exponential decay adjustment and output to the "Current Response" field of S410. Technical effect of this section: A closed-loop chain of emotion recognition, strategy optimization, and response generation is achieved through multi-stage formulaic processing, ensuring the accuracy of psychological intervention strategies and the appropriate emotional response generated by natural language.

[0049] Formula ③ receives the S230 sentiment dimension classification results and combines them with normalized sentiment intensity. (Derived from Formula ①), task suitability and historical decay factor are used to calculate the strategy priority score. Output to the "Policy Data" field of S320; Formula ④ takes the stress management instruction field in the strategy data as input, and calculates the result by comparing the partial derivative of the strategy loss function with the rule matching degree. Calculate verification score The guidance strategy is optimized and output to the "Response to be Optimized" field of S330; Formula ⑤ utilizes the optimized emotion intensity data. and weight Adjust generation temperature It controls the diversity and stability of natural language generation and outputs the results to the "Current Response" field of S410.

[0050] Step S400 includes at least steps S410-S430: S410. Obtain the current response and historical dialogue records, perform contextual analysis, and obtain a dialogue relevance score; This step uses the final tutoring response output by S330 as the input "current response," while simultaneously accessing historical dialogue records stored in the system. These records include user consultation content from previous rounds, system response text, timestamps, and corresponding emotion recognition results. The current response and historical dialogue records serve as input to the context association analysis module. First, they are integrated using a unified data structure to form a multidimensional dialogue dataset containing time series and semantic labels. Specifically, the system employs a semantic embedding-based similarity calculation method to vectorize the current response text and each record in the historical dialogue, using metrics such as cosine similarity to evaluate the semantic continuity. Furthermore, combining timestamp information, the system introduces a temporal weighting mechanism, assigning higher weights to more recent dialogue records to reflect the temporal sensitivity and emotional continuity of the dialogue. During the context association analysis, the system also references the emotion recognition results from the historical dialogue, combining them with the emotional tendency of the current response, and uses a multidimensional emotion matching algorithm to evaluate the continuity and changing trends of the emotional state. This algorithm, based on a multidimensional emotion space, calculates the similarity between the current response and historical emotion vectors, forming an emotion correlation index. To handle the imperative and concise nature of dialogue, the system also integrates a domain-specific pragmatic analysis module to annotate commands, requests, and key information in the discourse, aiding in the accuracy of semantic matching. In abnormal situations, such as a significant decrease in the semantic or emotional relevance between the current response and historical dialogue, the system triggers an anomaly detection mechanism, recording the abnormal event and generating a warning log for subsequent manual intervention or model adjustment. The contextual association analysis integrates semantic similarity, time weight, and emotion matching results, and after weighted fusion, finally outputs a dialogue relevance score. This score, numerically representing the overall relevance strength between the current response and historical dialogue, serves as the output field "Dialogue Relevance Score" for this step. It is explicitly passed to the "Score Data" field of S420 for use by the memory network update module. Simultaneously, this score data provides fundamental support for subsequent processing by the multi-turn dialogue context management module, ensuring the continuous maintenance of the emotional and semantic coherence of the dialogue.

[0051] S420. Extract key context nodes from the scoring data, update the memory network, and generate the updated memory vector. This step uses the dialogue relevance score output by S410 as input "score data," combined with the final coaching response output by S330 and historical dialogue records. Specifically, the system first performs threshold judgment on the score data, filtering out dialogue segments with high relevance to determine key context nodes. These key context nodes include statements, keywords, and emotion tags in historical dialogues that are most relevant to the semantics and emotion of the current response. The system extracts these nodes using a multi-level attention mechanism with weighted processing. Further, the system calls a context management module based on a memory network. This memory network uses a dynamic memory unit structure for read / write operations, enabling the storage, updating, and retrieval of information from multiple rounds of dialogue. Specifically, the key context nodes are used as input, combined with the current response content, to dynamically adjust the memory units through memory read / write operations. The read operation, based on an attention mechanism, guides selective retrieval of historical information according to the relevance score; the write operation integrates new information and emotional states from the current response into the memory units, updating the memory vector. During the update process, the system uses a gating mechanism to control information retention and forgetting, ensuring the memory network maintains continuous attention to important contexts while removing irrelevant or outdated information. To meet the real-time and continuous needs of psychological counseling for high-risk occupational groups, the memory network supports incremental updates, avoiding full reconstruction and improving processing efficiency. The system also monitors for anomalies during the memory update process, such as memory conflicts or information loss, triggering log recording and anomaly handling procedures. The updated memory vector is output in high-dimensional vector form, containing comprehensive semantic information and emotional states, forming a unified memory data structure. This memory data, as the output field "updated memory vector" of this step, is explicitly passed to the "memory data" field of S430 for use in dialogue log encapsulation processing. Simultaneously, this memory data provides continuous contextual support for the multi-turn dialogue context management module and the CBT response generation module for high-pressure environments, promoting dynamic optimization of psychological counseling strategies and maintenance of emotional coherence.

[0052] S430. Encapsulate the memory data into a dialogue log to generate a complete dialogue record; This step uses the updated memory vector output by S420 as input "memory data," combined with the current response and historical dialogue records from S410. Specifically, the system first performs structured parsing on the memory data, extracting semantic information, emotional state, and time-series markers. Further, the system calls the dialogue log encapsulation module to integrate the above information with the corresponding dialogue text, user identity identifier, system response strategy, and session metadata. The encapsulation process uses a standardized data format, including dialogue turn number, timestamp, emotion tag, strategy identifier, and context link fields, ensuring the integrity and traceability of the dialogue records. Specifically, the system concatenates the current response with historical dialogue content in chronological order, combining it with the semantic summary of the updated memory vector to form a multi-layered, multi-dimensional dialogue log structure. To meet security and privacy requirements, sensitive information is marked during the encapsulation process, supporting subsequent encryption. The system also integrates an anomaly detection mechanism to automatically correct and log any data inconsistencies, missing data, or format errors that occur during the encapsulation process. After encapsulation, the generated complete dialogue record is output in the form of a structured data packet, containing text content, semantic tags, emotional states, strategy information, and metadata, forming a unified dialogue history archive. This complete dialogue record, as the output field "Complete Dialogue Record" of this step, is explicitly passed to the "Data to be Encrypted" field of S510 for use by the end-to-end data encryption processing module. At the same time, this data supports the system performance dynamic optimization module in monitoring and analyzing the dialogue process, ensuring the continuity of psychological counseling services and data security.

[0053] Step 500 includes at least steps S510-S530: S510: Receive the data to be encrypted, perform AES-256 key negotiation, and generate an encryption session key; This step uses the complete dialogue record output by S430 as the input "data to be encrypted". Specifically, the complete dialogue record includes structured text content, semantic tags, emotional states, policy information, and session metadata. The system first receives and verifies the integrity of the data to be encrypted. The verification process includes data format verification, field integrity detection, and timestamp continuity confirmation to ensure that the input data meets the predetermined encryption processing requirements. Subsequently, the system enters the AES-256 (Advanced Encryption Standard) key negotiation phase. Specifically, it adopts a public-key cryptography-based key exchange protocol, such as the Diffie-Hellman key exchange protocol, combined with a secure communication channel between the high-risk occupational group's terminal and the server, to dynamically generate the encrypted session key. During the key negotiation process, the system performs multi-factor authentication on both parties, including digital certificate verification, device fingerprint recognition, and user behavior analysis, to ensure that the session key generation process has high security and tamper-proof capabilities. Furthermore, considering the communication environment characteristics of high-risk occupational groups, the system designs a key update mechanism that automatically triggers key rotation based on session duration, data volume, and security policies to prevent key leakage and replay attacks. The encrypted session key is a symmetric key with a length of 256 bits, generated using a random number generator combined with a high-entropy source provided by the Hardware Security Module (HSM) to ensure key randomness and unpredictability. After key generation, the system encapsulates the key parameters into a standardized data structure, including the key value, generation timestamp, validity period, and usage scope information, for subsequent use by the encryption module. Any abnormal events during the negotiation process, such as key negotiation failure, authentication failure, or communication interruption, are logged in detail, triggering security alarms and initiating a fault recovery mechanism. The encrypted session key, as an output field of this step, is explicitly passed to the "key parameter" field of the S520 for use by the end-to-end data encryption module. Simultaneously, this key parameter provides security status monitoring data for the system performance dynamic optimization module, supporting dynamic assessment and adjustment of the overall system security.

[0054] S520: Obtain the encryption strategy from the key parameters, perform end-to-end data encryption, and generate ciphertext data packets; This step uses the encrypted session key and related key parameters output by S510 as input "key parameters". Specifically, the system first parses the currently valid encryption policy from the key parameters. The encryption policy includes configuration items such as encryption algorithm mode (e.g., Galois / Counter Mode, GCM), padding method, Message Authentication Code (MAC) algorithm, and key usage restrictions. Based on end-to-end encryption design principles, the system ensures that all data transmission from the user terminal to the server is encrypted. Specifically, the complete dialogue record transmitted by S430 is used as the plaintext input for encryption. The encryption process first segments the plaintext data, dividing it into multiple data blocks according to the maximum data block length set by the encryption policy, facilitating parallel processing and error location. Subsequently, each data block, combined with the encrypted session key, is encrypted using AES-256-GCM mode, specifically including two steps: encryption and authentication. The encryption step performs block cipher conversion on the data block, and the authentication step generates a corresponding authentication tag to prevent data tampering. The system employs a hardware acceleration module to perform encryption calculations, improving encryption efficiency and reducing latency to meet the real-time psychological counseling needs of high-risk occupational groups. During encryption, the system monitors data stream integrity and encryption performance indicators, triggering retry mechanisms and logging exceptions for abnormal data packets or encryption failures. After encrypting all data blocks, the system merges the encryption result with the authentication tag to form a unified ciphertext data packet. This packet contains the encrypted dialogue content, authentication information, encryption policy version number, and session key identifier. To support subsequent secure storage and rapid retrieval, the system appends metadata to the ciphertext data packet, including a timestamp, data packet sequence number, and encryption status flag. This ciphertext data packet, as an output field of this step, is explicitly passed to the "encryption result" field of S530 for use by the secure storage path dynamic allocation module. Simultaneously, this ciphertext data packet provides encryption load and efficiency data to the system performance dynamic allocation optimization module, supporting system resource scheduling and optimization.

[0055] S530. Allocate a secure storage path for the encryption results and generate the final storage log; This step uses the encrypted data packet output by the S520 as the input "encryption result." Specifically, the system first verifies the integrity of the encrypted data packet, confirming the correctness of the data packet structure and authentication tags to prevent tampering or data corruption. Then, it calls the secure storage path allocation module to dynamically select a suitable storage medium and path based on the sensitivity level, storage strategy, and access permission requirements of the psychological data of high-risk occupational groups. The storage paths include local encrypted databases, distributed secure storage clusters, and cloud-based encrypted storage services. The system performs path optimization based on a comprehensive evaluation of storage capacity, access frequency, data confidentiality level, and fault recovery capabilities. Specifically, the system adopts a hierarchical storage strategy, prioritizing the storage of highly sensitive psychological counseling data on secure nodes with multiple physical isolation and access controls, while less sensitive data can be stored on performance-optimized nodes to balance security and efficiency. During path allocation, the system monitors the real-time status of storage nodes, including available space, access latency, and security event records, to ensure that the selected path meets current security and performance requirements. After path confirmation, the system performs a data write operation. This write process uses a transaction mechanism to ensure data consistency and durability. After the write operation is complete, the system generates a final storage log. The log content includes packet identifiers, storage paths, write timestamps, storage node status, and access permission settings, forming a structured log file. To meet audit and compliance requirements, the system digitally signs and timestamps the storage log and synchronizes a copy of the log to the security audit server. Any abnormal events during the entire storage process, such as write failures, unavailable paths, or abnormal permissions, are recorded in detail and trigger security alarms. The final storage log, as an output field of this step, is explicitly passed to the "System Log" field of S610 for the system performance dynamic optimization module to analyze response latency and resource utilization. Simultaneously, this storage log provides data access trajectory support for the multi-turn dialogue context management module, ensuring the security and traceability of psychological counseling data.

[0056] Step S600 includes at least steps S610-S630: S610: Monitor response latency data in the system log, perform resource load analysis, and obtain real-time performance indicators; This step uses the final storage log output by the S530 as input "system log". Specifically, the system log includes the storage path of the dialogue data, write timestamps, storage node status, access permission settings, and related security event records. The system first collects and parses the system log in real time, using a log parsing engine to extract key fields from the storage log in a structured manner, forming a standardized log data stream. Further, the system calls the latency monitoring module, comparing the dialogue request timestamp with the response completion time to calculate response latency indicators, covering data processing latency, encryption / decryption time, and storage write latency. The latency monitoring module, combined with distributed tracing technology, can track the time consumption of requests at each processing node in a fine-grained manner, locating performance bottlenecks. To achieve resource load analysis, the system extracts indicators such as CPU utilization, memory usage, network bandwidth, and I / O throughput of storage nodes from the system log, combining them with real-time monitoring data to generate a resource utilization report. The resource load analysis module uses a multi-dimensional data fusion algorithm to normalize various indicators and, combined with time series analysis, identifies peak and trough patterns and abnormal fluctuations in resource usage. The system further incorporates a machine learning anomaly detection model to identify abnormal patterns in real-time performance data and automatically identify potential risk points that may lead to response delays. The real-time performance metrics are output as a comprehensive performance score and a detailed set of metrics, covering response latency, system throughput, resource utilization, and anomaly event statistics. These real-time performance metrics, as output fields of this step, are explicitly passed to the "tuning parameters" field of the S620 for use by the parallel computing resource configuration module. Simultaneously, these performance metrics provide dynamic feedback on the overall system operating status, supporting the formulation and execution of subsequent optimization strategies.

[0057] S620: Extract model computational bottlenecks from tuning parameters, configure parallel computing resources, and generate optimization strategy files; This step uses the real-time performance metrics output by the S610 as input "tuning parameters." Specifically, these parameters include response latency data, resource utilization reports, and anomaly detection results. The system first identifies bottlenecks based on these parameters, employing a combination of rule-based threshold judgment and machine learning prediction to analyze the load, task queue length, and processing rate of each computing node. The bottleneck identification module is refined to the model inference level, using the computational graph structure of the deep learning model to locate computationally intensive operations and memory access hotspots, identifying key factors causing response latency. Further, the system invokes the resource scheduling engine to formulate a parallel computing resource allocation scheme based on the identified bottleneck nodes, current system resource configuration, and task priorities. This resource allocation scheme includes dynamic allocation of computing units (CPU, GPU, TPU, etc.), task splitting and load balancing strategies, and memory caching optimization measures. The system uses containerization and virtualization technologies to achieve elastic scaling of computing resources, supporting demand-based resource scheduling and multi-task parallel execution. To improve computational efficiency, the system introduces an asynchronous task scheduling mechanism and a pipelined processing architecture to reduce computation waiting time and data transmission latency. During the optimization strategy generation process, the system combines historical performance data with current load trends, and uses reinforcement learning algorithms to continuously adjust resource allocation strategies, improving the response speed and stability of model inference. The generated optimization strategy file includes a resource allocation plan, task priority list, computing node configuration, and scheduling rules, stored in a standardized configuration format for easy access by other system modules. This optimization strategy file, as an output field of this step, is explicitly passed to the "strategy instruction" field of the S630 for use by the dynamic parameter injection module. Simultaneously, this strategy file provides a decision-making basis for the system performance dynamic optimization module, enabling efficient management and optimization of system computing resources.

[0058] S630: Dynamically inject parameters into policy instructions to generate updated system configuration; This step uses the optimization strategy file output by the S620 as input "strategy instructions." Specifically, these strategy instructions include a computing resource allocation scheme, task scheduling rules, and model parameter adjustment suggestions. The system first parses the strategy instructions, extracting key configuration parameters, including the computing node resource allocation ratio, the number of model inference threads, memory cache size, and parallel execution strategy. Further, the system calls the configuration management module to map the extracted parameters to the system runtime configuration file, employing a hierarchical configuration management system that supports incremental updates and rollback operations. The dynamic parameter injection process is implemented through a configuration interface, specifically including a hot update mechanism and a parameter synchronization mechanism, ensuring configuration changes are completed without interrupting system services. The system automatically verifies the dependencies between configuration parameters of different sub-modules to avoid parameter conflicts and configuration inconsistencies, ensuring system stability and consistency. During parameter injection, the system monitors the application effect of configuration changes in real time, combines performance monitoring data to verify the execution effect of the optimization strategy, and triggers strategy adjustments or rollbacks when necessary. The updated system configuration includes a new resource allocation scheme, task scheduling parameters, and model execution environment settings, forming a unified configuration data package that supports invocation and synchronization by various system modules. The system configuration is explicitly passed to the "Runtime Configuration" field of S110 as an output field of this step, for use by the consultation input receiving and preprocessing module. At the same time, this configuration provides continuous operating parameter support for the system performance dynamic optimization module, promoting the dynamic improvement of the overall system performance and the optimization of response capabilities.

[0059] Example 2: Figure 2 A structural block diagram of an intelligent psychological counseling system according to an embodiment of the present invention is shown. Figure 2 As shown, the structure may include: Installation module 01 is used to acquire and install / limit the intelligent tutoring terminal device. Specifically, it receives hardware information and software version from the intelligent tutoring terminal device, performs device identification and installation verification according to preset device compatibility standards to ensure that the intelligent tutoring terminal device meets the installation conditions; completes the physical connection and software environment configuration of the device to form device limitation information; the device limitation information is recorded as a device status field and maintains a consistent association with the device configuration strategy; the device status field is transmitted to the acquisition module as device status input, while the installation log is retained for subsequent installation process traceability.

[0060] The data acquisition module 02 is used to collect psychological state data of high-risk occupational groups and preprocess it within a preset collection range, outputting preprocessed emotional data. Specifically, it receives device status input from the installation module and real-time psychological state data of high-risk occupational groups, performs data filtering and preprocessing according to the collection strategy and data quality standards to form preprocessed emotional data; the preprocessed emotional data is passed as an emotional data field to the physiological parameter acquisition module for use, and the corresponding collection time information is registered in the data buffer for the alignment module to read.

[0061] The physiological parameter acquisition module 03 is used to collect physiological parameter data from high-risk occupational groups and perform standardized processing to output standardized physiological data. Specifically, it receives emotional data fields from the acquisition module, combines them with the physiological parameter inputs of high-risk occupational groups to perform data acquisition and standardization processing, and generates standardized physiological data according to physiological data standards. The standardized physiological data is then passed to the alignment module as physiological data fields and the correspondence between the data and the standardized parameters is recorded in the physiological data storage object.

[0062] Alignment module 04 is used to perform time synchronization alignment between preprocessed emotional data and standardized physiological data, and output a time synchronization sequence. Specifically, it performs time synchronization alignment processing based on the emotional data fields from the acquisition module and the physiological data fields from the physiological parameter acquisition module to generate a time synchronization sequence; the time synchronization sequence is output to the judgment module as a time sequence input to ensure the temporal consistency of the sequence, and the synchronization status information is recorded in the synchronization log.

[0063] The judgment module 05 is used to judge stress events based on the emotion recognition model and behavior judgment rules, and output psychological intervention control instructions. Specifically, it receives time series input and emotion recognition model parameters from the alignment module, performs stress event recognition and judgment processing according to the behavior judgment rules, generates psychological intervention control instructions, outputs the psychological intervention control instructions to the output module as intervention instruction fields, and registers the correspondence between the psychological intervention control instructions and the judgment rules in the judgment result storage object.

[0064] Output module 06 is used to output psychological intervention control commands to the intelligent counseling terminal to complete the presentation of psychological counseling content. Specifically, based on the intervention command field from the judgment module, it completes the generation and presentation processing of psychological counseling content, generating a counseling content configuration object; the counseling content configuration object is output to the intelligent counseling terminal interface to complete the display of counseling content, and the presentation status information is sent back to the record update module for registration.

[0065] The record update module 07 is used to record the implementation status and time information of psychological counseling and update the emotion recognition parameters. Specifically, it receives the presentation status information from the output module and the emotion recognition parameters from other modules, performs counseling implementation status recording and counseling time information update to obtain the updated record object; the updated record object is provided to the installation module as a status record field to maintain an index relationship consistent with the time series and ensure the integrity and traceability of the records.

Claims

1. An intelligent psychological counseling method, characterized in that, include: Obtain user text / voice input and perform format standardization processing, including character set unification, punctuation standardization, capitalization, and special symbol filtering; Noise filtering includes removing meaningless stop words and eliminating grammatical and spelling errors; sentence segmentation processing uses a rule-based and machine learning-based sentence segmentation algorithm to identify sentence boundaries and generate structured dialogue units. Based on the BERT emotion perception module, implicit emotions are identified and an emotion intensity matrix is ​​generated. The emotion intensity vector is calculated through an improved attention weight mechanism, domain-specific keywords are extracted and mapped to domain professional terms, similarity matching is performed with a pre-built domain professional terminology library, and emotion recognition results are generated by combining emotion dimension classification based on a multi-task learning framework. Based on a pre-built CBT intervention framework for high-pressure environments, combined with a stress management and emotion regulation strategy library, an initial response strategy is generated, and the psychological intervention logic is validated, including the timing of instruction execution, intervention intensity assessment, and potential risk analysis. Natural language generation processing adopts an NLG model based on the Transformer architecture to generate the final counseling response. The system associates the current response with historical dialogues, performs contextual analysis, calculates cosine similarity using a semantic embedding-based similarity calculation method, and uses a memory network to perform read and write operations using a dynamic memory unit structure. It then encapsulates and generates a complete dialogue record, including dialogue round number, timestamp, emotion tag, and strategy identifier. AES-256 key negotiation is performed using the Diffie-Hellman key exchange protocol, and end-to-end data encryption is performed using AES-256-GCM mode encryption and authentication. Secure storage paths are dynamically allocated, and final storage logs are generated. Collect response latency data from the final storage log, perform resource load analysis and parallel computing resource configuration, and generate an updated system configuration.

2. The intelligent psychological counseling method according to claim 1, characterized in that, The steps for identifying implicit emotions and generating an emotion intensity matrix based on the BERT emotion perception module include: The text in the input structured dialogue unit is segmented into words. The word fragmentation algorithm is used to split the text into sub-word units. Then, the sub-word units are converted into vector representations through an embedding layer and the contextual bidirectional information is fused. A multi-layer Transformer encoder is used to perform self-attention mechanism calculations on sequences to capture potential emotional cues and semantic dependencies in the text. An emotion trigger word weighting adjustment mechanism is introduced, which dynamically weights attention based on emotion cue tags to enhance sensitivity to hidden emotions; Output a multidimensional emotion intensity vector, which covers the intensity scores of various psychological states such as anger, anxiety, depression, and tension, forming an emotion intensity matrix.

3. The intelligent psychological counseling method according to claim 1, characterized in that, The steps for extracting domain-specific keywords and mapping them to domain-specific terminology include: Regular expressions and custom dictionaries are used to match key terms in a specific domain. At the same time, the TF-IDF algorithm is combined to calculate the weights of high-frequency and distinctive words in the text and filter out potential keywords. The extracted keywords are matched with a pre-built domain terminology database. The mapping process uses a vector space model to calculate the similarity between the keywords and the entries in the terminology database. Keywords that exceed the similarity threshold are replaced with standardized domain terms. A contextual semantic disambiguation algorithm is used for polysemous and ambiguous words. Based on syntactic structure and historical dialogue context, the algorithm determines the accurate meaning of keywords and automatically removes non-core words that are irrelevant to the current psychological counseling.

4. The intelligent psychological counseling method according to claim 1, characterized in that, The steps involved in sentiment dimension classification based on a multi-task learning framework include: A sentiment dimension classification model is used to determine the multi-level sentiment labels of the keyword set, integrating lexical sentiment tendency analysis and contextual semantic understanding; The model input is embedded with word vectors, combined with the weight scores of domain keywords and the corresponding sentiment dimension labels, and local sentiment features are extracted using a convolutional neural network. At the same time, a long short-term memory network is used to capture the sequence dependence and sentiment transition between keywords. By integrating the emotion weights in the emotion intensity matrix and dynamically adjusting the classification weights, the ability to identify subtle emotional changes is enhanced. By introducing a knowledge base of psychology experts and combining it with the emotion classification criteria in cognitive behavioral therapy, the division of emotional dimensions is optimized.

5. The intelligent psychological counseling method according to claim 1, characterized in that, Based on a pre-built CBT intervention framework for high-pressure environments, combined with a stress management and emotion regulation strategy library, the steps for generating initial response strategies include: The emotion recognition results are analyzed in multiple dimensions. The current psychological load and emotion fluctuation level are determined based on the emotion category and intensity. Combined with the high-stress task environment parameters and historical dialogue context, applicable CBT intervention strategies are selected. Based on the confidence score of emotion recognition, adjust the strategy priority and response intensity; It adopts a hybrid reasoning mechanism that combines a rule engine and a machine learning model. The rule engine quickly locates the coping solution based on predefined sentiment-policy mapping rules, while the machine learning model is trained on historical data to optimize the accuracy and personalization of policy matching. An integrated abnormal emotion detection mechanism is used to trigger multiple rounds of strategy verification and supplementary analysis for inputs with low confidence or drastic emotional fluctuations.

6. The intelligent psychological counseling method according to claim 1, characterized in that, The steps for performing logical verification of psychological intervention include: Analyze the stress management instructions in the strategy data to extract key intervention operations and execution conditions; The psychological intervention logic verification module is invoked to conduct compliance and security reviews of the extracted stress management instructions, including judgment of the timing of instruction execution, assessment of intervention intensity, and analysis of potential risks. The validation process is based on professional mental health management standards and cognitive behavioral therapy guidelines, and dynamically adjusts the intervention plan by taking into account the task urgency of high-risk occupational groups and their historical psychological intervention records. The mechanism combines rule-driven and simulation-based reasoning. The rule-driven part uses an expert knowledge base to ensure that intervention instructions comply with psychological ethics and operational safety, while the simulation-based reasoning part uses a virtual psychological model to predict the intervention effect and possible side effects.

7. The intelligent psychological counseling method according to claim 1, characterized in that, The steps involved in natural language generation processing using an NLG model based on the Transformer architecture include: Semantic analysis and structured information extraction are performed on the compliance response content to clarify the semantic hierarchy and logical relationships of intervention measures, implementation steps, and psychological support statements; A deep learning-based natural language generation model is used to convert structured intervention information into text responses that conform to the communication habits and psychological counseling styles of high-risk occupation groups; Based on contextual information and historical dialogue records, dynamically adjust the tone, word choice, and sentence structure of statements; An emotion adaptation mechanism is introduced to adjust the temperature parameters of language based on the intensity and category of the input emotion, and to appropriately control the positivity or soothingness of the response.

8. The intelligent psychological counseling method according to claim 1, characterized in that, The expression for generating an emotion intensity matrix based on the BERT emotion perception module to identify implicit emotions includes: Data to be analyzed is obtained from structured dialogue units, and implicit emotion recognition is performed through the BERT sentiment perception module; the input data includes text content, semantic tags and timestamp information; An improved attention weighting mechanism is employed to enhance the capture capability of emotion trigger words. The emotion intensity vector is calculated using this improved attention weighting mechanism. The definition of emotion intensity vector calculation is as follows: ; in, For the first Emotional intensity For the first in the input sequence The position index of each word To improve attention weights, The total number of words in the input text sequence. For the emotion classification weight matrix, The first output of BERT Word vectors, This is a bias term for the emotion category; Furthermore, we perform domain-specific keyword extraction and domain-specific terminology mapping, and use similarity matching with a pre-built domain-specific terminology database to define an improved cosine similarity calculation: ; in, For the first Similarity score of candidate words This serves as an index for candidate keywords. Indexed by word vector dimension, The total dimension of the word vectors. For the candidate keyword vector, the first... dimensional components, For the domain terminology library vector number dimensional components, These are the TF-IDF weighting coefficients. For the first The term frequency-inverse document frequency value of each word; High-intensity emotional vocabulary vectors and domain-specific terminology vector Input: Keyword similarity score Generate a set of domain keywords.

9. The intelligent psychological counseling method according to claim 1, characterized in that, The expressions that generate the final coaching response include: Receive the emotion dimension classification results, invoke the CBT intervention framework for high-pressure environments to generate an initial response strategy, and define the strategy priority function: ; in, For the first Priority scoring of each strategy For the index of the response strategy, For the Sigmoid function, For weight parameters, The degree of match between the strategy and the current sentiment. To ensure the compatibility of strategies with the task environment, Use a frequency decay factor for strategy history; Furthermore, in the strategy data verification phase, an improved logical consistency scoring mechanism is adopted, and a verification function is defined: ;in, For the first Verification score of each instruction. For the index of policy instructions, To verify the total number of rules, To verify the rule index, For the policy loss function, the first... The partial derivatives of each parameter, where ReLU is the corrected linear unit function. For rule matching degree, The activation threshold; Furthermore, by optimizing natural language generation through an improved temperature parameter adjustment mechanism, dynamic temperature calculation is defined: ; in, Generate temperature parameters for natural language. To index the steps, As the reference temperature, The attenuation coefficient is... For the first Sentiment-like weights, This represents the intensity of the emotion. The final coaching response is generated through exponential decay adjustment.

10. An intelligent psychological counseling system, applied to the method of any one of claims 1-9, characterized in that, include: The installation module is used to acquire intelligent tutoring terminal devices and complete their installation and limitations. The data acquisition module is used to collect psychological state data of high-risk occupational groups, preprocess the data within a preset collection range, and output preprocessed emotional data. The physiological parameter acquisition module is used to collect physiological parameter data of high-risk occupational groups, perform standardized processing, and output standardized physiological data; The alignment module is used to time-synchronize and align preprocessed emotional data with standardized physiological data, and output a time-synchronized sequence. The judgment module is used to judge stress events based on emotion recognition models and behavior judgment rules, and output psychological intervention and control instructions. The output module is used to output psychological intervention control commands to the intelligent counseling terminal to complete the presentation of psychological counseling content. The record update module is used to record the implementation status and time information of psychological counseling and update the emotion recognition parameters.