Psychological counseling intelligent recommendation method and system based on artificial intelligence
Through multimodal data processing and factor decomposition machine model, the shortcomings of shallow sentiment classification in the psychological counseling intelligent recommendation system are solved, and the accurate capture and personalized recommendation of complex emotions and cognitive behavioral characteristics are achieved.
Patent Information
- Application Number
- CN202510806078.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-09-26
AI Technical Summary
Existing intelligent recommendation systems for psychological counseling rely too much on shallow keyword extraction and sentiment classification, making it difficult to accurately capture the interaction between complex emotions and cognitive behavioral characteristics.
By collecting multimodal psychological data, generating user state vectors, constructing emotional axis space and syntactic structure, calculating three-dimensional emotional vectors, using tensor outer product to construct psychological semantic tensors, combined with factor decomposition machine models, predicting matching scores, generating recommended content, and displaying it through a visual interface.
It improves the granularity and accuracy of emotion representation, improves the accuracy of matching intentions and resources, enhances the personalization and accuracy of the recommendation system, and strengthens user trust.
Smart Images

Figure CN120708929A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the cross-technical field of psychological counseling, and in particular to an artificial intelligence-based intelligent recommendation method and system for psychological counseling. Background Art
[0002] With the rapid development of artificial intelligence and natural language processing technologies, mental health intervention systems have gradually evolved from traditional manual consultation models to digital and intelligent ones. More and more studies are trying to explore users' psychological states through multimodal data, including text, voice, physiological data, etc., and use semantic modeling, emotion recognition, graph neural networks and recommendation systems to achieve personalized psychological service recommendations.
[0003] Existing technologies still have shortcomings in the field of intelligent recommendation for psychological counseling. Current psychological recommendations rely too much on shallow keyword extraction and sentiment classification, lack a deep understanding of psychological semantics and syntactic structures, and find it difficult to accurately capture the interaction between complex emotions and cognitive behavioral characteristics. Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides an artificial intelligence-based intelligent recommendation method and system for psychological counseling to solve the problem that current psychological recommendations rely too much on shallow keyword extraction and sentiment classification, lack a deep understanding of psychological semantics and syntactic structure, and have difficulty in accurately capturing the interaction between complex emotions and cognitive behavioral characteristics.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides an artificial intelligence-based psychological consultation intelligent recommendation method, which comprises:
[0008] Collect multimodal psychological data, generate user state vectors, segment text into sentences, construct an emotional axis space, perform dependency parsing on sentences, generate syntactic structures, calculate three-dimensional emotional vectors based on the emotional axis space and syntactic structure, construct a psychological semantic tensor using tensor outer products, generate a user intent tensor using prototype weights, and perform flattening operations to obtain the final intent vector;
[0009] Collect psychological intervention resource data, generate resource label vectors and intent label vectors, calculate semantic gravity strength, generate the final resource vector, perform vector segmentation on the final intent vector and resource vector, define intent and resource sub-blocks as intent and resource nodes, respectively, calculate the structural potential deviation between semantic potential and resource nodes, calculate the spectral distance between resource spectrum vectors and reference spectrum vectors, and construct a matching factor tensor by combining the structural potential deviation and spectral distance.
[0010] Build a factorization machine model, predict matching scores, generate a prediction score matrix, use the Top-K selection method to filter, generate recommended content, and build a visual interface to display the recommended content;
[0011] The multimodal psychological data includes psychological text, click volume, dwell time and page jump data.
[0012] As a preferred solution of the artificial intelligence-based psychological counseling intelligent recommendation method of the present invention, wherein: the use of tensor outer product to construct a psychological semantic tensor, performing a flattening operation to obtain the final intention vector includes:
[0013] Use the pre-trained BERT model to perform semantic analysis on psychological text and generate semantic vectors. Construct behavior vectors based on click volume, dwell time, and page jumps. Use principal component analysis to reduce the semantic and behavior vectors to a unified dimension, perform feature concatenation, and generate user state vectors.
[0014] Use the NLTK Punkt tokenizer to segment the text into sentences. Load the NRC sentiment lexicon and WordNet-Affect to construct a sentiment axis space. Use Stanford CoreNLP to perform dependency parsing on each sentence and generate a syntactic structure. Based on the sentiment axis space and syntactic structure, calculate a three-dimensional sentiment vector. Use principal component analysis to reduce the dimensionality of the three-dimensional sentiment vector to a uniform dimension of the semantic vector. Use tensor outer product to construct a psychological semantic tensor. Aggregate the psychological semantic tensors of all sentences to generate a global user psychological semantic tensor.
[0015] Collect labeled historical multimodal psychological data and perform denoising and normalization processing to construct a historical psychological semantic tensor. Use the K-means clustering algorithm to cluster the historical psychological semantic tensor and generate m cluster centers, corresponding to a prototype tensor.
[0016] Calculate the Frobenius norm distance between the user's global psychological semantic tensor and each prototype tensor, use the Top-K selection method to select the top K prototype tensors with the smallest distance as the user intention set, use the softmax function to convert the Frobenius norm distances corresponding to the K prototype tensors in the user intention set into prototype weights, use the prototype weights to generate the user intention tensor, use tensor flattening to flatten the user intention tensor to obtain a flattened vector, use L1 regularization optimization on the flattened vector to generate the intent vector, use proximal gradient descent to solve, and obtain the final intent vector.
[0017] As a preferred solution of the artificial intelligence-based psychological counseling intelligent recommendation method of the present invention, the calculation of semantic gravity strength to generate the final resource vector includes:
[0018] We collected psychological intervention resource data from the public PsyQA dataset, including text, speech, and metadata. We used Whisper to transcribe the speech into text to generate a psychological intervention resource dataset. We used the pre-trained BERT model to extract semantic embeddings from the dataset and generate resource vectors. We then used principal component analysis to reduce the dimensionality of the resource vectors to the uniform dimensions of the final intent vectors.
[0019] Extract labels and attributes from metadata and use data conversion to splice them into resource text. Use the pre-trained BERT model to perform semantic analysis on the resource text to generate an attribute vector. Use a linear layer to map the attribute vector to an m-dimensional label space to generate a resource label vector. Use a linear layer to map the final intent vector to an m-dimensional label space to generate an intent label vector. Based on the resource label vector and the intent label vector, calculate the semantic gravity strength. Use the gravity strength to weight each final intent vector to obtain a weighted resource vector, which is then normalized to generate the final resource vector.
[0020] As a preferred solution of the artificial intelligence-based psychological counseling intelligent recommendation method of the present invention, wherein: the combination of structural potential energy deviation and spectral distance to construct a matching factor tensor includes:
[0021] Use the vector block method to split the final intent vector and resource vector respectively, generate intent and resource sub-blocks, define the intent and resource sub-blocks as intent and resource nodes respectively, calculate the semantic potential of the intent node, calculate the intent node edge and resource node edge respectively, construct the semantic phase diagram and resource genealogy diagram, and use the graph structure matrix construction method to construct the adjacency matrix.
[0022] Calculate the sum of each row in the adjacency matrix to obtain the degree matrix. Subtract the adjacency matrix from the degree matrix to generate the Laplace matrix. Decompose it using the eigenvalue decomposition method to obtain the decomposition results, including eigenvalues and corresponding eigenvectors. Sort the decomposition results in ascending order, select the smallest G eigenvalues, and concatenate the corresponding eigenvectors to obtain the resource spectrum vector.
[0023] Based on the semantic phase diagram, the mean of the intention node edge is calculated as the reference feature, and the reference feature is mapped to the reference spectrum vector using linear mapping. The structural potential deviation between the semantic potential and the resource node is calculated, and the spectral distance between the resource spectrum vector and the reference spectrum vector is calculated.
[0024] Collect user historical feedback scores, combine structural potential deviation and spectral distance, and construct a matching factor tensor.
[0025] As a preferred solution of the artificial intelligence-based psychological counseling intelligent recommendation method of the present invention, the step of constructing a factor decomposition machine model, predicting matching scores, and generating a prediction score matrix includes:
[0026] Flatten the matching factor tensor and concatenate it with the final intent vector and resource vector to form a fused feature vector;
[0027] Collect historical multimodal psychological data and generate historical fusion feature vectors as training sets;
[0028] Build a factorization machine model, train the factorization machine model using the training set, and use the Adam optimizer to iteratively optimize the factorization machine model parameters;
[0029] The fused feature vector is input into the trained factorization machine model to predict the matching score and generate the predicted score matrix.
[0030] As a preferred solution of the artificial intelligence-based psychological counseling intelligent recommendation method of the present invention, the Top-K selection method is used to screen and generate recommended content, including:
[0031] Use the Top-K selection method to select the top K resources with the highest scores from the prediction score matrix to obtain the Top-K recommended resource list for the final intent vector;
[0032] Aggregate all Top-K recommended resource lists, deduplicate them, sort them by priority, and generate recommended content.
[0033] As a preferred solution of the artificial intelligence-based psychological counseling intelligent recommendation method of the present invention, wherein: the construction of a visual interface to display recommended content includes:
[0034] Build a visual interface to analyze the recommended content and display it visually, allowing users who have passed real-name verification to view it.
[0035] In a second aspect, the present invention provides an artificial intelligence-based psychological counseling intelligent recommendation system, comprising:
[0036] The intent collection module is used to collect multimodal psychological data, generate a user state vector, segment the text into sentences, construct an emotional axis space, perform dependency parsing on the sentences, generate a syntactic structure, calculate a three-dimensional emotion vector based on the emotional axis space and syntactic structure, construct a psychological semantic tensor using tensor outer products, generate a user intent tensor using prototype weights, and perform a flattening operation to obtain the final intent vector;
[0037] The resource tensor module is used to collect psychological intervention resource data, generate resource label vectors and intent label vectors, calculate semantic gravity strength, generate the final resource vector, perform vector segmentation on the final intent vector and resource vector, define intent and resource sub-blocks as intent and resource nodes respectively, calculate the structural potential deviation between semantic potential and resource nodes, calculate the spectral distance between resource spectrum vectors and reference spectrum vectors, and construct a matching factor tensor by combining the structural potential deviation and spectral distance.
[0038] The scoring recommendation module is used to build a factorization machine model, predict matching scores, generate a prediction score matrix, use the Top-K selection method for screening, generate recommended content, and build a visual interface to display recommended content.
[0039] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the artificial intelligence-based psychological counseling intelligent recommendation method as described in the first aspect of the present invention.
[0040] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the artificial intelligence-based psychological counseling intelligent recommendation method as described in the first aspect of the present invention.
[0041] The beneficial effects of the present invention are as follows: the present invention improves the fine-grainedness and accuracy of emotion representation through emotion axis space and syntactic dependency parsing, improves the matching accuracy of intention and resources through the comprehensive calculation of semantic gravity strength and spectral distance, and enhances the expressive power of matching factor tensor through the fusion of structural potential energy deviation and spectral distance. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 This is a flow chart of the artificial intelligence-based psychological counseling intelligent recommendation method in Example 1.
[0044] Figure 2 Schematic diagram of the artificial intelligence-based psychological counseling intelligent recommendation system in Example 1. DETAILED DESCRIPTION
[0045] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0046] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0047] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.
[0048] Example 1, with reference to Figure 1 and Figure 2 , which is the first embodiment of the present invention, provides an artificial intelligence-based psychological consultation intelligent recommendation method, comprising the following steps:
[0049] S1. Collect multimodal psychological data, generate user state vectors, segment text into sentences, construct an emotional axis space, perform dependency parsing on sentences, generate syntactic structures, calculate three-dimensional emotional vectors based on the emotional axis space and syntactic structure, construct a psychological semantic tensor using tensor outer products, generate a user intent tensor using prototype weights, and perform flattening operations to obtain the final intent vector.
[0050] Specifically, we use the outer product of tensors to construct a psychological semantic tensor, perform a flattening operation, and obtain the final intent vector, including:
[0051] Collect multimodal psychological data through user interaction interfaces such as mobile applications, web pages, or smart devices, and perform denoising and normalization processing;
[0052] The multimodal psychological data includes psychological text, click volume, dwell time and page jump data;
[0053] Use the pre-trained BERT model to perform semantic analysis on the psychological text and generate a semantic vector. Then, combine the click volume, dwell time, and page jump number to construct a behavior vector. The formula is:
[0054]
[0055] in is the behavior vector, C and C max are the number of clicks and the historical maximum number of clicks, D avg and D maxand are the average residence time and the maximum residence time respectively, and J is the number of page jumps;
[0056] Use principal component analysis to reduce the semantic vector and behavior vector to a unified dimension, and perform feature concatenation to generate a user state vector;
[0057] Use the NLTK Punkt tokenizer to segment the text into sentences. Load the NRC sentiment lexicon, which contains words and their associated sentiment labels, such as positive, negative, angry, fearful, sad, and their intensity scores. Use WordNet-Affect to obtain sentiment-related vocabulary and its hierarchical classification, such as sentiment category and intensity, to construct the sentiment axis space. The formula is:
[0058] E={E val ,E ar , E dom},
[0059] Where E is the emotional axis space, E val ∈[-1, 1] is the value axis, which indicates the positive or negative nature of emotions, such as "happy" = 0.8, "worried" = -0.8, E ar ∈[0,1] is the arousal degree, which indicates the degree of excitement or calmness of the emotion, such as "excited" = 0.9, "calm" = 0.2, E dom ∈[0, 1] is the sense of control, which indicates the initiative or degree of control of emotions, such as "confidence" = 0.8, "helplessness" = 0.2;
[0060] Use Stanford CoreNLP to perform dependency parsing on each sentence, generate syntactic structure, identify the sentence's emotional words, verbs, adverbs, subjects, and modal particles, and calculate the three-dimensional emotional vector based on the emotional axis space and syntactic structure. The formula is:
[0061]
[0062] in For sentence s k The three-dimensional emotion vector, s k For the kth sentence, E val (s k ) is the average sentiment score of the sentiment words in the sentence, E ar (s k ) is the mean activation level of verbs and adverbs in the sentence, E dom (s k ) is the score for the sense of control of the subject initiative and modal particles in the sentence;
[0063] The three-dimensional emotion vector is reduced to a unified dimension of the semantic vector using principal component analysis, and the psychological semantic tensor is constructed using tensor outer product. The formula is:
[0064]
[0065] where Ψ k For sentence s k The psychosemantic tensor of For sentence s k The semantic vector of is the tensor outer product, is the sentence s after dimensionality reduction k 3D emotion vector of
[0066] Aggregate the psychological semantic tensors of all sentences to generate the user's global psychological semantic tensor. The formula is:
[0067]
[0068] where Ψ u is the user's global psychological semantic tensor, N is the number of sentences;
[0069] Collect labeled historical multimodal psychological data and perform denoising and normalization processing to construct a historical psychological semantic tensor. Use the K-means clustering algorithm to cluster the historical psychological semantic tensor and generate m cluster centers. Each cluster center refers to a standard intent category and corresponds to a prototype tensor.
[0070] Calculate the Frobenius norm distance between the user's global psychological semantic tensor and each prototype tensor. The formula is:
[0071] S i = / / Ψ u -Ψ (i) / / F ,
[0072] Among them S i is the Frobenius distance between the user's global psychological semantic tensor and the i-th prototype tensor, Ψ (i) is the tensor representation of the i-th intent prototype, ∥· / / F is the element-wise difference between tensors;
[0073] Use the Top-K selection method to select the top K prototype tensors with the smallest distance as the user intent set. The formula is:
[0074]
[0075] Among them I u is the user intention set, which contains K recent intention prototypes, where K is the number of choices;
[0076] Use the softmax function to convert the Frobenius norm distance corresponding to the K prototype tensors in the user intent set into prototype weights, and use the prototype weights to generate the user intent tensor. The formula is:
[0077]
[0078] in is the user intention tensor, ω i′ is the weight of the i′th prototype, S i′ is the Frobenius distance between the user's global psychological semantic tensor and the i′th prototype tensor in the user's intention set, S j is the Frobenius distance between the user's global psychological semantic tensor and the j-th prototype tensor in the user's intention set, Ψ (i′) is the prototype tensor of the i′th intention in the user intention set, α is the fusion weight, which is set using entropy weighting;
[0079] Use tensor flattening to flatten the user intent tensor to obtain a flattened vector. The formula is:
[0080]
[0081] in To flatten a vector, flatten is to stretch the tensor into a vector;
[0082] Use L1 regularization optimization on the flattened vector to generate the intent vector. The formula is
[0083]
[0084] in is the intention vector, x is the optimization variable, which represents the target vector of the sparse projection, and λ is the regularization parameter, which is set using the network search algorithm;
[0085] Use proximal gradient descent to solve and obtain the final intention vector.
[0086] Through multimodal data fusion and PCA dimensionality reduction, the comprehensiveness and consistency of user psychological state representation are significantly improved. Through emotional axis space and syntactic dependency parsing, the granularity and accuracy of emotional representation are significantly improved. Through tensor outer product, the psychological semantic tensor can capture the interaction between semantic vectors and emotional vectors. Through high-dimensional tensor representation, the feature expression ability is improved. Through K-means clustering and Frobenius distance, the intent tensor can accurately match the user's psychological state with the standard intent category, improving the targetedness of the recommendation system. Through L1 regularization, the intent vector is sparse.
[0087] S2. Collect psychological intervention resource data, generate resource label vectors and intent label vectors, calculate semantic gravity strength, generate the final resource vector, perform vector segmentation on the final intent vector and resource vector, define the intent and resource sub-blocks as intent and resource nodes respectively, calculate the structural potential deviation between the semantic potential and resource nodes, calculate the spectral distance between the resource spectrum vector and the reference spectrum vector, and construct the matching factor tensor by combining the structural potential deviation and spectral distance;
[0088] Specifically, the semantic gravity strength is calculated to generate the final resource vector, including:
[0089] We collected psychological intervention resource data from the public PsyQA dataset, including text, speech, and metadata. We used Whisper to transcribe the speech into text to generate a psychological intervention resource dataset. We used the pre-trained BERT model to extract semantic embeddings from the dataset and generate resource vectors. We then used principal component analysis to reduce the dimensionality of the resource vectors to the uniform dimensions of the final intent vectors.
[0090] Extract labels and attributes from metadata and use data conversion to splice them into resource text. Use the pre-trained BERT model to perform semantic analysis on the resource text to generate attribute vectors. Use the linear layer to map the attribute vectors to the m-dimensional label space to generate the resource label vector. The formula is:
[0091]
[0092] in For resources j′ The resource label vector, σ is the sigmoid function, r j′ is the j′th psychological intervention resource, representing the psychological intervention resource data, is the j′th attribute vector, W tin and b tin are the weight matrix and bias vector of resource label mapping, respectively, using standard random initialization settings, and m is the number of label categories;
[0093] Use a linear layer to map the final intent vector to the m-dimensional label space to generate the intent label vector. The formula is:
[0094]
[0095] in is the intent label vector of the final intent vector, is the final intention vector, W tob and bt ob are the weight matrix and bias vector for user intent label mapping, respectively, using standard random initialization settings;
[0096] Based on the resource tag vector and the intent tag vector, the semantic gravity strength is calculated using the formula:
[0097]
[0098] Among them G uj′ is the semantic attraction strength of the final intention vector to the psychological intervention resource, is the resource vector after dimensionality reduction, 6 is the Gaussian kernel, set using the data-driven method, is the psychological scoring function, a constant to prevent division by zero;
[0099] Use gravity strength to perform weighted operation on each final intention vector to obtain a weighted resource vector, and then perform normalization to generate the final resource vector. The formula is:
[0100]
[0101] in is the weighted resource vector, and M is the number of psychological intervention resources.
[0102] Through the strength of semantic gravity, the resource vector can be dynamically adjusted according to the user's intention, so that the final resource vector is better aligned with the user's deep psychological needs, significantly improving the pertinence of resource representation. Through the semantic phase diagram and resource genealogy diagram, the semantic accuracy of recommendation is enhanced. Through the joint adjustment of distance and preference, the final resource vector is guided to shift in the direction of user intention to bridge the gap of "strong intention". Figure 1 Weak resources" or "weak intention Figure 1 The semantic void of "strong resources" is eliminated to enhance the matching accuracy.
[0103] Furthermore, the structural potential energy deviation and spectral distance are combined to construct the matching factor tensor, including:
[0104] Use the block method to set a uniform number of divisions, defined as the number of sub-blocks. Split the final intent vector and resource vector according to the number of sub-blocks to generate intent and resource sub-blocks. Define the intent and resource sub-blocks as intent and resource nodes, respectively.
[0105] Calculate the semantic potential energy of the intent node using the formula:
[0106]
[0107] in Intent Node The semantic potential of ,γ is the adaptive parameter of the potential function, which is set using the median heuristic;
[0108] Calculate the intention node edge and resource node edge respectively, and construct the semantic phase diagram and resource genealogy diagram. The formula is:
[0109]
[0110] Among them elh and e pq They are intention node edges and resource node edges respectively. snort are the lth and hth intention nodes respectively, and The p-th and q-th resource nodes are based on the resource lineage graph respectively;
[0111] Use the graph structure matrix construction method to construct the adjacency matrix. The formula is:
[0112]
[0113] Among them A z [p, q] is the element of the adjacency matrix, θ is the adaptive parameter of the adjacency matrix, and is set using the median heuristic;
[0114] Calculate the sum of each row in the adjacency matrix to obtain the degree matrix. Subtract the adjacency matrix from the degree matrix to generate a Laplace matrix. Decompose it using the eigenvalue decomposition method to obtain the decomposition results, including eigenvalues and corresponding eigenvectors. Sort the decomposition results in ascending order. Use the fixed threshold method to set the screening number G, screen the smallest G eigenvalues, and splice the corresponding eigenvectors to obtain the resource spectrum vector.
[0115] Based on the semantic phase diagram, the mean of the intention node edge is calculated as the reference feature, and the reference feature is mapped to the reference spectrum vector using linear mapping. The formula is:
[0116]
[0117] in is the reference spectrum vector, W e and b e are the weight matrix and bias vector mapped to the reference spectrum vector, respectively, using pre-training initialization settings, is the reference feature;
[0118] Calculate the structural potential deviation between semantic potential and resource nodes using the formula:
[0119]
[0120] Among them SP Duz is the structural potential deviation between the semantic potential and the resource node, d is the number of sub-blocks, P Intent Node The semantic potential of is the k′th resource node;
[0121] Calculate the spectral distance between the resource spectrum vector and the reference spectrum vector using the formula:
[0122]
[0123] Among them S Duz is the spectral distance between the resource spectrum vector and the reference spectrum vector, is the l′th resource spectrum vector, is the l′th reference spectrum vector, G is the number of screening;
[0124] Collect historical user feedback scores, for example, 1 to 5, and combine the structural potential deviation and spectral distance to construct a matching factor tensor. The formula is:
[0125]
[0126] Among them, M uz is the matching factor between the final intent vector and resource vector, F uz Score user historical feedback, is the feedback weight, which is set using the empirical adjustment method.
[0127] Constructing a multi-granularity graph structure expression method to achieve structured representation of long vectors, enabling the system to transition from "overall matching" to "partial coupling" recognition. Each sub-block represents a semantic sub-topic or psychological sub-tendency, which helps to identify complex psychological states, reduce dimensional redundancy, and is conducive to building sparse graph structures, improving the efficiency of subsequent spectrograms. The potential energy function is used to construct the potential energy of semantic nodes, calculate the structural deviation between them and resource nodes, and quantify the energy dissipation of "psychological intention projected to resources". It can identify the matching bottleneck of "resource redundancy but inefficiency" and guide resource allocation optimization. The spectral method can capture the global characteristics of the structure, surpassing point-to-point semantic matching, and using tensor structures to simultaneously retain the three dimensions of semantics, structure and behavioral feedback to form a highly expressive matching benchmark, improve the interpretability and traceability of psychological intervention recommendations, enhance user trust, and significantly improve the personalization and accuracy of recommendations through the dynamic balance of feedback and structural characteristics.
[0128] S3. Build a factorization machine model, predict matching scores, generate a prediction score matrix, use the Top-K selection method to filter, generate recommended content, and build a visual interface to display the recommended content.
[0129] Specifically, we build a factorization machine model, predict matching scores, and generate a prediction score matrix, including:
[0130] Flatten the matching factor tensor and concatenate it with the final intent vector and resource vector to form a fused feature vector;
[0131] Collect historical multimodal psychological data and generate historical fusion feature vectors as training sets;
[0132] Build a factorization machine model, train the factorization machine model using the training set, and use the Adam optimizer to iteratively optimize the factorization machine model parameters;
[0133] The fused feature vector is input into the trained factorization machine model to predict the matching score and generate the predicted score matrix.
[0134] FM can automatically learn the second-order feature interactions between intent and resources, avoiding the manual design of combined features. The fusion feature structure design provides expansion space for the subsequent addition of behavioral features, reduces the risk of overfitting, and demonstrates excellent generalization ability in deep psychological models.
[0135] Furthermore, we use the Top-K selection method to filter and generate recommended content, including:
[0136] Use the Top-K selection method to select the top K resources with the highest scores from the prediction score matrix to obtain the Top-K recommended resource list for the final intent vector;
[0137] Aggregate all Top-K recommended resource lists, deduplicate them, sort them by priority, and generate recommended content.
[0138] The Top-K method does not require complex sorting algorithms and is suitable for large-scale recommendation tasks. It dynamically controls the recommendation range by setting the K value and can be adaptively adjusted according to scenario requirements, avoiding displaying large amounts of information to users and improving acceptability and operational efficiency.
[0139] Going further, we build a visual interface to display recommended content, including:
[0140] Build a visual interface to analyze the recommended content and display it visually, allowing users who have passed real-name verification to view it.
[0141] The recommendation reasons, resource content and label vectors are presented intuitively in the form of charts to enhance the transparency of the recommendation results. Psychological counselors can use this interface to understand the model recommendation results and scoring basis to achieve "human-machine collaborative recommendation". The recommendation results can be recorded in the individual user's psychological growth file to assist in long-term psychological development analysis.
[0142] This embodiment also provides an artificial intelligence-based psychological counseling intelligent recommendation system, including:
[0143] The intent collection module is used to collect multimodal psychological data, generate a user state vector, segment the text into sentences, construct an emotional axis space, perform dependency parsing on the sentences, generate a syntactic structure, calculate a three-dimensional emotion vector based on the emotional axis space and syntactic structure, construct a psychological semantic tensor using tensor outer products, generate a user intent tensor using prototype weights, and perform a flattening operation to obtain the final intent vector;
[0144] The resource tensor module is used to collect psychological intervention resource data, generate resource label vectors and intent label vectors, calculate semantic gravity strength, generate the final resource vector, perform vector segmentation on the final intent vector and resource vector, define intent and resource sub-blocks as intent and resource nodes respectively, calculate the structural potential deviation between semantic potential and resource nodes, calculate the spectral distance between resource spectrum vectors and reference spectrum vectors, and construct a matching factor tensor by combining the structural potential deviation and spectral distance.
[0145] The scoring recommendation module is used to build a factorization machine model, predict matching scores, generate a prediction score matrix, use the Top-K selection method for screening, generate recommended content, and build a visual interface to display recommended content.
[0146] This embodiment also provides a computer device suitable for the case of an artificial intelligence-based intelligent recommendation method for psychological counseling, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement the artificial intelligence-based intelligent recommendation method for psychological counseling proposed in the above embodiment.
[0147] The computer device may be a terminal, comprising a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse.
[0148] This embodiment also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the artificial intelligence-based intelligent recommendation method for psychological counseling proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0149] In summary, the present invention improves the granularity and accuracy of emotion representation through emotion axis space and syntactic dependency parsing, improves the matching accuracy of intention and resources through the comprehensive calculation of semantic gravity strength and spectral distance, and enhances the expressive power of matching factor tensor through the fusion of structural potential deviation and spectral distance.
[0150] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. An artificial intelligence-based psychological counseling intelligent recommendation method, characterized by: include, Collect multimodal psychological data, generate user state vectors, segment text into sentences, construct an emotional axis space, perform dependency parsing on sentences, generate syntactic structures, calculate three-dimensional emotional vectors based on the emotional axis space and syntactic structure, construct a psychological semantic tensor using tensor outer products, generate a user intent tensor using prototype weights, and perform flattening operations to obtain the final intent vector; Collect psychological intervention resource data, generate resource label vectors and intent label vectors, calculate semantic gravity strength, generate the final resource vector, perform vector segmentation on the final intent vector and resource vector, define intent and resource sub-blocks as intent and resource nodes, respectively, calculate the structural potential deviation between semantic potential and resource nodes, calculate the spectral distance between resource spectrum vectors and reference spectrum vectors, and construct a matching factor tensor by combining the structural potential deviation and spectral distance. Build a factorization machine model, predict matching scores, generate a prediction score matrix, use the Top-K selection method to filter, generate recommended content, and build a visual interface to display the recommended content; The multimodal psychological data includes psychological text, click volume, dwell time and page jump data.
2. The artificial intelligence-based psychological counseling intelligent recommendation method according to claim 1, characterized in that: The psychological semantic tensor is constructed using the tensor outer product and flattened to obtain the final intent vector, including: Use the pre-trained BERT model to perform semantic analysis on psychological text and generate semantic vectors. Construct behavior vectors based on click volume, dwell time, and page jumps. Use principal component analysis to reduce the semantic and behavior vectors to a unified dimension, perform feature concatenation, and generate user state vectors. Use the NLTK Punkt tokenizer to segment the text into sentences. Load the NRC sentiment lexicon and WordNet-Affect to construct a sentiment axis space. Use Stanford CoreNLP to perform dependency parsing on each sentence and generate a syntactic structure. Based on the sentiment axis space and syntactic structure, calculate a three-dimensional sentiment vector. Use principal component analysis to reduce the dimensionality of the three-dimensional sentiment vector to a uniform dimension of the semantic vector. Use tensor outer product to construct a psychological semantic tensor. Aggregate the psychological semantic tensors of all sentences to generate a global user psychological semantic tensor. Collect labeled historical multimodal psychological data and perform denoising and normalization processing to construct a historical psychological semantic tensor. Use the K-means clustering algorithm to cluster the historical psychological semantic tensor and generate m cluster centers, corresponding to a prototype tensor. Calculate the Frobenius norm distance between the user's global psychological semantic tensor and each prototype tensor, use the Top-K selection method to select the top K prototype tensors with the smallest distance as the user intention set, use the softmax function to convert the Frobenius norm distances corresponding to the K prototype tensors in the user intention set into prototype weights, use the prototype weights to generate the user intention tensor, use tensor flattening to flatten the user intention tensor to obtain a flattened vector, use L1 regularization optimization on the flattened vector to generate the intent vector, use proximal gradient descent to solve, and obtain the final intent vector.
3. The artificial intelligence-based psychological counseling intelligent recommendation method according to claim 2, characterized in that: The calculation of semantic gravity strength to generate the final resource vector includes: We collected psychological intervention resource data from the public PsyQA dataset, including text, speech, and metadata. We used Whisper to transcribe the speech into text to generate a psychological intervention resource dataset. We used the pre-trained BERT model to extract semantic embeddings from the dataset and generate resource vectors. We then used principal component analysis to reduce the dimensionality of the resource vectors to the uniform dimensions of the final intent vectors. Extract labels and attributes from metadata and use data conversion to splice them into resource text. Use the pre-trained BERT model to perform semantic analysis on the resource text to generate an attribute vector. Use a linear layer to map the attribute vector to an m-dimensional label space to generate a resource label vector. Use a linear layer to map the final intent vector to an m-dimensional label space to generate an intent label vector. Based on the resource label vector and the intent label vector, calculate the semantic gravity strength. Use the gravity strength to weight each final intent vector to obtain a weighted resource vector, which is then normalized to generate the final resource vector.
4. The artificial intelligence-based psychological counseling intelligent recommendation method according to claim 3, characterized in that: The combination of structural potential energy deviation and spectral distance to construct a matching factor tensor includes: Use the vector block method to split the final intent vector and resource vector respectively, generate intent and resource sub-blocks, define the intent and resource sub-blocks as intent and resource nodes respectively, calculate the semantic potential of the intent node, calculate the intent node edge and resource node edge respectively, construct the semantic phase diagram and resource genealogy diagram, and use the graph structure matrix construction method to construct the adjacency matrix. Calculate the sum of each row in the adjacency matrix to obtain the degree matrix. Subtract the adjacency matrix from the degree matrix to generate the Laplace matrix. Decompose it using the eigenvalue decomposition method to obtain the decomposition results, including eigenvalues and corresponding eigenvectors. Sort the decomposition results in ascending order, select the smallest G eigenvalues, and concatenate the corresponding eigenvectors to obtain the resource spectrum vector. Based on the semantic phase diagram, the mean of the intention node edge is calculated as the reference feature, and the reference feature is mapped to the reference spectrum vector using linear mapping. The structural potential deviation between the semantic potential and the resource node is calculated, and the spectral distance between the resource spectrum vector and the reference spectrum vector is calculated. Collect user historical feedback scores, combine structural potential deviation and spectral distance, and construct a matching factor tensor.
5. The artificial intelligence-based psychological counseling intelligent recommendation method according to claim 4, characterized in that: The method of constructing a factorization machine model, predicting matching scores, and generating a prediction score matrix includes: Flatten the matching factor tensor and concatenate it with the final intent vector and resource vector to form a fused feature vector; Collect historical multimodal psychological data and generate historical fusion feature vectors as training sets; Build a factorization machine model, train the factorization machine model using the training set, and use the Adam optimizer to iteratively optimize the factorization machine model parameters; The fused feature vector is input into the trained factorization machine model to predict the matching score and generate the predicted score matrix.
6. The artificial intelligence-based psychological counseling intelligent recommendation method according to claim 5, characterized in that: The Top-K selection method is used to screen and generate recommended content, including: Use the Top-K selection method to select the top K resources with the highest scores from the prediction score matrix to obtain the Top-K recommended resource list for the final intent vector; Aggregate all Top-K recommended resource lists, deduplicate them, sort them by priority, and generate recommended content.
7. The artificial intelligence-based psychological counseling intelligent recommendation method according to claim 6, characterized in that: The construction of a visual interface to display recommended content includes: Build a visual interface to analyze the recommended content and display it visually, allowing users who have passed real-name verification to view it.
8. An artificial intelligence-based psychological counseling intelligent recommendation system, based on the artificial intelligence-based psychological counseling intelligent recommendation method according to any one of claims 1 to 7, characterized in that: include, The intent collection module is used to collect multimodal psychological data, generate a user state vector, segment the text into sentences, construct an emotional axis space, perform dependency parsing on the sentences, generate a syntactic structure, calculate a three-dimensional emotion vector based on the emotional axis space and syntactic structure, construct a psychological semantic tensor using tensor outer products, generate a user intent tensor using prototype weights, and perform a flattening operation to obtain the final intent vector; The resource tensor module is used to collect psychological intervention resource data, generate resource label vectors and intent label vectors, calculate semantic gravity strength, generate the final resource vector, perform vector segmentation on the final intent vector and resource vector, define intent and resource sub-blocks as intent and resource nodes respectively, calculate the structural potential deviation between semantic potential and resource nodes, calculate the spectral distance between resource spectrum vectors and reference spectrum vectors, and construct a matching factor tensor by combining the structural potential deviation and spectral distance. The scoring recommendation module is used to build a factorization machine model, predict matching scores, generate a prediction score matrix, use the Top-K selection method for screening, generate recommended content, and build a visual interface to display recommended content.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the artificial intelligence-based psychological counseling intelligent recommendation method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the artificial intelligence-based psychological counseling intelligent recommendation method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Psychological consultation intelligent recommendation method and system based on artificial intelligence
CN121260514A
Artificial intelligence-based psychological counseling intelligent recommendation method and system
CN121260514B
Method and intelligent system for evaluating physical fitness of student based on motion data
CN122050808A