Employment psychological analysis model construction method and employment psychological analysis method
By constructing an employment psychology analysis model, generating trait projection embedding vectors using a general language model, and adjusting the network structure, the problem of being unable to decouple and evaluate the employment psychology traits of college students in existing technologies is solved. This achieves fine-grained decoupling and intensity evaluation of psychological traits, and can more accurately reflect the psychological state of college students in the employment scenario.
Patent Information
- Application Number
- CN202511634438.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-03-06
AI Technical Summary
Existing psychological assessment methods are insufficient to fully reflect the psychological characteristics and emotional state of college students in the employment context, especially in open-ended text expression where they cannot decouple different psychological traits and capture the intensity of psychological traits.
An employment psychology analysis model is constructed by acquiring an employment psychology assessment question-and-answer dataset, generating trait projection embedding vectors using a general language model, and adjusting the gated feedforward network by combining the center vector, intensity benchmark vector, and attention head output vector of the psychological trait dimension to achieve decoupling and intensity assessment of psychological traits.
It achieves fine-grained decoupling and intensity assessment of college students' employment psychological traits, and can effectively analyze the psychological characteristics and emotional state of college students in real employment scenarios.
Smart Images

Figure CN121606291A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence, and in particular to a method for constructing an employment psychology analysis model and an employment psychology analysis method. Background Technology
[0002] Traditional psychological assessments primarily rely on standardized scales or questionnaires, with fixed assessment dimensions and limited expression methods, making it difficult to comprehensively reflect the psychological characteristics and emotional state of college students in real-world employment scenarios. This is especially true in open-ended textual expressions (such as job-seeking reflections, interview transcripts, and self-reflection reports), where college students often convey complex and implicit psychological traits through natural language, such as resilience, vitality, adaptability, intrinsic motivation, and a youthful spirit. Existing assessment methods are significantly inadequate in understanding and quantifying this type of textual data.
[0003] In recent years, pre-trained language models (such as BERT) have made significant progress in the field of natural language processing, possessing powerful semantic understanding and context modeling capabilities, providing a new technical path for the automation of psychological testing. However, general-purpose language models still have limitations in psychological semantic analysis scenarios: on the one hand, their semantic representations fail to decouple from psychological dimensions, resulting in different psychological traits overlapping in the vector space, leading to a lack of interpretability in the analysis results; on the other hand, existing models typically only perform classification predictions, failing to characterize the intensity changes of psychological traits, and also neglecting the intrinsic correlations between different psychological dimensions. Summary of the Invention
[0004] This invention provides a method for constructing an employment psychology analysis model and an employment psychology analysis method. The method can solve the technical problems in the prior art where the general language model cannot decouple the employment psychology dimensions of college students and cannot capture the intensity of college students' employment psychology traits.
[0005] An embodiment of the present invention provides a method for constructing an employment psychological analysis model, comprising: Obtain a dataset of employment psychological assessment questions and answers, as well as center vectors, low-expression-intensity baseline vectors, high-expression-intensity baseline vectors, attention head output vectors, and projection matrices for each psychological trait dimension; wherein, the dataset includes several assessment text contents; the center vectors are used to characterize the typical semantic expression features of the corresponding psychological trait dimension; Load a general language model, use the general language model to generate the original embedding vectors of each word in the assessment text, and assign corresponding dynamic weights to each psychological trait dimension based on the center vector and the original embedding vectors. Based on the projection matrix, the dynamically allocated weights, and the original embedding vector, generate the feature projection embedding vector for each word; The intensity score vector of each psychological trait dimension is calculated based on the trait projection embedding vector, the low expression intensity benchmark vector, and the high expression intensity benchmark vector. The location encoding vectors of each psychological test item in the test text are generated. Based on the location encoding vectors, the trait projection embedding vectors, the intensity score vectors, and the attention head output vectors, the gated feedforward network of the general language model is adjusted, and the adjusted general language model is used as the model to be trained. The model to be trained is trained based on the employment psychological assessment question and answer dataset, and the trained model is used as the employment psychological analysis model.
[0006] Further, the position encoding vectors of each psychological assessment question in the generated assessment text content are used to adjust the gated feedforward network of the general language model based on the position encoding vectors, the trait projection embedding vectors, the intensity score vectors, and the attention head output vectors. The adjusted general language model is then used as the model to be trained, including: Generate the position encoding vector of each psychological assessment question in the assessment text content, and calculate the trait perception fusion position encoding vector of each psychological trait dimension based on the position encoding vector, the trait projection embedding vector and the intensity score vector. Based on the attention head output vector, the intensity score vector, and the trait-aware fusion position encoding vector, the feedforward network weight matrix of the gated feedforward network in the general language model is adjusted, and the adjusted general language model is used as the model to be trained.
[0007] Furthermore, the process of determining the central vector, low-expression-intensity baseline vector, and high-expression-intensity baseline vector for each psychological trait dimension includes: Obtain anchor words corresponding to different psychological trait dimensions; Using the general language model, the first original embedding vector of each anchor word is generated; Based on the first original embedding vector of all anchor words under each psychological trait dimension, the center vector of each psychological trait dimension is calculated. Obtain high-intensity and low-intensity anchor words corresponding to different psychological trait dimensions; Using the general language model, a second original embedding vector corresponding to each high expression intensity anchor word and a third original embedding vector corresponding to each low expression intensity anchor word are generated. Based on the second original embedding vector of the high expression intensity anchor words corresponding to each psychological trait dimension, the high expression intensity benchmark vector of each psychological trait dimension is calculated. Based on the third original embedding vector of the low expression intensity anchor words corresponding to each psychological trait dimension, the low expression intensity baseline vector of each psychological trait dimension is calculated.
[0008] Furthermore, the process of determining the attention head output vector includes: Calculate the first attention matrix between the question texts of each psychological assessment item; Based on the first attention matrix, the optimization operation is repeated until the target attention matrix for each psychological trait dimension is obtained. Based on the target attention matrix of each psychological trait dimension, determine the attention head output vector of each psychological trait dimension; The optimization operation includes: Based on the current first attention projection matrix of each psychological trait dimension, the first attention matrix is reduced in dimension and projected to generate the current second attention matrix of each psychological trait dimension; wherein, when the optimization operation is performed for the first time, the current first attention projection matrix of each psychological trait dimension is the corresponding initialized attention projection matrix; Calculate the KL divergence between the current second attention matrix and the first attention matrix for each psychological trait dimension; The current attention distillation loss is calculated based on KL divergence. It is then determined whether the current attention distillation loss meets the preset convergence condition. If so, terminate the optimization operation and use the current second attention matrix for each psychological trait dimension as the corresponding target attention matrix. If not, update each first attention projection matrix and perform the next optimization operation based on the updated first attention projection matrix.
[0009] Further, the step of calculating the intensity score vector for each psychological trait dimension based on the trait projection embedding vector, the low expression intensity benchmark vector, and the high expression intensity benchmark vector includes: For each sentence in the evaluation text, the current sentence is traversed through a preset sliding window. During the traversal, the local intensity score vector of the current window position under each psychological trait dimension is calculated based on the feature projection embedding vector corresponding to the words contained in the current window position, combined with the high expression intensity benchmark vector and low expression intensity benchmark vector of each psychological trait dimension. For each psychological trait dimension, the average of all local intensity score vectors under the current psychological trait dimension is taken to obtain the intensity score vector of the current psychological trait dimension.
[0010] Further, the step of adjusting the feedforward network weight matrix of the gated feedforward network in the general language model based on the attention head output vector, the intensity score vector, and the trait-aware fusion position encoding vector, and using the adjusted general language model as the model to be trained, includes: Based on the attention head output vector, the intensity score vector, and the trait perception fusion location encoding vector, the decoupled multi-head attention vector for each psychological trait dimension is calculated. By concatenating the decoupled multi-head attention vectors and intensity score vectors of each psychological trait dimension, the trait gating vector of each psychological trait dimension is calculated. Based on the trait gating vectors and decoupled multi-head attention vectors of each psychological trait dimension, the weight matrix of the feedforward network of the gating feedforward network in the general language model is adjusted to determine the output vector of the gating feedforward network after adjustment. Based on the output vector of the adjusted gated feedforward network, the adjusted general language model is determined; The adjusted general language model is used as the model to be trained.
[0011] Furthermore, the employment psychological assessment question-and-answer dataset also includes first psychological trait dimension labels and first psychological trait intensity rating labels corresponding to the content of each assessment text; The step of training the model to be trained based on the employment psychological assessment question-and-answer dataset, and using the trained model as an employment psychological analysis model, includes: Obtain positive and negative data subsets; wherein, in the positive data subset, the second psychological trait intensity rating label and the first psychological trait intensity rating label are in the same preset intensity range, and the second psychological trait dimension label in the positive data subset is consistent with the first psychological trait dimension label; the third psychological trait dimension label in the negative data subset is different from the first psychological trait intensity rating label; Using the employment psychological assessment question and answer dataset, the positive data subset, and the negative data subset, the model parameters of the model to be trained are trained in the first iteration, and the trained model is used as the model to be trained for optimization. Based on the employment psychological assessment question and answer dataset, the optimized training model is trained in a second iteration, and the trained optimized training model is used as the employment psychological analysis model.
[0012] Further, the step of using the employment psychological assessment question-and-answer dataset, the positive data subset, and the negative data subset to perform a first iteration of training on the model parameters of the model to be trained, and using the trained model as the model to be fine-tuned, includes: Based on the employment psychological assessment question and answer dataset, the positive data subset, and the negative data subset, the training model to be trained is subjected to a first iteration of training until a preset first convergence condition is reached, the first iteration of training is terminated, and the trained model to be trained is used as the model to be trained for optimization. In each training process, the contrast loss is calculated based on the first feature output vector, the second feature output vector, and the third feature output vector corresponding to each psychological trait dimension generated by the current model to be trained. Based on the contrastive loss, the model parameters of the model to be trained are adjusted to obtain the model to be trained in the next training session; wherein, the first feature output vector is calculated based on the employment psychological assessment question-and-answer dataset; the second feature output vector and the third feature output vector are calculated based on the union of the positive data subset and the negative data subset.
[0013] Further, the step of performing a second iteration of training on the optimized training model based on the employment psychological assessment question-and-answer dataset, and using the trained optimized training model as the employment psychological analysis model, includes: The employment psychological assessment question and answer dataset is input into the optimization and training model, and the optimization and training model is trained in a second iteration until the fully trained optimization and training model is obtained. The optimized training model is used as the employment psychological analysis model. The second iteration of training includes: The predicted psychological trait strength scores of each psychological trait dimension obtained by the current fine-tuning and training model based on the input data are compared with the corresponding first psychological trait dimension label and first psychological trait strength score label. The current total loss function value is calculated based on the comparison results. Determine whether the current total loss function value satisfies the preset second convergence condition. If so, terminate the second iteration of training to obtain the trained and optimized model. If not, adjust the model parameters of the current training model and proceed with the next training iteration.
[0014] An embodiment of the present invention also provides a method for employment psychological analysis, comprising: Obtain the text content of the employment psychological assessment input by the user; The employment psychological assessment text content is input into the employment psychological analysis model to obtain the psychological trait intensity scores under each psychological trait dimension output by the employment psychological analysis model; the employment psychological analysis model is determined by the employment psychological analysis model construction method.
[0015] The following benefits can be obtained by implementing the present invention: This invention provides a method for constructing an employment psychological analysis model and an employment psychological analysis method. The method utilizes a general language model to generate original embedding vectors for each word in the assessment text. Based on the center vector representing the typical semantic expression features of the corresponding psychological trait dimension and the original embedding vectors, dynamic weights are assigned to each psychological trait dimension, thereby decoupling the psychological trait dimensions. Furthermore, based on the dynamic weights of each psychological trait dimension, combined with the projection matrix and the original embedding vectors, trait projection embedding vectors for each word are generated, thereby strengthening the features of words strongly correlated with psychological trait dimensions and achieving decoupling of words across multiple psychological trait dimensions. Subsequently, the method... By combining the trait projection embedding vector, the low expression intensity benchmark vector, and the high expression intensity benchmark vector, the intensity score vector of each psychological trait dimension is calculated. Based on the decoupling of psychological dimensions, the intensity of college students' employment psychological traits is effectively captured by analyzing the differences in expression intensity of each word. Then, based on the position encoding vector of each psychological assessment question, the trait projection embedding vector, the intensity score vector, and the attention head output vector, the gated feedforward network of the general language model is adjusted. The adjusted general language model is used as the model to be trained. Finally, the model to be trained is trained. The trained employment psychological analysis model can effectively analyze the psychological pressure of college students and reflect their psychological characteristics and emotional state in real employment scenarios. Attached Figure Description
[0016] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating a method for constructing an employment psychological analysis model according to a certain embodiment of this application; Figure 2 This is a schematic diagram illustrating the effect of a conventional global attention matrix provided in a certain embodiment of this application in eliminating irrelevant noise between questions; Figure 3 This is a schematic diagram illustrating the effect of the complete attention matrix of the teacher model provided in a certain embodiment of this application in eliminating irrelevant noise between questions; Figure 4 This is a schematic diagram illustrating the effect of a target attention matrix provided in a certain embodiment of this application on eliminating irrelevant noise between questions; Figure 5This is a schematic diagram comparing the effects of different attention matrices provided in a certain embodiment of this application on eliminating irrelevant noise between questions; Figure 6 This is a feature distribution map provided in one embodiment of this application without the use of feature comparison learning; Figure 7 This is a feature distribution map provided in a certain embodiment of this application under the condition of using feature comparison learning; Figure 8 This is a flowchart illustrating an employment psychology analysis method provided in a certain embodiment of this application; Figure 9 This is a schematic diagram illustrating the accuracy analysis of psychological trait dimension recognition provided in a certain embodiment of this application; Figure 10 This is a schematic diagram of the prediction error analysis of the intensity score of psychological traits provided in a certain embodiment of this application; Figure 11 This is a schematic diagram of the spatial separation effect without the use of feature comparison learning, provided in a certain embodiment of this application; Figure 12 This is a schematic diagram of the spatial separation effect under the condition of using feature comparison learning, provided in a certain embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0020] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0021] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0022] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0023] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0024] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0025] See Figure 1 To address the technical problems of existing general-purpose language models failing to decouple the psychological dimensions of college students' employment and failing to capture the intensity of their employment psychological traits, an embodiment of this invention provides a method for constructing an employment psychology analysis model, comprising: S101. Obtain the employment psychological assessment question and answer dataset, as well as the center vector, low expression intensity benchmark vector, high expression intensity benchmark vector, attention head output vector, and projection matrix for each psychological trait dimension; wherein, the dataset includes several assessment text contents; the center vector is used to characterize the typical semantic expression features of the corresponding psychological trait dimension; As an illustration, the main target of the model training data collection is college students. It is necessary to collect text data generated by this group in relevant scenarios such as job preparation, job search practice, and career planning, so as to build the basic corpus required for model training. Specifically, the data collection channels include open-ended psychological questionnaire responses archived by university career guidance centers, transcripts of career counseling interviews, job-seeking experience sharing posts on campus recruitment forums, and self-reflection reports after mock interviews. The collected raw text data needs to be preprocessed, including removing sensitive personal information, standardizing text format, correcting typos and grammatical errors, and standardizing terminology to ensure data quality and privacy compliance. After preprocessing, several evaluation texts are obtained. These texts are then manually annotated. The specific annotation work is as follows: (1) Analyze the psychological trait dimensions reflected in the content of each assessment text and label the corresponding first psychological trait dimension for each assessment text content; (2) Analyze the intensity of psychological traits reflected in each assessment text content, and use a five-point scale (e.g., 1-weak to 5-strong) to quantify the intensity level of psychological traits in each assessment text content. On this basis, label the corresponding first psychological trait intensity rating tag for each assessment text content.
[0026] Specifically, the constructed employment psychological assessment question-and-answer dataset includes several assessment text contents, as well as first psychological trait dimension labels and first psychological trait intensity rating labels corresponding to each assessment text content; It should be noted that the annotation work was performed by professionals with a psychology background, and the consistency of the annotation was ensured through cross-validation and expert review mechanisms. It should be noted that the traits refer to psychological traits, which are the five independent dimensions of the READY Index: Resilience, Energy, Adaptability, Drive, and Youngness. These psychological trait dimensions represent the fine-grained psychological characteristics that need to be assessed in the psychological evaluation of college students' employment.
[0027] S102. Load the general language model, use the general language model to generate the original embedding vector of each word in the evaluation text content, and assign corresponding dynamic weights to each psychological trait dimension according to the center vector and the original embedding vector. In illustrative terms, the general language model in this embodiment adopts the BERT-base model based on the Transformer architecture. This model has learned deep language representation capabilities in advance through pre-training on large-scale general corpora (such as Wikipedia, book corpora, news texts, etc.) to perform masked language modeling (MLM) and next sentence prediction (NSP) tasks. Specifically, the general language model of this embodiment is obtained by loading the publicly released BERT-base pre-trained weights. Its core parameter configuration includes a 12-layer Transformer encoder, 768-dimensional hidden states, and 12 attention heads, with a total of approximately 110 million parameters. This model can map the input text into context-aware word embedding vectors, providing a high-quality language understanding foundation for subsequent steps. In step S102, the pre-trained weights of the general language model are not modified, and its extensive language knowledge learned in the general domain is retained. Instead, it is fine-tuned in subsequent steps to adapt it to the professional needs of college students' employment psychological assessment.
[0028] To illustrate, in the psychological analysis of college students' employment, existing conventional word embedding techniques such as BERT typically map the entire sentence to a single vector, which easily leads to these independent psychological trait representations being mixed together, making it impossible to support fine-grained psychological analysis. Considering the shortcomings of the existing technology, this invention decouples the psychological trait dimensions and assigns corresponding dynamic weights to each psychological trait dimension. On this basis, it achieves the decoupling of psychological trait representations under multiple psychological trait dimensions.
[0029] In a preferred embodiment, the process of determining the center vector, low expression intensity baseline vector, and high expression intensity baseline vector for each psychological trait dimension includes: Obtain anchor words corresponding to different psychological trait dimensions; Using the general language model, the first original embedding vector of each anchor word is generated; Based on the first original embedding vector of all anchor words under each psychological trait dimension, the center vector of each psychological trait dimension is calculated. Obtain high-intensity and low-intensity anchor words corresponding to different psychological trait dimensions; Using the general language model, a second original embedding vector corresponding to each high expression intensity anchor word and a third original embedding vector corresponding to each low expression intensity anchor word are generated. Based on the second original embedding vector of the high expression intensity anchor words corresponding to each psychological trait dimension, the high expression intensity benchmark vector of each psychological trait dimension is calculated. Based on the third original embedding vector of the low expression intensity anchor words corresponding to each psychological trait dimension, the low expression intensity baseline vector of each psychological trait dimension is calculated. Indicatively, anchor words refer to terms used to define the central vectors of different psychological trait dimensions, derived from a descriptive lexicon. This is generated through clustering. For example, for the psychological trait dimension of "resilience," anchor words include "recovery" and "strength." Specifically, based on the first original embedding vector of all anchor words under each psychological trait dimension, the center vector of each psychological trait dimension is calculated. The specific calculation formula is as follows: ; In the formula, Indicates the first The central vector of the psychological trait dimension; For dimensional indexing, These correspond to the five psychological trait dimensions of the READY index. Corresponding to toughness, Corresponding vitality, Corresponding adaptability, Corresponding to internal driving force, Corresponding to a youthful state; Indicates the first A descriptive vocabulary for psychological trait dimensions (containing anchor words corresponding to the psychological trait dimension) is generated through clustering. Indicates the first The size of the descriptive vocabulary for the psychological trait dimension, i.e., the number of anchor words it contains; Indicates the first Individual anchor words in the descriptive lexicon of psychological trait dimensions; Anchor words The first original embedding vector; In a schematic way, in practical applications, the original embedding vectors of each word in the evaluation text are generated, the cosine similarity between the original embedding vector of each word and the center vector of each psychological trait dimension is calculated, and the corresponding dynamic weights are assigned to each psychological trait dimension through the Softmax function. This controls the distribution ratio of the original embedding vectors to each psychological trait dimension, realizes the dynamic distribution of the original embedding vectors under the multi-dimensional psychological trait dimension, ensures the decoupling of the representations of each multi-dimensional psychological trait dimension, and preserves the features of the independent psychological trait dimension. Specifically, the calculation formula for assigning corresponding dynamic weights to each psychological trait dimension is as follows: ; In the formula, Indicates the first The dynamic weighting of the psychological trait dimension is used to dynamically adjust the original embedding vectors of each word in the _____th ... Projection weights under psychological trait dimensions ensure decoupling of each psychological trait dimension; This represents the cosine similarity function, used to calculate the degree of similarity between two vectors, with values ranging from 1 to 2. ; For word indexing; Indicates the first The original embedding vectors of each word, for example, for the word "fast", in the general language model, It is a 768-dimensional vector; This represents the temperature coefficient, which controls the smoothness of the Softmax function; optimal settings are preferred. ; Indicates the first The central vector of the psychological trait dimension; This represents the natural exponential function.
[0030] S103. Generate feature projection embedding vectors for each word based on the projection matrix, the dynamically allocated weights, and the original embedding vectors. In a schematic manner, the original embedding vectors of each word in the evaluation text are linearly projected and weighted and summed using the dynamically allocated weights and projection matrix to obtain the decoupled trait projection embedding vectors of each word. Thus, each trait projection embedding vector is mapped to a multi-dimensional psychological trait space, preserving independent dimensional features and supporting fine-grained psychological analysis. Specifically, the formula for generating the feature projection embedding vectors of each word is as follows: ; In the formula, Indicates the first Feature projection embedding vectors of each word; Indicates the first The projection matrix of the psychological trait dimension is used to project the original embedding vector onto the _th_ trait dimension. The space of psychological traits.
[0031] Using dynamic weight allocation Based on the cosine similarity between the first original embedding vector and the center vectors of each psychological trait dimension, the allocation ratio on each psychological trait dimension is calculated using the Softmax function. During application, the original embedding vectors of each word are dynamically allocated to different psychological trait dimensions according to their semantic content, thereby decoupling multi-dimensional psychological traits. Simultaneously, a learnable projection matrix is used. Perform a linear projection on the original embedding and then sum the weighted values to obtain the eigenvalue projected embedding. This ensures the independence of each psychological trait dimension. Even within the same sentence, different words can emphasize different psychological dimensions, thus capturing fine-grained psychological characteristics more accurately.
[0032] S104. Calculate the intensity score vector of each psychological trait dimension based on the trait projection embedding vector, the low expression intensity benchmark vector, and the high expression intensity benchmark vector. As an illustration, the expression of psychological traits in assessment texts varies in intensity. For example, the ability to occasionally stick to a plan and the ability to always strictly execute it both belong to the action dimension, but their intensities differ. Conventional statistical features such as TF-IDF cannot capture the gradual changes in intensity, which can easily lead to coarse-grained psychological assessments. Considering this, this invention utilizes strong expression intensity benchmark vectors and low expression intensity benchmark vectors to express the intensity of psychological traits, and calculates intensity score vectors to achieve continuous quantification of the expression intensity of psychological traits to support fine-grained assessments. The process of determining the high-expression intensity baseline vector and low-expression intensity baseline vector for each psychological trait dimension is as follows: First, obtain the high-expression-strength anchor words and low-expression-strength anchor words corresponding to different psychological trait dimensions; In specific implementation, the first High-intensity anchor terminology for psychological trait dimensions These are selected through expert annotation or from psychology dictionaries. For example, for the resilience dimension, high-intensity anchor words might include words like "tenacious" and "unyielding." Similarly, the... Low-intensity anchor terminology for psychological trait dimensions Including words such as "slight" and "occasionally"; Then, using the general language model, a second original embedding vector corresponding to each high-expression-strength anchor word and a third original embedding vector corresponding to each low-expression-strength anchor word are generated. Based on the second original embedding vector of the high-expression-strength anchor words corresponding to each psychological trait dimension, the high-expression-strength baseline vector of each psychological trait dimension is calculated. The specific calculation formula is as follows: ; In the formula, Represents the high-expression-intensity baseline vector of the d-th psychological trait dimension; A set of high-intensity anchor words representing the dth psychological trait dimension, containing several high-expression-intensity anchor words for the current psychological trait dimension; This refers to a high-expression-intensity anchor word within a set of high-intensity anchor words. Anchor words indicating high expressive intensity The corresponding second original embedding vector; Based on the third original embedding vector of the low-expression-strength anchor words corresponding to each psychological trait dimension, the low-expression-strength baseline vector of each psychological trait dimension is calculated. The specific calculation formula is as follows: ; In the formula, This represents the baseline vector for low expression intensity of the d-th psychological trait dimension; This represents the set of low-intensity anchor words for the dth psychological trait dimension, containing several low-expression-intensity anchor words for the current psychological trait dimension. It refers to a low-expression-intensity anchor word in the set of low-intensity anchor words; Anchor words indicating low expression intensity The corresponding third original embedding vector.
[0033] Indicatively, based on the trait projection embedding vector within the sliding window, the average of the Euclidean distance differences between each psychological trait dimension and the high-expression-strength baseline vector and the low-expression-strength baseline vector is calculated to obtain the strength score vector of each psychological trait dimension, quantifying the expression strength of the psychological trait, allowing the model to capture continuous changes from weak to strong, and providing a more granular psychological assessment. In a preferred embodiment, calculating the intensity score vector for each psychological trait dimension based on the trait projection embedding vector, the low expression intensity benchmark vector, and the high expression intensity benchmark vector includes: For each sentence in the evaluation text, the current sentence is traversed through a preset sliding window. During the traversal, the local intensity score vector of the current window position under each psychological trait dimension is calculated based on the feature projection embedding vector corresponding to the words contained in the current window position, combined with the high expression intensity benchmark vector and low expression intensity benchmark vector of each psychological trait dimension. For each psychological trait dimension, the average of all local intensity score vectors under the current psychological trait dimension is taken to obtain the intensity score vector of the current psychological trait dimension. Specifically, the calculation process for the intensity score vector of each psychological trait dimension is as follows: ; In the formula, This represents the intensity score vector of the d-th psychological trait dimension, used to quantify the expressive intensity of the psychological trait in that dimension; This represents the sliding window for the current statement, containing multiple window positions; This indicates the size of the sliding window for the current statement; The position index represents the window's position; Represents a sliding window Feature projection embedding vector at the location; This represents the L2 norm, calculated using Euclidean distance to determine the distance between vectors.
[0034] In practical implementation, sliding window It is the set of word positions in the current sentence. For example, for the sentence "I can always recover quickly", if the sliding window size is 3, centered on "quickly", then the sliding window... It includes the first word "always" and the second word "recover".
[0035] By constructing a high-strength anchor word set and low-intensity anchor word set Calculate the high expression intensity baseline vector and low expression intensity baseline vector Then, based on the feature projection embedding vector within the sliding window, The intensity score vector is calculated by comparing the Euclidean distance difference between the high and low intensity benchmark vectors. Using relative distance difference to quantify intensity allows the model to capture continuous changes from weak to strong, enabling it to distinguish subtle differences in intensity, such as "can persist occasionally" versus "can always persist," thus providing a more nuanced psychological assessment.
[0036] In illustrative terms, the assessment text includes several psychological assessment questionnaires; a single psychological assessment questionnaire contains multiple questions from various psychological assessments, requiring cross-question correlation analysis, such as teamwork preference reflecting the adaptability dimension. However, the existing global attention mechanism of Transformer introduces irrelevant noise between questions, easily leading to impure learning of psychological trait correlations. This invention introduces a teacher-student distillation framework to calculate the dimensional constraint attention matrix and attention distillation loss, enabling independent learning of question correlations for each psychological trait dimension and eliminating noise interference. In a preferred embodiment, the process of determining the attention head output vector includes: Calculate the first attention matrix between the question texts of each psychological assessment item; Based on the first attention matrix, the optimization operation is repeated until the target attention matrix for each psychological trait dimension is obtained. Based on the target attention matrix of each psychological trait dimension, determine the attention head output vector of each psychological trait dimension; The optimization operation includes: Based on the current first attention projection matrix of each psychological trait dimension, the first attention matrix is reduced in dimension and projected to generate the current second attention matrix of each psychological trait dimension; wherein, when the optimization operation is performed for the first time, the current first attention projection matrix of each psychological trait dimension is the corresponding initialized attention projection matrix; Calculate the KL divergence between the current second attention matrix and the first attention matrix for each psychological trait dimension; The current attention distillation loss is calculated based on KL divergence. It is then determined whether the current attention distillation loss meets the preset convergence condition. If so, terminate the optimization operation and use the current second attention matrix for each psychological trait dimension as the corresponding target attention matrix. If not, update each first attention projection matrix and perform the next optimization operation based on the updated first attention projection matrix; Indicatively, the first attention matrix between the question texts of each psychological assessment item is calculated; Specifically, the teacher model is used to apply a complete attention mechanism to the question texts of each psychological test item in the assessment text content, and calculates the global association matrix (i.e., the first attention matrix) between the question texts of all psychological test items. This provides a supervision target for distillation training and characterizes the global association strength between all items. The specific calculation process is as follows: ; In the formula, The first attention matrix is the global association matrix calculated by the teacher model, representing the global association strength among all question texts, with dimensions of [missing information]. ; Indicates the number of questions; This represents the standard attention calculation function, including query-key-value matching and Softmax normalization; The query vector matrix is obtained through a linear transformation of the input sequence. The key vector matrix is obtained through a linear transformation of the input sequence. The value vector matrix is obtained through a linear transformation of the input sequence. The projection matrix representing the query vector is a trainable parameter; The projection matrix representing the key vector is a trainable parameter; The projection matrix representing the value vector is a trainable parameter; In its implementation, the standard attention calculation function first calculates... and The dot product, then divided by The attention weights are obtained by applying Softmax, and finally combined with... Multiplication, that is: ; in, This represents the dimension of the key vector, the default setting. , The square root of the key vector dimension is used to scale the dot product attention score and prevent gradient vanishing. This represents the Softmax function, used to convert attention scores into a probability distribution.
[0037] In practice, each college student will answer multiple open-ended questions when completing the employment psychological assessment, such as questionnaires or interview records from the employment guidance center. These question texts are combined into a sequence in order. For example, if a psychological assessment questionnaire contains 10 questions, the question sequence consists of the original texts of these 10 questions, and the sequence length is the number of questions.
[0038] Indicatively, for each psychological trait dimension, the student model uses the first attention projection matrix of each psychological trait dimension to perform dimensionality reduction projection on the query vector and key vector of the first attention matrix. This ensures that each psychological trait dimension learns the relevance of the learning questions independently, reducing global attention noise. The specific calculation formula is as follows: ; In the formula, Indicates the first The target attention matrix of the psychological trait dimension is the student model in the _____th ... The attention matrix constrained by the dimensions of psychological traits, with dimensions of 1. , characterizing the The strength of pure correlations between items under the psychological trait dimension; This represents the Softmax function, used to convert attention scores into a probability distribution; This represents the first attention projection matrix, with dimension 1. , are trainable parameters used to project the query vector and key vector onto a dimension-specific low-dimensional subspace; express Transpose of the item; This represents the dimension of the key vector, the default setting. , This represents the square root of the key vector dimension, used to scale the dot product attention score and prevent gradient vanishing.
[0039] To illustrate, before determining the target attention matrix for each psychological trait dimension, it is necessary to continuously calculate the KL divergence between the second attention matrix of the student model and the first attention matrix of the teacher model, and sum the KL divergences for all psychological trait dimensions to obtain the attention distillation loss, thereby continuously projecting the first attention matrix onto the target attention matrix. Adjustments were made to minimize the difference between the student model's second attention matrix and the teacher model's first attention matrix, thereby forcing the student model to learn the problem associations independently across each psychological trait dimension, eliminating noise interference, and improving the purity of associative learning. Specifically, based on the current first attention projection matrix for each psychological trait dimension, the first attention matrix is dimensionality-reduced and projected to generate the current second attention matrix for each psychological trait dimension. The KL divergence between the current second attention matrix and the first attention matrix for each psychological trait dimension is calculated, and the current attention distillation loss is calculated based on the KL divergence. The specific calculation formula is as follows: ; In the formula, This represents the attention distillation loss, used to minimize the difference between the current second attention matrix and the first attention matrix; This represents the Kullback-Leibler divergence, used to calculate the difference between two probability distributions; Determine whether the current attention distillation loss meets the preset convergence condition. If yes, terminate the optimization operation and use the current second attention matrix of each psychological trait dimension as the corresponding target attention matrix. If no, update each first attention projection matrix and perform the next optimization operation based on the updated first attention projection matrix.
[0040] Therefore, using the teacher-student distillation framework, the teacher model calculates the complete first attention matrix. As a supervisory signal, the student model calculates the corresponding target attention matrix for each psychological trait dimension. Through the attention projection matrix in the target attention matrix (i.e., the first attention projection matrix after the last iteration of training) projects the query and key into a low-dimensional subspace. Before this, attention distillation loss is used to minimize the difference between the student model's attention and the teacher model's attention, forcing the student model to learn the question association independently on each psychological trait dimension. This allows the model to eliminate noise in the global attention, thereby capturing the cross-question association of each psychological dimension more purely.
[0041] For a better explanation of this application, see [link to application]. Figures 2-5 In one embodiment, the effect of attention distillation coding is visualized by using a heatmap to visually demonstrate its effectiveness in eliminating irrelevant noise between items. The experiment simulates the association patterns between ten assessment items, showcasing a comparison of a conventional global attention matrix, a complete attention matrix for the teacher model, and a dimensionally constrained attention matrix for the student model (i.e., the method of this application). The color intensity of the heatmap represents the magnitude of attention weights, with light yellow to dark red indicating a change in attention weight from low to high.
[0042] from Figure 2 It is evident that a large number of scattered attention weights exist in the conventional global attention matrix, indicating that it generates a significant amount of irrelevant noise between questions. From Figure 3 It can be clearly observed that although the complete attention matrix of the teacher model retains global correlation information, it still suffers from a certain degree of noise interference. From... Figure 4 It is clearly observed that the student model's dimensional constraint attention matrix exhibits a clearer block structure, with concentrated attention weights within the pre-defined question grouping regions and lower weights in other regions, demonstrating the effective filtering of noise by the dimensional constraint. See also Figure 5To quantify this effect, the experiment further calculated the purity index of attention. The bar chart shows that the student model (i.e., the method of this application) has the highest purity, significantly outperforming conventional methods and the teacher model. This demonstrates that through attention distillation encoding, the present invention can achieve independent learning item association for each psychological trait dimension, effectively eliminating noise interference in global attention.
[0043] As illustrated, conventional multi-head attention mechanisms mix information from different psychological dimensions, leading to the suppression of features in specific dimensions and failing to highlight the dominant psychological trait. This invention achieves multi-dimensional attention decoupling to strengthen the dominant psychological trait by assigning an independent attention head to each psychological trait dimension and dynamically weighting and fusing the outputs. Therefore, for each psychological trait dimension, the target attention matrix for each psychological trait dimension is used to calculate the attention head output vector for each psychological trait dimension. The specific calculation process is as follows: ; In the formula, Indicates the first The attention head output vector of the psychological trait dimension represents the inter-item correlation information under this dimension and is independent of other dimensions; Indicates the first The query vector projection matrix of the target attention matrix in the psychological trait dimension is a trainable parameter; Indicates the first The key vector projection matrix of the target attention matrix in the psychological trait dimension is a trainable parameter; Indicates the first The value vector projection matrix of the target attention matrix in the psychological trait dimension is a trainable parameter.
[0044] S105. Generate the position encoding vector of each psychological test question in the test text content. Based on the position encoding vector, the trait projection embedding vector, the intensity score vector, and the attention head output vector, adjust the gated feedforward network of the general language model and use the adjusted general language model as the model to be trained. In a preferred embodiment, the step of generating position encoding vectors for each psychological assessment question in the assessment text content, adjusting the gated feedforward network of the general language model based on the position encoding vectors, the trait projection embedding vectors, the intensity score vectors, and the attention head output vectors, and using the adjusted general language model as the model to be trained includes: Generate the position encoding vector of each psychological assessment question in the assessment text content, and calculate the trait perception fusion position encoding vector of each psychological trait dimension based on the position encoding vector, the trait projection embedding vector and the intensity score vector. Based on the attention head output vector, the intensity score vector, and the trait perception fusion position encoding vector, the feedforward network weight matrix of the gated feedforward network in the general language model is adjusted, and the adjusted general language model is used as the model to be trained. Indicatively, the order of questions in psychological assessments implies logic; for example, questions about frustration response precede recovery speed. However, conventional sinusoidal positional coding ignores the correlation with psychological dimensions, easily leading to decoupling between positional coding and semantics, failing to capture the dynamic relationship between question position and psychological traits. Therefore, this invention fuses trait perception with positional coding, dynamically combining the positional coding vector with the trait projection embedding vector and intensity score vector to achieve correlation modeling between question position and psychological traits. The specific steps are as follows: First, define This serves as a question position index, representing the sequential position of each psychological assessment question, and is based on the question position index. The positional coding vector for each psychological assessment item is calculated using the standard sinusoidal positional coding function. ; Then, based on the location encoding vector, the trait projection embedding vector, and the intensity score vector, the trait perception fusion location encoding vector for each psychological trait dimension is calculated. The specific steps are as follows: The trait projection embedding vector and the intensity score vector are concatenated. The trait perception offset is calculated using a learnable projection matrix and a sigmoid activation function. This offset is then added to the position encoding vector to establish a dynamic relationship between the question position and the psychological trait. This allows the position encoding to adapt to the psychological trait content and capture the psychological logic of the question order. The specific calculation formula is as follows: ; In the formula, Indicates the first The question is in The trait perception fusion location encoding vector on the psychological trait dimension combines location information and psychological trait semantics to capture the dynamic relationship between question location and traits; Indicates the first The question's position encoding vector captures absolute positional information but does not contain semantic content; This represents the Sigmoid activation function, which is used to compress the projection result to the [0,1] interval and control the offset magnitude. This indicates a concatenation operation, which joins two vectors along their feature dimensions. denoted as the fusion projection matrix, is a trainable parameter used to project the concatenated vector onto the position encoding space; Indicates the first The question is in Trait projection embedding vectors on the psychological trait dimension; Indicates the first The question is in Intensity score vector on the psychological trait dimension; In practical implementation, Indicates the first The question is in Trait projection embedding vectors on the psychological trait dimension, while the th Feature projection embedding vector of each word It is the feature projection embedding vector of a single word. By examining the first The text content of the question is obtained by average pooling all words. Specifically, first, the words containing the first word are calculated... Feature projection embedding vector of each word The feature projection embedding vector for each word is calculated, and then the feature projection embedding vectors for all words in the same topic are calculated on the 1st... The average value is taken across the psychological trait dimensions to form a question-level trait projection embedding vector, thus obtaining the first... The question is in Trait projection embedding vectors on the psychological trait dimension ; In practical implementation, the intensity score vector Indicates the first The question is in The intensity score vector on the psychological trait dimension is the aggregation result of the intensity score vectors at the item level. Its acquisition process involves first... The text of the question is segmented into multiple words, and then the first word is calculated for each word. Intensity score on psychological trait dimension Then for the first All the words in the question Perform average pooling to obtain the question-level intensity score vector. .
[0045] It should be noted that by using the position encoding vector With trait projection embedding vector and intensity score vector The parts are stitched together and then fused using a learnable fusion projection matrix. The trait-aware offset is calculated using the sigmoid activation function, ultimately yielding the trait-aware fusion location encoding vector. This allows positional coding to dynamically adapt to psychological trait content, thereby capturing the dynamic relationship between question position and psychological traits. This enables the model to understand the psychological logic of question order. For example, when "frustration response" is asked before "recovery speed," positional coding can strengthen the association of the resilience dimension.
[0046] In a preferred embodiment, adjusting the feedforward network weight matrix of the gated feedforward network in the general language model based on the attention head output vector, the intensity score vector, and the trait-aware fusion position encoding vector, and using the adjusted general language model as the model to be trained, includes: Based on the attention head output vector, the intensity score vector, and the trait perception fusion location encoding vector, the decoupled multi-head attention vector for each psychological trait dimension is calculated. By concatenating the decoupled multi-head attention vectors and intensity score vectors of each psychological trait dimension, the trait gating vector of each psychological trait dimension is calculated. Based on the trait gating vectors and decoupled multi-head attention vectors of each psychological trait dimension, the weight matrix of the feedforward network of the gating feedforward network in the general language model is adjusted to determine the output vector of the gating feedforward network after adjustment. Based on the output vector of the adjusted gated feedforward network, the adjusted general language model is determined; The adjusted general language model is used as the model to be trained. Schematic, the decoupled multi-head attention vector for each psychological trait dimension is calculated based on the attention head output vector, the intensity score vector, and the trait perception fusion location encoding vector. The specific calculation process is as follows: ; In the formula, This represents the decoupled multi-head attention vector, which characterizes the attention information of each dimension after weighted fusion. Indicates the first The dynamic weights of psychological trait dimensions are used to weight the contribution of attention heads in each psychological trait dimension, ensuring that the dominant trait receives a higher weight; The layer normalization function is used to stabilize the training process; This represents the input vector, corresponding to the output of the previous step, such as the feature-aware fusion location encoding vector. Or the hidden state of the previous layer, within the Transformer block, the input vector It serves as the input to the current layer, provided by the sequence representation processed by the previous layer. Dynamic weights The calculation method is expressed as follows: ; In the formula, Indicates the first Scores for the psychological trait dimension; Indicates the first The score of a psychological trait dimension represents the relative importance of that psychological trait dimension, and is calculated as follows: , This represents the mapping parameter vector, which consists of trainable parameters used to map the intensity score vector to the weight score. This represents the natural exponential function.
[0047] Based on intensity score vector and mapping parameter vector Calculate dynamic weights The attention head output vectors of each psychological trait dimension are weighted and summed, and then decoupled multi-head attention vectors are obtained through layer normalization. This allows the model to adaptively emphasize dominant traits based on intensity scores. For example, when the intensity of the vitality dimension is high, the corresponding attention head receives a higher weight, enabling the model to avoid feature inhibition between dimensions and thus more accurately reflect the psychological traits of different students.
[0048] As an illustration, the dominant psychological dimensions differ across different assessment texts. For example, engineering students may emphasize action-oriented abilities, while art students may emphasize adaptability. However, existing gated feedforward networks treat all dimensions equally, preventing the model from adaptively emphasizing the dominant traits of different students and reducing the accuracy of personalized assessments. Therefore, adjustments are made to the gated feedforward network in the general language model to achieve adaptive emphasis on texts with different dominant traits. The specific steps are as follows: Specifically, firstly, the decoupled multi-head attention vectors and intensity score vectors of each psychological trait dimension are concatenated. Then, the trait gating vector for each psychological trait dimension is calculated using a learnable parameter matrix and a sigmoid activation function. This dynamically adjusts the information flow of each dimension of the feedforward network to ensure that the dominant trait receives stronger feature transformation. The specific calculation formula is as follows: ; In the formula, Indicates the first Trait gating vectors of the psychological trait dimension are used to dynamically adjust the gating feedforward network in the _____th ... Information flow along the psychological trait dimension ensures that the dominant trait achieves stronger characteristic transformation; represents the gating parameter matrix, which are trainable parameters used to map the concatenated vector to a gating scalar; Indicates the first Decoupling of multi-head attention vectors for psychological trait dimensions; In specific implementation, the first Decoupling of multi-head attention vectors in the psychological trait dimension It is a decoupling of multi-head attention vectors Components It can be considered equivalent to the first Attention head output vector of psychological trait dimension .
[0049] Specifically, based on the trait gating vectors and decoupled multi-head attention vectors of each psychological trait dimension, the feedforward network weight matrix of the gated feedforward network in the general language model is adjusted to determine the output vector of the adjusted gated feedforward network. The specific adjustment process is as follows: ; In the formula, This represents the output vector of the gated feedforward network, characterizing the features after gating. This indicates element-wise multiplication, used to adjust the output strength of the gated feedforward network according to the psychological trait dimension; Indicates the first The first-layer feedforward network weight matrix of the psychological trait dimension is a trainable parameter used to project the input onto the hidden layer; Indicates the first The second-layer feedforward network weight matrix for the psychological trait dimension is a trainable parameter used to project the hidden layer back to the output layer; This represents the Gaussian error linear unit activation function.
[0050] Decoupling multi-head attention vectors With intensity score vector Concatenation, through a learnable gating parameter matrix Calculate the trait gating vector using the Sigmoid activation function. Then use trait-gated vectors The source-wise modulated gated feedforward network output, the gating mechanism allows the general language model to dynamically adjust the feedforward network pathways of each dimension according to the intensity score, thereby emphasizing the dominant traits, so that the general language model can adapt to the dominant psychological dimensions of different students. For example, when engineering students focus on action ability, the gating value of the action ability dimension is higher, enhancing the feature transformation of this dimension. Based on the output vector of the adjusted gated feedforward network, the adjusted general language model is determined, and the adjusted general language model is used as the model to be trained.
[0051] S106. Train the model to be trained based on the employment psychological assessment question and answer dataset, and use the trained model as the employment psychological analysis model. In a preferred embodiment, the employment psychological assessment question-and-answer dataset further includes a first psychological trait dimension label and a first psychological trait intensity rating label corresponding to the content of each assessment text; The step of training the model to be trained based on the employment psychological assessment question-and-answer dataset, and using the trained model as an employment psychological analysis model, includes: Obtain positive and negative data subsets; wherein, in the positive data subset, the second psychological trait intensity rating label and the first psychological trait intensity rating label are in the same preset intensity range, and the second psychological trait dimension label in the positive data subset is consistent with the first psychological trait dimension label; the third psychological trait dimension label in the negative data subset is different from the first psychological trait intensity rating label; Using the employment psychological assessment question and answer dataset, the positive data subset, and the negative data subset, the model parameters of the model to be trained are trained in the first iteration, and the trained model is used as the model to be trained for optimization. Based on the employment psychological assessment question and answer dataset, the optimization and training model is trained in a second iteration, and the trained optimization and training model is used as the employment psychological analysis model. As an illustration, samples of different intensities under the same psychological trait dimension, such as occasional persistence and always persistence, need to be clearly distinguished. However, the conventional cross-entropy total loss function ignores intra-class differences and cannot effectively distinguish samples of different intensities, which can easily lead to blurred decision boundaries. Therefore, this application constructs positive data subsets and negative data subsets and calculates contrast loss to achieve the clustering of similar samples and the separation of dissimilar samples in the feature space to clarify the decision boundaries. Specifically, the positive data subset is considered as similar samples, where the second psychological trait intensity rating label and the first psychological trait intensity rating label in the positive data subset are within the same preset intensity range, and the second psychological trait dimension label in the positive data subset is consistent with the first psychological trait dimension label; the positive data subset is considered as differential samples, where the third psychological trait dimension label in the negative data subset is different from the first psychological trait intensity rating label, as shown below: ; In the formula, Indicates the first The positive data subset of the psychological trait dimension contains samples with similar psychological trait strength scores under the same psychological trait dimension label as the employment psychological assessment question and answer dataset, which are used to construct similar sample pairs; Indicates the first The negative data subset of the psychological trait dimension, which contains samples with different labels from the psychological trait dimension of the employment psychological assessment question and answer dataset, is used to construct differential sample pairs; Indicates the sample index in the positive data subset; Indicates the sample index in the negative data subset; Indicates the first positive data subset The sample at the th The second psychological trait dimension label on the psychological trait dimension represents the true label, used to identify the psychological trait category of the sample, and is obtained by manual annotation; The label represents the first psychological trait dimension of the samples in the employment psychological assessment question and answer dataset, and is a true label obtained by manual annotation. This indicates that the i-th sample in the positive data subset is in the... Intensity score vector on the psychological trait dimension; This indicates that the sample in the employment psychological assessment question and answer dataset is in the th... Intensity score vector on the psychological trait dimension; Indicates the first negative data subset The sample at the th The third psychological trait dimension label on the psychological trait dimension; Indicates the strength tolerance threshold, preferably set as follows: , used to set a preset intensity range.
[0052] In practical implementation, Indicates the first The sample at the th Intensity score vector on the psychological trait dimension It is the first The intensity score vector of the psychological trait dimension. yes In the sample The specific scalar value, that is, for the th The intensity score vector calculated from the nth sample is the th... The elements are ;and, Indicates the current sample is at the th . The intensity score vector on the psychological trait dimension, and Similar, but Refers to a vector, and It is a scalar. Directly derived from the current sample The Each element.
[0053] In a preferred embodiment, the step of using the employment psychological assessment question-and-answer dataset, the positive data subset, and the negative data subset to perform a first iteration of training on the model parameters of the model to be trained, and using the trained model as the model to be trained for optimization, includes: Based on the employment psychological assessment question and answer dataset, the positive data subset, and the negative data subset, the training model to be trained is subjected to a first iteration of training until a preset first convergence condition is reached, the first iteration of training is terminated, and the trained model to be trained is used as the model to be trained for optimization. In each training process, the contrast loss is calculated based on the first feature output vector, the second feature output vector, and the third feature output vector corresponding to each psychological trait dimension generated by the current model to be trained. Based on the contrastive loss, the model parameters of the model to be trained are adjusted to obtain the model to be trained in the next training iteration; wherein, the first feature output vector is calculated based on the employment psychological assessment question-and-answer dataset; the second feature output vector and the third feature output vector are calculated based on the union of the positive data subset and the negative data subset; Specifically, the contrastive loss is calculated based on the first feature output vector, second feature output vector, and third feature output vector corresponding to each psychological trait dimension generated by the current model to be trained. The specific calculation formula is as follows: ; In the formula, Indicates the first Contrast loss in the psychological trait dimension is used to enhance the clustering of similar samples and the separation of dissimilar samples in the feature space; This represents a logarithmic function, with the default base being the natural constant. Indicates the first The first feature output vector in the psychological trait dimension; This represents the i-th sample in the union of the positive and negative data subsets. The second feature output vector in the psychological trait dimension; This represents the i-th sample in the union of the positive and negative data subsets. The second feature output vector in the psychological trait dimension; This represents the temperature coefficient.
[0054] Indicates the current sample is at the th . The first feature output vector in the psychological trait dimension comes from the output of the model's gated feedforward network. Specifically, will The input is fed into multiple dimension-specific fully connected layers, with each dimension corresponding to an independent fully connected layer. Each fully connected layer is responsible for processing the input. Projecting onto its corresponding dimensional subspace, the feature vector output by the d-th fully connected layer is the feature vector of the current sample at the d-th dimension. First feature output vector on the psychological trait dimension , and The method of obtaining them is the same.
[0055] It should be noted that, for each psychological trait dimension, the positive data subset... Includes samples with the same dimensional labels as the current sample and whose intensity scores differ from the intensity tolerance threshold. (i.e., samples located within a preset intensity range), while negative data subsets Including samples with different dimensional labels allows the model to bring similar samples of similar intensity closer together in the feature space, while pushing away samples of different classes, thus clearly defining intra-class and inter-class boundaries; furthermore, contrastive loss... By using cosine similarity and temperature coefficient, the similarity between the current sample features and the positive and negative sample features is calculated through Softmax normalization, and negative log loss is applied, enabling the model to learn a more compact intra-class distribution and a more separated inter-class distribution.
[0056] To better illustrate this application, in one embodiment, the effectiveness of trait contrastive learning is analyzed, demonstrating its optimization effect on the decision boundary through feature space distribution. The experiment uses three types of psychological trait samples (resilience, vitality, and adaptability), comparing the feature distributions of cases without and with contrastive learning. See [link to relevant documentation]. Figure 6 and Figure 7 , Figure 6 and Figure 7 The horizontal and vertical axes represent the two main dimensions (dimensionless) of the feature space. Figure 6 The scatter plot shows that without contrastive learning, the three classes of samples are severely mixed in the feature space, especially the boundary between the viability samples (orange) and the fitness samples (green) is blurred. Figure 7 The scatter plot clearly shows the effect of contrastive learning: resilient samples (blue) cluster in the lower left region, energetic samples (orange) concentrate in the middle region, and adaptable samples (green) are distributed in the upper right region. These samples form tightly clustered groups with clearly defined boundaries. This distribution change demonstrates that contrastive learning effectively solves the intra-class clustering problem for samples with varying intensity, such as "occasionally persisting versus always persisting," reducing the distance between samples of similar intensity within the same class and increasing the distance between samples of different classes, significantly improving the model's ability to distinguish fine-grained psychological characteristics.
[0057] In a preferred embodiment, the step of performing a second iteration of training on the optimization-to-train model based on the employment psychological assessment question-and-answer dataset, and using the trained optimization-to-train model as the employment psychological analysis model, includes: The employment psychological assessment question and answer dataset is input into the optimization and training model, and the optimization and training model is trained in a second iteration until the fully trained optimization and training model is obtained. The optimized training model is used as the employment psychological analysis model. The second iteration of training includes: The predicted psychological trait strength scores of each psychological trait dimension obtained by the current fine-tuning and training model based on the input data are compared with the corresponding first psychological trait dimension label and first psychological trait strength score label. The current total loss function value is calculated based on the comparison results. Determine whether the current total loss function value satisfies the preset second convergence condition. If so, terminate the second iteration of training to obtain the trained and optimized model. If not, adjust the model parameters of the current training model and proceed with the next training iteration; Specifically, based on the output vector of the gated feedforward network, the predicted psychological trait strength score for each psychological trait dimension is calculated and output using dimension-specific weight vectors and bias terms, as follows: ; In the formula, Indicates the first Predicting the strength score of psychological traits across dimensions, such as resilience. It is a score from 0 to 1, indicating the student's level of resilience, such as 0.8 indicating high resilience; Indicates the first The predicted weight vector for the psychological trait dimension is a trainable parameter used to map the output vector of the gated feedforward network to the dimension score. for transpose; The bias term in the d-th dimension is a trainable parameter; Specifically, the predicted psychological trait strength scores for each psychological trait dimension obtained by the current fine-tuning and training model based on the input data are compared with the corresponding first psychological trait dimension labels and first psychological trait strength score labels. The current total loss function value is calculated based on the comparison results. The specific calculation process is as follows: ; In the formula, This represents the total loss function value; denoted as cross-entropy loss, used for classification tasks, is calculated based on the predicted mental trait strength score and the corresponding first mental trait strength score label; This represents the covariance constraint loss, used to force predicted scores to conform to prior correlations between dimensions. Its calculation method is as follows: ; In the formula, The covariance of the predicted psychological trait intensity scores for the a-th and b-th psychological trait dimensions is represented by the covariance matrix calculated using the predicted psychological trait intensity scores of all samples in the batch. This represents the Frobenius norm, used to calculate the magnitude of matrix differences; This represents the predicted psychological trait strength score for the a-th psychological trait dimension; This represents the predicted psychological trait strength score for the b-th psychological trait dimension; This represents the prior covariance between the a-th and b-th psychological trait dimensions predefined by experts, derived from the prior matrix. ; The prior matrix is an expert-defined dimensional covariance prior matrix with dimension 1. The elements in the matrix represent the prior values of covariance between dimensions. For example, resilience and adaptability may have a positive covariance of 0.3, while vitality and drive may have a covariance of 0.2. The diagonal elements of the matrix are usually 1.0, representing the variance of the dimension itself.
[0058] By employing covariance-constrained loss to model the psychological dependencies between psychological trait dimensions, the correlation that might be overlooked by independent prediction is avoided. The predicted trait strength scores are then calculated using dimension-specific prediction weight vectors. and bias terms The output vector from the gated feedforward network The calculation is obtained, and then the covariance constraint loss is... By comparing the Frobenius norm difference between the covariance matrix of the predicted score and the prior covariance matrix defined by the expert, the prediction results are forced to conform to psychological priors. For example, there is usually a positive correlation between resilience and adaptability, so the prior covariance is set to a positive value. Vitality and drive may also be positively correlated. This makes the model consider not only the independent information of each dimension when making predictions, but also the interaction between dimensions, thus outputting a comprehensive score that is more in line with psychological theory.
[0059] Specifically, the training process of the model to be trained adopts an adaptive learning rate algorithm (such as AdamW), and calculates the gradient and updates the model parameters through a multi-task joint loss function (including cross-entropy loss, contrastive loss and covariance constraint loss). During the training process, the performance indicators on the validation set are continuously monitored, including the classification accuracy of each dimension, the mean square error of intensity prediction and the total loss function value. The preset second convergence condition is that the total loss of the validation set does not show a significant decrease for several consecutive training cycles (such as 5 cycles), or reaches the preset maximum number of training cycles. At this time, the model parameters with the best performance on the validation set are saved as the final employment psychology analysis model to avoid overfitting.
[0060] See Figure 8 This is an embodiment of an employment psychology analysis method provided by the present invention, comprising: S201. Obtain the employment psychological assessment text content input by the user; S202. Input the employment psychological assessment text content into the employment psychological analysis model to obtain the psychological trait intensity scores under each psychological trait dimension output by the employment psychological analysis model; the employment psychological analysis model is determined by the employment psychological analysis model construction method described above. Specifically, when the employment psychology analysis model is applied to actual college students' employment psychology assessment, it first receives the employment psychology assessment text content (such as open-ended questionnaire answers or interview records) input by the user. After preprocessing such as word segmentation, truncation, or filling, the employment psychology assessment text content is input into the employment psychology analysis model. The employment psychology analysis model decouples the employment psychology assessment text content into various psychological trait dimensions and calculates the intensity score vector of each psychological trait dimension. It combines attention distillation coding and trait perception location coding to capture cross-question correlations and question sequence logic. It strengthens the dominant traits by decoupling multi-head attention and dynamic dimension gating. Finally, it generates the psychological trait intensity scores of each psychological trait dimension and the comprehensive psychological assessment results through a multi-dimensional joint prediction layer. The employment psychological analysis model outputs psychological trait strength scores for each dimension (resilience, vitality, adaptability, intrinsic motivation, and youthfulness), strength analysis curves, and an integrated recommendation report based on the correlation between dimensions, providing data support for employment guidance. The entire reasoning process is automated, supporting high-concurrency requests and ensuring the real-time nature and consistency of the assessment results.
[0061] See Figure 9 To better illustrate the invention, in one embodiment, the accuracy of different methods on psychological trait dimensions was compared to evaluate the classification accuracy of different assessment methods on each psychological trait dimension. The experiment compared four assessment methods: conventional support vector machine method, conventional pre-trained language model fine-tuning method, psychological scale analysis method, and the technical method proposed in this invention. In the experimental configuration, the same test dataset (containing employment psychology questionnaire text) was used, with five dimension labels annotated by psychology experts as the evaluation benchmark. In the figure, the horizontal axis represents the psychological trait dimensions (resilience, vitality, adaptability, drive, youthfulness), and the vertical axis represents the accuracy (value range 0-1, dimensionless). The experimental results show that the technical method proposed in this invention has significantly higher accuracy in all five dimensions than other methods. In particular, the advantages of the technical method proposed in this invention are most prominent in the adaptability and youthfulness dimensions. The conventional support vector machine method performs weakly in the vitality dimension, the conventional pre-trained language model has shortcomings in the resilience dimension, and the psychological scale method has significantly lower accuracy in the adaptability dimension. The technical method proposed in this invention effectively solves the problem of multi-dimensional psychological trait coupling through innovative modules such as trait deconstruction embedding and dynamic dimensional gating, thus maintaining optimal and stable classification performance across all dimensions. The height differences in the bar chart intuitively demonstrate the technical advantages of the proposed method in capturing fine-grained psychological features.
[0062] See Figure 10 To better illustrate the invention, in one embodiment, the errors of different methods in predicting the intensity of psychological traits are compared to evaluate the prediction errors of different methods in quantifying the intensity of psychological trait expression. The experiment uses five levels of intensity-labeled data (weak, relatively weak, moderate, relatively strong, and strong) as a benchmark, comparing the mean squared errors of intensity prediction using conventional support vector machines, fine-tuning of ordinary pre-trained language models, psychological scales, and the present invention. In the figure, the horizontal axis represents the intensity level of the psychological trait, and the vertical axis represents the mean squared error (dimensionless). The line graph shows that the error curve of the proposed method is consistently at the lowest level, especially showing the most significant advantage at the moderate intensity level. The conventional support vector machine method has the largest error at the "strong" level, the ordinary pre-trained language model performs poorly at the "weak" level, and the psychological scale method exhibits large overall error fluctuations. The proposed method achieves continuous quantification of psychological trait intensity through an intensity anchor word set and an intensity score calculation module. The error trend shown in the line graph proves that the technical method proposed in this invention can more accurately capture the gradual process from "weak" to "strong", solves the problem of increased error in conventional methods at extreme intensity levels, and provides reliable technical support for fine-grained psychological assessment.
[0063] See Figure 11 and Figure 12To better illustrate the invention, in one embodiment, the feature space separation effect of trait contrastive learning is analyzed to verify the advantages of the trait contrastive learning mechanism in feature space organization. The experiment uses scatter plots to show the distribution of five psychological trait samples in a two-dimensional feature space using conventional methods and the method of the present invention; different colors represent different psychological dimensions. The conventional method uses the basic BERT model, and its feature space distribution scatter plot shows severe overlap and blurred boundaries among samples of different categories in the feature space of the conventional method. The scatter plot of the feature space distribution of the proposed method shows that the samples of different categories are more tightly clustered and the separation between categories is clearer. To quantitatively analyze the feature space separation effect, the experiment calculates three key indicators: average intra-class distance, average inter-class distance, and separation ratio. Intra-class distance reflects the degree of clustering of samples of the same category, inter-class distance reflects the degree of separation of samples of different categories, and the separation ratio comprehensively measures the discriminative ability of the feature space. The bar chart comparison shows that the average intra-class distance of the method in this invention is significantly smaller than that of the conventional method, indicating that samples of the same class are more compact in the feature space; the average inter-class distance is significantly larger than that of the conventional method, indicating better separation of samples of different classes; the significant improvement in the separation ratio further confirms the optimization effect of the feature space organization. Experimental results show that the trait contrast learning mechanism, by constructing positive and negative sample pairs, brings samples of the same class with similar intensity closer together in the feature space, while pushing away samples of different classes, thereby clarifying the intra-class and inter-class boundaries and improving the model's ability to discriminate psychological traits.
[0064] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method of constructing an employment psychological analysis model, characterized by, The method comprises the following steps: obtaining an employment psychological test and answer data set, and a center vector, a low expression intensity reference vector, a high expression intensity reference vector, an attention head output vector and a projection matrix of each psychological trait dimension; wherein the data set comprises a plurality of test text contents; the center vector is used to represent the typical semantic expression characteristics of the corresponding psychological trait dimension; loading a general language model, using the general language model to generate original embedding vectors of each word in the test text content, and assigning a corresponding dynamic allocation weight to each psychological trait dimension according to the center vector and the original embedding vectors; generating a trait projection embedding vector of each word according to the projection matrix, the dynamic allocation weight and the original embedding vector; calculating an intensity score vector of each psychological trait dimension according to the trait projection embedding vector, the low expression intensity reference vector and the high expression intensity reference vector; generating a position encoding vector of each psychological test question in the test text content, adjusting a gated feedforward network of the general language model according to the position encoding vector, the trait projection embedding vector, the intensity score vector and the attention head output vector, and taking the adjusted general language model as a to-be-trained model; training the to-be-trained model according to the employment psychological test and answer data set, and taking the trained to-be-trained model as an employment psychological analysis model.
2. The employment psychological analysis model construction method of claim 1, wherein, The method for generating a position encoding vector of each psychological test question in the test text content, adjusting a gated feedforward network of the general language model according to the position encoding vector, the trait projection embedding vector, the intensity score vector and the attention head output vector, and taking the adjusted general language model as a to-be-trained model comprises the following steps: generating a position encoding vector of each psychological test question in the test text content, calculating a trait perception fusion position encoding vector of each psychological trait dimension according to the position encoding vector, the trait projection embedding vector and the intensity score vector; adjusting a feedforward network weight matrix of the gated feedforward network of the general language model according to the attention head output vector, the intensity score vector and the trait perception fusion position encoding vector, and taking the adjusted general language model as a to-be-trained model.
3. The employment psychological analysis model construction method of claim 1, wherein, The determination process of the center vector, the low expression intensity reference vector and the high expression intensity reference vector of each psychological trait dimension comprises the following steps: obtaining anchor words corresponding to different psychological trait dimensions; generating a first original embedding vector of each anchor word by using the general language model; calculating the center vector of each psychological trait dimension based on the first original embedding vectors of all anchor words under each psychological trait dimension; obtaining high expression intensity anchor words and low expression intensity anchor words corresponding to different psychological trait dimensions; generating a second original embedding vector corresponding to each high expression intensity anchor word and a third original embedding vector corresponding to each low expression intensity anchor word by using the general language model; calculating the high expression intensity reference vector of each psychological trait dimension based on the second original embedding vectors of the high expression intensity anchor words corresponding to each psychological trait dimension; calculating the low expression intensity reference vector of each psychological trait dimension based on the third original embedding vectors of the low expression intensity anchor words corresponding to each psychological trait dimension. The low-expression intensity benchmark vector of each psychological trait dimension is calculated based on the third original embedding vector of the low-expression intensity anchor word corresponding to each psychological trait dimension.
4. The employment psychological analysis model construction method of claim 1, wherein, The determination process of the attention head output vector includes: calculating a first attention matrix between the question texts of each psychological test question; based on the first attention matrix, repeatedly performing an optimization operation until a target attention matrix of each psychological trait dimension is obtained; determining the attention head output vector of each psychological trait dimension according to the target attention matrix of each psychological trait dimension; wherein the optimization operation includes: based on the current first attention projection matrix of each psychological trait dimension, performing dimension reduction projection on the first attention matrix to generate the current second attention matrix of each psychological trait dimension; wherein when the optimization operation is first performed, the current first attention projection matrix of each psychological trait dimension is the corresponding initial attention projection matrix; calculating the KL divergence between the current second attention matrix of each psychological trait dimension and the first attention matrix; based on the KL divergence, calculating the current attention distillation loss, and determining whether the current attention distillation loss meets a preset convergence condition, if yes, terminating the optimization operation and taking the current second attention matrix of each psychological trait dimension as the corresponding target attention matrix, if no, updating the first attention projection matrix and performing the next optimization operation according to the updated first attention projection matrix.
5. The employment psychological analysis model construction method of claim 1, wherein, The intensity score vector of each psychological trait dimension is calculated based on the trait projection embedding vector, the low-expression intensity benchmark vector and the high-expression intensity benchmark vector, including: for each sentence in the test text content, a preset sliding window is used to traverse the current sentence, and in the traversal process, the local intensity score vector of the current window position under each psychological trait dimension is calculated according to the trait projection embedding vector corresponding to the words contained in the current window position, combined with the high-expression intensity benchmark vector and the low-expression intensity benchmark vector of each psychological trait dimension; for each psychological trait dimension, the average of all local intensity score vectors under the current psychological trait dimension is taken to obtain the intensity score vector of the current psychological trait dimension.
6. The employment psychological analysis model construction method of claim 2, wherein, The feedforward network weight matrix of the gated feedforward network in the general language model is adjusted according to the attention head output vector, the intensity score vector and the trait perception fusion position encoding vector, and the adjusted general language model is taken as the to-be-trained model, including: the decoupled multi-head attention vector of each psychological trait dimension is calculated according to the attention head output vector, the intensity score vector and the trait perception fusion position encoding vector; the trait gating vector of each psychological trait dimension is calculated by splicing the decoupled multi-head attention vector and the intensity score vector of each psychological trait dimension; the feedforward network weight matrix of the gated feedforward network in the general language model is adjusted according to the trait gating vector and the decoupled multi-head attention vector of each psychological trait dimension, and the output vector of the adjusted gated feedforward network is determined; the adjusted general language model is determined according to the output vector of the adjusted gated feedforward network. The adjusted general language model is taken as a to-be-trained model.
7. The employment psychological analysis model construction method of claim 1, wherein, The employment psychological assessment question and answer data set further comprises a first psychological characteristic dimension label and a first psychological characteristic intensity score label corresponding to each assessment text content. The training of the to-be-trained model according to the employment psychological assessment question and answer data set comprises: obtaining a positive data subset and a negative data subset; wherein the second psychological characteristic intensity score label in the positive data subset is in the same preset intensity interval as the first psychological characteristic intensity score label, and the second psychological characteristic dimension label in the positive data subset is consistent with the first psychological characteristic dimension label; the third psychological characteristic dimension label in the negative data subset is different from the first psychological characteristic intensity score label; performing first iterative training on model parameters of the to-be-trained model by using the employment psychological assessment question and answer data set, the positive data subset and the negative data subset, and taking the trained to-be-trained model as an optimized to-be-trained model; performing second iterative training on the optimized to-be-trained model according to the employment psychological assessment question and answer data set, and taking the trained optimized to-be-trained model as the employment psychological analysis model.
8. The employment psychological analysis model construction method of claim 7, wherein, The first iterative training on the model parameters of the to-be-trained model by using the employment psychological assessment question and answer data set, the positive data subset and the negative data subset, and taking the trained to-be-trained model as an optimized to-be-trained model comprises: performing first iterative training on the to-be-trained model according to the employment psychological assessment question and answer data set, the positive data subset and the negative data subset until a preset first convergence condition is reached, and terminating the first iterative training, taking the trained to-be-trained model as an optimized to-be-trained model; wherein, in the process of each training, the first feature output vector, the second feature output vector and the third feature output vector corresponding to each psychological characteristic dimension generated by the current to-be-trained model are calculated to obtain a contrast loss; adjusting the model parameters of the to-be-trained model according to the contrast loss to obtain the to-be-trained model for the next training; wherein the first feature output vector is calculated based on the employment psychological assessment question and answer data set; the second feature output vector and the third feature output vector are calculated based on the union of the positive data subset and the negative data subset.
9. The employment psychological analysis model construction method of claim 7, wherein, The second iterative training on the optimized to-be-trained model according to the employment psychological assessment question and answer data set, and taking the trained optimized to-be-trained model as the employment psychological analysis model comprises: inputting the employment psychological assessment question and answer data set into the optimized to-be-trained model, performing second iterative training on the optimized to-be-trained model until the trained optimized to-be-trained model is obtained; taking the trained optimized to-be-trained model as the employment psychological analysis model; wherein, the second iterative training comprises: The prediction psychological characteristic intensity score of each psychological characteristic dimension predicted by the current to-be-optimized training model according to the input data is compared with the corresponding first psychological characteristic dimension label and first psychological characteristic intensity score label, and a current total loss function value is calculated according to a comparison result; It is judged whether the current total loss function value meets a preset second convergence condition, If yes, the second iterative training is terminated, and a trained to-be-optimized training model is obtained, If no, the model parameters of the current to-be-optimized training model are adjusted, and the next training is performed.
10. An employment psychological analysis method characterized by comprising: It comprises: Obtaining the employment psychological evaluation text content input by the user; The employment psychological analysis model is input into the employment psychological analysis model, and the psychological characteristic intensity score under each psychological characteristic dimension output by the employment psychological analysis model is obtained; the employment psychological analysis model is determined by the employment psychological analysis model construction method in any one of claims 1-9.