Training methods for psychological crisis early warning models and methods for psychological crisis early warning

By acquiring datasets of explicit and implicit psychological crises, a psychological crisis early warning model was trained. By utilizing style transfer and reinforcement learning, the problem of existing models' inability to identify implicitly expressed psychological crisis data was solved, achieving accurate detection of implicitly expressed data and accurate identification of multiple crisis types.

CN122135962APending Publication Date: 2026-06-02IFLYTEK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
IFLYTEK CO LTD
Filing Date
2026-02-03
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing psychological crisis early warning models struggle to accurately identify implicitly expressed psychological crisis data, especially those expressed through homophones, metaphors, or allusions, leading to significant detection difficulties and an inability to achieve precise detection.

Method used

By acquiring a psychological crisis dataset containing explicit and implicit expressive styles, a psychological crisis early warning model is trained. Style transfer, semantic feature extraction, and reinforcement learning are used to enhance the model's ability to style transfer and classify psychological crises from implicit expressive data.

Benefits of technology

This improved the accuracy of the psychological crisis early warning model in detecting implicit expression data, reduced the detection difficulty, and enhanced the model's ability to generalize psychological crisis data of different crisis types and expression styles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122135962A_ABST
    Figure CN122135962A_ABST
Patent Text Reader

Abstract

This invention provides a training method for a psychological crisis early warning model and a psychological crisis early warning method, relating to the field of natural language processing technology. Through the psychological crisis early warning model, implicit expression data undergoes style transformation to obtain style transformation results. These results are then used to classify psychological crises, yielding target crisis classification results. The psychological crisis early warning model is then trained using the style transformation results, the target crisis classification results, and the explicit expression data corresponding to the implicit expression data. This training enables the target psychological crisis early warning model to possess strong style transformation and psychological crisis classification capabilities, thereby reducing the difficulty of detecting implicit psychological crisis data and improving the accuracy of detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a method for training a psychological crisis early warning model and a method for early warning of psychological crises. Background Technology

[0002] As artificial intelligence-related technologies mature, their application in the field of mental health services continues to deepen. For example, conducting early screening for mental health crises through online dialogue data can effectively compensate for the shortcomings of traditional manual screening, such as limited coverage and low response efficiency, and provide important support for timely intervention in mental health crises.

[0003] In psychological crisis early warning scenarios, psychological crisis detection is typically achieved through psychological crisis early warning models. For psychological crisis data explicitly expressed through methods such as directly containing dangerous words, these models can achieve high recognition accuracy. However, for psychological crisis data implicitly expressed through homophones, metaphors, or allusions, the detection difficulty increases significantly. A seemingly ordinary conversation may conceal serious psychological crisis data due to the use of specific homophones or subtle semantic hints; failure to accurately identify this could lead to missed opportunities for crucial intervention. Therefore, enabling psychological crisis early warning models to accurately detect implicitly expressed psychological crisis data in conversations is of great significance for the application of artificial intelligence in the field of mental health crisis early warning. Summary of the Invention

[0004] This invention provides a training method for a psychological crisis early warning model and a psychological crisis early warning method to address the deficiencies in related technologies.

[0005] This invention provides a method for training a psychological crisis early warning model, comprising: Obtain a psychological crisis dataset; the psychological crisis dataset includes psychological crisis data with different expression styles, and the psychological crisis data includes explicit expression data and implicit expression data with corresponding relationships; Based on the psychological crisis early warning model, the implicit expression data is subjected to expression style transformation to obtain style transformation results, and the style transformation results are then used to classify psychological crises to obtain target crisis classification results. The psychological crisis early warning model is trained based on the style transfer results, the target crisis classification results, and the explicit expression data corresponding to the implicit expression data.

[0006] According to a training method for a psychological crisis early warning model provided by the present invention, the psychological crisis dataset includes psychological crisis data of multiple crisis types; The training of the psychological crisis early warning model based on the style transfer results, the target crisis classification results, and the explicit expression data corresponding to the implicit expression data includes: Calculate the crisis consistency reward between the crisis type of the implicit expression data and the target crisis classification result, and extract the semantic features of the style transfer result as the first semantic feature and the semantic features of the implicit expression data as the second semantic feature. Based on the first semantic feature and the second semantic feature, a semantic consistency reward is calculated, and the psychological crisis early warning model is trained based on the crisis consistency reward and the semantic consistency reward.

[0007] According to the psychological crisis early warning model training method provided by the present invention, the step of training the psychological crisis early warning model based on the crisis consistency reward and the semantic consistency reward includes: Based on the psychological crisis early warning model, the target style classification result of the psychological crisis data is determined, and based on the target style classification result and the expression style corresponding to the psychological crisis data, the expression style consistency reward is calculated. The psychological crisis early warning model is trained based on the aforementioned expression style consistency reward.

[0008] According to a training method for a psychological crisis early warning model provided by the present invention, the step of extracting the semantic features of the style transfer result as the first semantic feature and the semantic features of the implicit expression data as the second semantic feature includes: Based on the semantic measurement model, the first semantic feature and the second semantic feature are extracted respectively; the semantic measurement model is obtained by comparative learning of semantic features based on the explicit expression data, the implicit expression data and the normal expression data.

[0009] According to a training method for a psychological crisis early warning model provided by the present invention, the step of training the psychological crisis early warning model based on the style transfer result, the target crisis classification result, and the explicit expression data corresponding to the implicit expression data includes: Based on the aforementioned psychological crisis early warning model, the psychological crisis data is classified into crisis categories to determine the initial crisis classification results. Based on the initial crisis classification results and the crisis types corresponding to the psychological crisis data, the crisis classification loss is calculated, and the psychological crisis early warning model is trained based on the crisis classification loss.

[0010] According to a training method for a psychological crisis early warning model provided by the present invention, the step of training the psychological crisis early warning model based on the style transfer result, the target crisis classification result, and the explicit expression data corresponding to the implicit expression data includes: Based on the aforementioned psychological crisis early warning model, the psychological crisis data is classified in style to determine the initial style classification results; Based on the initial style classification results and the expression styles corresponding to the psychological crisis data, the style classification loss is calculated, and the psychological crisis early warning model is trained based on the style classification loss.

[0011] According to the psychological crisis early warning model training method provided by the present invention, the step of acquiring the psychological crisis dataset includes: Obtain an initial psychological dialogue dataset, and based on the psychological crisis early warning model, perform style classification on the initial psychological dialogue dataset to determine the implicit and explicit expression dialogue data in the initial psychological dialogue dataset. The implicit expression dialogue data is explicitly rewritten to obtain explicit rewriting results, and the explicit expression data is implicitly rewritten for different implicit expression categories to obtain implicit rewriting results. Determine the crisis type of the implicit expression dialogue data, the explicit rewriting result, the explicit expression dialogue data, and the implicit rewriting result; The psychological crisis dataset is constructed based on the implicit expression dialogue data, the explicit rewriting results, the explicit expression dialogue data, the implicit rewriting results, and their corresponding crisis types.

[0012] According to a training method for a psychological crisis early warning model provided by the present invention, determining the crisis type of the implicit expression dialogue data, the explicit rewriting result, the explicit expression dialogue data, and the implicit rewriting result includes: Based on the semantic consistency between the implicit expression dialogue data and the explicit rewriting result, the implicit expression dialogue data and the explicit rewriting result are filtered to obtain a first filtering result. Based on the semantic consistency between the explicit expression dialogue data and the implicit rewriting result, the explicit expression dialogue data and the implicit rewriting result are filtered to obtain a second filtering result. Based on multi-model voting, crisis types are generated for the first screening result and the second screening result, respectively.

[0013] According to the training method for a psychological crisis early warning model provided by the present invention, each of the crisis types corresponds to a thought chain; the thought chain is used to represent the logical reasoning process for determining the corresponding crisis type.

[0014] This invention also provides a method for early warning of psychological crises, comprising: Obtain the dialogue data to be detected; The dialogue data to be detected is input into the target psychological crisis early warning model to obtain the psychological crisis early warning result of the dialogue data to be detected output by the target psychological crisis early warning model. The target psychological crisis early warning model is trained based on the aforementioned psychological crisis early warning model training method.

[0015] The present invention also provides a training device for a psychological crisis early warning model, comprising: The dataset acquisition module is used to acquire a psychological crisis dataset; the psychological crisis dataset includes psychological crisis data with different expression styles, and the psychological crisis data includes explicit expression data and implicit expression data with corresponding relationships; The crisis classification module is used to perform expression style transformation on the implicit expression data based on the psychological crisis early warning model, obtain the style transformation result, and perform psychological crisis classification on the style transformation result to obtain the target crisis classification result. The model training module is used to train the psychological crisis early warning model based on the style transfer results, the target crisis classification results, and the explicit expression data corresponding to the implicit expression data.

[0016] The present invention also provides a psychological crisis early warning device, characterized in that it comprises: The data acquisition module is used to acquire the dialogue data to be detected. The model application module is used to input the dialogue data to be detected into the target psychological crisis early warning model, and obtain the psychological crisis early warning result of the dialogue data to be detected output by the target psychological crisis early warning model. The target psychological crisis early warning model is trained based on the aforementioned psychological crisis early warning model training method.

[0017] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the psychological crisis early warning model training method or the psychological crisis early warning method as described above.

[0018] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the psychological crisis early warning model training method or the psychological crisis early warning method as described above.

[0019] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the psychological crisis early warning model training method or the psychological crisis early warning method as described above.

[0020] The present invention provides a training method and a method for psychological crisis early warning model training. Through a psychological crisis early warning model, it performs style transformation on implicit expression data to obtain style transformation results. These results are then used to classify psychological crises, yielding target crisis classification results. The model is then trained using the style transformation results, target crisis classification results, and corresponding explicit expression data. This training enables the target psychological crisis early warning model to possess strong style transformation and psychological crisis classification capabilities, thereby reducing the difficulty of detecting implicit psychological crisis data and improving the accuracy of its detection. The target psychological crisis early warning model trained using this method can be applied to online psychological counseling platforms, adolescent mental health monitoring systems, and family emotional interaction analysis tools, providing technical support for early intervention in psychological crises. Attached Figure Description

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

[0022] Figure 1 This is one of the flowcharts illustrating the training method for the psychological crisis early warning model provided by this invention.

[0023] Figure 2 This is the second flowchart of the training method for the psychological crisis early warning model provided by the present invention.

[0024] Figure 3 This is the third flowchart of the training method for the psychological crisis early warning model provided by this invention.

[0025] Figure 4 This is the fourth flowchart of the training method for the psychological crisis early warning model provided by this invention.

[0026] Figure 5 This is the fifth flowchart illustrating the training method for the psychological crisis early warning model provided by this invention.

[0027] Figure 6 This is a schematic diagram of the process for obtaining a psychological crisis dataset in the training method for a psychological crisis early warning model provided by the present invention.

[0028] Figure 7 This is a flowchart illustrating the psychological crisis early warning method provided by the present invention.

[0029] Figure 8 A schematic diagram of the structure of the psychological crisis early warning model training device provided by the present invention.

[0030] Figure 9 A schematic diagram of the structure of the psychological crisis early warning device provided by the present invention.

[0031] Figure 10 A schematic diagram of the structure of the electronic device provided by the invention. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0033] Most existing psychological crisis early warning models adopt traditional supervised learning models or large language models. Supervised learning models can identify psychological crises by learning the inherent patterns in the training set. However, they can only learn the mapping relationship between explicit keywords and labels in the training set. They cannot capture the deep connections between words in implicit expressions through metaphors, homophones, etc., and it is difficult to accurately judge implicit expressions.

[0034] While large language models can solve classification tasks and thus determine the presence of psychological crises through their semantic understanding capabilities, their focus on conventional semantics and low sensitivity to homophones make it difficult to identify psychological crises expressed through homophones, resulting in such crisis signals being difficult to accurately recognize.

[0035] In summary, existing technologies do not consider the performance differences of psychological crisis early warning models on explicitly expressed and implicitly expressed psychological crisis data. They process explicitly and implicitly expressed psychological crisis data uniformly without specifically utilizing implicitly expressed data. Consequently, the performance of psychological crisis early warning models on implicitly expressed psychological crisis data is poor, making it difficult for them to detect psychological crisis data implicitly expressed through homophones, metaphors, or allusions, thus hindering accurate detection.

[0036] Based on this, this embodiment of the invention provides a method for training a psychological crisis early warning model, such as... Figure 1 As shown, the method includes: S11, Obtain a psychological crisis dataset; the psychological crisis dataset includes psychological crisis data with different expression styles, and the psychological crisis data includes explicit expression data and implicit expression data with corresponding relationships; S12, Based on the psychological crisis early warning model, the implicit expression data is subjected to expression style transformation to obtain style transformation results, and the style transformation results are subjected to psychological crisis classification to obtain target crisis classification results; S13, Based on the style transfer results, the target crisis classification results, and the explicit expression data corresponding to the implicit expression data, the psychological crisis early warning model is trained.

[0037] Specifically, the psychological crisis early warning model training method provided in this embodiment of the invention is executed by a psychological crisis early warning model training device, which can be configured in a computer. The computer can be a local computer or a cloud computer. The local computer can be a computer, tablet, etc., and no specific limitation is made here.

[0038] First, execute step S11 to obtain the psychological crisis dataset. This dataset can include psychological crisis data with different expression styles. Different expression styles can include explicit and implicit expressions. Explicit expression refers to directly expressing negative emotions through clearly defined words, while implicit expression refers to implicitly expressing negative emotions through homophones, metaphors, allusions, etc. Here, the psychological crisis data with explicit expression is designated as explicit expression data, and the psychological crisis data with implicit expression is designated as implicit expression data.

[0039] The psychological crisis dataset can be an explicit-implicit crisis parallel database, that is, the psychological crisis dataset can include multiple explicit expression data and multiple implicit expression data, and each explicit expression data has a one-to-one correspondence with each implicit expression data.

[0040] It is understandable that each piece of psychological crisis data in the psychological crisis dataset can carry an expression style label. The expression style label can include explicit expression style labels and implicit expression style labels. Explicit expression style labels are used to characterize explicit expression style, and implicit expression style labels are used to characterize implicit expression style.

[0041] In addition to explicit and implicit expression data, psychological crisis datasets can also include non-psychological crisis data with normal expression, i.e., normal expression data.

[0042] Then, step S12 is executed, which can be used to construct the first model input by combining implicit expression data with style transfer and crisis classification instructions. For example, the first model input may include "convert the dialogue into explicit expression and classify the conversion result into crisis, the dialogue is: implicit expression data".

[0043] The psychological crisis early warning model, based on the input of the first model, performs style transformation on the implicit expression data to obtain the style transformation result. This style transformation result is the explicit expression obtained from the implicit expression data after style transformation. Furthermore, the psychological crisis early warning model can also classify the psychological crisis based on the style transformation result to obtain the target crisis classification result corresponding to the style transformation result. The first model output of the psychological crisis early warning model can include "Explicit Expression: Style Transformation Result; Crisis Type: Target Crisis Classification Result".

[0044] Here, psychological crisis classification can be either single-task binary classification or multi-task binary classification. Single-task binary classification determines whether it is a specific type of psychological crisis, while multi-task binary classification determines whether it is multiple specific types of psychological crisis, and then determines the most matching type.

[0045] The psychological crisis early warning model can be a large language model (LLM), such as Wenxin Yiyan, Doubao, or an artificial intelligence language model based on the Transformer architecture, or a pre-trained model obtained by pre-training a large language model. No specific limitation is made here.

[0046] Finally, step S13 is executed to train the psychological crisis early warning model using the style transfer results, the target crisis classification results, and the explicit expression data corresponding to the implicit expression data. For example, the style transfer loss can be calculated based on the style transfer results and the explicit expression data corresponding to the implicit expression data, and the explicit expression crisis classification loss can be calculated using the crisis types in the target crisis classification results and the implicit expression data. The first training loss can then be calculated using the style transfer loss and the explicit expression crisis classification loss, and the psychological crisis early warning model is trained in a supervised manner with the goal of minimizing the first training loss. When the first training loss converges or reaches the preset number of iterations, the target psychological crisis early warning model is obtained. The preset number of iterations can be set as needed and is not specifically limited here.

[0047] Understandably, if the psychological crisis classification is a single-task binary classification, then the implicit expression data indicates that the crisis type is a specific type of psychological crisis, which can be represented by a corresponding crisis type label. If the psychological crisis classification is a multi-task binary classification, then the implicit expression data also indicates that the crisis type is a specific type of psychological crisis, which can be represented by multiple corresponding crisis type labels. The number of crisis type labels is equal to the number of tasks in the multi-task classification. The crisis type label can take the value 1 or 0, where 1 indicates a psychological crisis belonging to the corresponding type, and 0 indicates a psychological crisis not belonging to the corresponding type.

[0048] By using style transfer loss, the ability of the psychological crisis early warning model to perform style transfer on implicit expression data can be enhanced. By using explicit expression crisis classification loss, the ability of the psychological crisis early warning model to classify psychological crises based on style transfer results can be enhanced. This enables the final trained target psychological crisis early warning model to have a strong ability for explicit expression transfer and psychological crisis classification.

[0049] The psychological crisis early warning model training method provided in this embodiment of the invention involves performing style transformation on implicit expression data using a psychological crisis early warning model to obtain style transformation results. These results are then used to classify psychological crises, yielding target crisis classification results. The psychological crisis early warning model is trained using the style transformation results, target crisis classification results, and explicit expression data corresponding to the implicit expression data. This training enables the target psychological crisis early warning model to possess strong style transformation and psychological crisis classification capabilities, thereby reducing the difficulty of detecting implicitly expressed psychological crisis data and improving the accuracy of its detection. The target psychological crisis early warning model trained using this method can be applied to online psychological counseling platforms, adolescent mental health monitoring systems, and family emotional interaction analysis tools, providing technical support for early intervention in psychological crises.

[0050] Because existing solutions focus heavily on detecting psychological crises of a single type, they cannot effectively cover psychological crises of different types arising in different fields or for different audiences. Moreover, the essence of supervised learning models is the process of learning inherent patterns in the training set, resulting in weak generalization ability of supervised learning models. They are difficult to accurately identify dialogue data to be detected that exceeds the coverage of the training set in terms of style, scene, or expression.

[0051] Based on this, and building upon the above embodiments, the psychological crisis dataset includes psychological crisis data for multiple crisis types. The training of the psychological crisis early warning model based on the style transfer results, the target crisis classification results, and the explicit expression data corresponding to the implicit expression data includes: Calculate the crisis consistency reward between the crisis type of the implicit expression data and the target crisis classification result, and extract the semantic features of the style transfer result as the first semantic feature and the semantic features of the implicit expression data as the second semantic feature. Based on the first semantic feature and the second semantic feature, a semantic consistency reward is calculated, and the psychological crisis early warning model is trained based on the crisis consistency reward and the semantic consistency reward.

[0052] Specifically, in this embodiment of the invention, the psychological crisis dataset includes psychological crisis data of multiple crisis types. The crisis types here can include psychological crisis types arising in different fields or for different objects.

[0053] Furthermore, reinforcement learning can be used to train the psychological crisis early warning model. This involves first calculating the crisis consistency reward between the crisis type in the implicit data and the target crisis classification result. The crisis type in the implicit data can be represented by the corresponding crisis type label, and the crisis consistency reward can be represented by the F1 score. The F1 score is the harmonic mean of precision and recall, used to evaluate the performance of the psychological crisis early warning model in classifying psychological crises.

[0054] Simultaneously, a semantic metric model can be used to extract the semantic features of the style transfer result as the first semantic feature and the semantic features of the implicit expression data as the second semantic feature. This semantic metric model can be a model used for semantic feature extraction, such as Word2Vec, GloVe, ELMo, BERT, etc.

[0055] Subsequently, the semantic consistency reward can be calculated using the first semantic feature and the second semantic feature. This semantic consistency reward can be represented by the cosine similarity between the first semantic feature and the second semantic feature.

[0056] By weighted summing of crisis consistency rewards and semantic consistency rewards, a comprehensive reward can be calculated. With the goal of maximizing the comprehensive reward, the psychological crisis early warning model is trained using reinforcement learning, ultimately yielding the target psychological crisis early warning model.

[0057] In this embodiment, by introducing psychological crisis data of multiple crisis types into the psychological crisis dataset, the trained target psychological crisis early warning model can effectively cover multiple crisis types, achieving accurate and efficient detection for psychological crisis data of different crisis types. Furthermore, this method trains the psychological crisis early warning model through reinforcement learning using crisis consistency rewards and semantic consistency rewards, improving the generalization ability of the target psychological crisis early warning model. This allows the model to still achieve accurate early warnings even when faced with dialogue data whose style, scene, or expression form exceeds the coverage of the psychological crisis dataset.

[0058] Based on the above embodiments, training the psychological crisis early warning model based on the crisis consistency reward and the semantic consistency reward includes: Based on the psychological crisis early warning model, the target style classification result of the psychological crisis data is determined, and based on the target style classification result and the expression style corresponding to the psychological crisis data, the expression style consistency reward is calculated. The psychological crisis early warning model is trained based on the aforementioned expression style consistency reward.

[0059] Specifically, after training the psychological crisis early warning model using crisis consistency rewards and semantic consistency rewards, the model can also be trained to classify expression styles using a psychological crisis dataset. This will enable the target psychological crisis early warning model to better distinguish psychological crisis data with different expression styles and improve its crisis early warning capability.

[0060] Based on this, such as Figure 2 As shown, the psychological crisis data in the psychological crisis dataset can be combined with style classification instructions to construct the second model input. For example, the second model input can include "determine which category the dialogue belongs to among 'explicit expression,' 'implicit expression,' and 'normal expression,' and the dialogue is: psychological crisis data."

[0061] The psychological crisis early warning model classifies the expression style of psychological crisis data based on the input of the second model, and outputs the target style classification result. The output of the second model of the psychological crisis early warning model can be represented as "style type: target style classification result".

[0062] Subsequently, the expression style consistency reward can be calculated using the target style classification results and the expression style corresponding to the psychological crisis data. The expression style corresponding to the psychological crisis data can be represented by the expression style labels corresponding to the psychological crisis data; therefore, the expression style consistency reward can be calculated using the target style classification results and the expression style labels corresponding to the psychological crisis data. This expression style consistency reward can be represented by the F1 score.

[0063] Furthermore, the psychological crisis early warning model can be trained using reinforcement learning with the goal of maximizing the reward for consistency in expression style, ultimately resulting in the target psychological crisis early warning model.

[0064] In this embodiment of the invention, the psychological crisis early warning model is trained by the expression style consistency reward, so that the trained target psychological crisis early warning model has the ability to classify expression styles. It can distinguish psychological crisis data with different expression styles, and then use different methods to detect psychological crisis data with different expression styles. That is, for implicit expression data, the expression style is first converted before psychological crisis classification, while for explicit expression data, psychological crisis classification can be performed directly.

[0065] Based on the above embodiments, the step of extracting the semantic features of the style transfer result as the first semantic feature and the semantic features of the implicit expression data as the second semantic feature includes: Based on the semantic measurement model, the first semantic feature and the second semantic feature are extracted respectively; the semantic measurement model is obtained by comparative learning of semantic features based on the explicit expression data, the implicit expression data and the normal expression data.

[0066] Specifically, in this embodiment of the invention, a first semantic feature and a second semantic feature can be extracted respectively through a semantic measurement model. This semantic measurement model can be obtained by comparing and learning the semantic features through explicit expression data, implicit expression data and normal expression data.

[0067] The positive examples used in contrastive learning can include implicit and explicit crisis data from the psychological crisis dataset, while the negative examples can include implicit and normal expression data from the psychological crisis dataset.

[0068] In the process of comparative learning, such as Figure 3 As shown, implicit expression data from the psychological crisis dataset is input into the semantic measurement model, which then obtains and outputs the second semantic feature. Explicit expression data is also input into the semantic measurement model, which then obtains and outputs the third semantic feature. Simultaneously, normal expression data can also be input into the semantic measurement model, which extracts semantic features from this data to obtain the fourth semantic feature. Then, a contrastive loss is calculated based on the second, third, and fourth semantic features to maximize the semantic feature similarity between positive samples and minimize the semantic feature similarity between negative samples. The contrastive loss can be calculated using the InfoNCE loss function, where the numerator can be the semantic feature similarity between positive samples and the denominator can be the semantic feature similarity between negative samples. Semantic feature similarity can be represented using cosine similarity or inner product.

[0069] In this embodiment of the invention, a semantic measurement model is trained through contrastive learning, which enables the semantic measurement model to have a strong ability to extract semantic features from psychological crisis data with different expression styles, and to extract different semantic features from psychological crisis data with different expression styles.

[0070] Based on the above embodiments, the step of training the psychological crisis early warning model based on the style transfer result, the target crisis classification result, and the explicit expression data corresponding to the implicit expression data includes: Based on the aforementioned psychological crisis early warning model, the psychological crisis data is classified into crisis categories to determine the initial crisis classification results. Based on the initial crisis classification results and the crisis types corresponding to the psychological crisis data, the crisis classification loss is calculated, and the psychological crisis early warning model is trained based on the crisis classification loss.

[0071] Specifically, before training the psychological crisis early warning model, the crisis classification ability of the psychological crisis early warning model can be pre-trained in a supervised manner using a psychological crisis dataset, so as to reduce the training difficulty of the psychological crisis early warning model in the future.

[0072] like Figure 4 As shown, firstly, the psychological crisis data in the psychological crisis dataset can be combined with crisis classification instructions to construct the third model input. For example, the third model input can include "classify the following expression as: psychological crisis data".

[0073] The psychological crisis early warning model classifies psychological crisis data based on the input of the third model, and outputs the initial crisis classification result. The output of the third model of the psychological crisis early warning model can be represented as "Crisis Type: Initial Crisis Classification Result".

[0074] Here, in the crisis classification process, no different processing methods are used for implicit and explicit expression data. Instead, the semantic understanding ability of the psychological crisis early warning model is directly used to classify the psychological crisis data.

[0075] Then, using the initial crisis classification results and the crisis type labels corresponding to the psychological crisis data, the crisis classification loss is calculated. This crisis classification loss can be obtained using the cross-entropy loss function.

[0076] Finally, with the goal of minimizing the crisis classification loss, the crisis classification loss can be backpropagated to train the psychological crisis early warning model, thereby improving the psychological crisis early warning model's ability to classify crises for both explicit and implicit data and reducing the training difficulty of the subsequent psychological crisis early warning model.

[0077] Based on the above embodiments, the step of training the psychological crisis early warning model based on the style transfer result, the target crisis classification result, and the explicit expression data corresponding to the implicit expression data includes: Based on the aforementioned psychological crisis early warning model, the psychological crisis data is classified in style to determine the initial style classification results; Based on the initial style classification results and the expression styles corresponding to the psychological crisis data, the style classification loss is calculated, and the psychological crisis early warning model is trained based on the style classification loss.

[0078] Specifically, before training the psychological crisis early warning model, the style classification ability of the psychological crisis early warning model can be pre-trained in a supervised manner using a psychological crisis dataset to reduce the training difficulty of the psychological crisis early warning model in the future.

[0079] like Figure 5 As shown, firstly, the psychological crisis data in the psychological crisis dataset can be combined with style classification instructions to construct the fourth model input. For example, the fourth model input can include "determine which category the dialogue belongs to among 'explicit expression,' 'implicit expression,' and 'normal expression,' and the dialogue is: psychological crisis data."

[0080] The psychological crisis early warning model, based on the input of the fourth model, performs style classification on the psychological crisis data and outputs the initial style classification results. The output of the fourth model of the psychological crisis early warning model can be represented as "Style Type: Initial Style Classification Result".

[0081] Subsequently, using the initial style classification results and the corresponding expression style labels for the psychological crisis data, the style classification loss is calculated. This style classification loss can be obtained using the cross-entropy loss function.

[0082] Finally, with the goal of minimizing the style classification loss, the style classification loss can be backpropagated to train the psychological crisis early warning model. This will improve the psychological crisis early warning model's ability to classify the expression styles of explicit and implicit expression data, thereby reducing the training difficulty of the subsequent psychological crisis early warning model.

[0083] Because existing psychological crisis datasets lack diversity in the dimension of implicit expression data, the acquisition of a psychological crisis dataset, based on the above embodiments, includes: Obtain an initial psychological dialogue dataset, and based on the psychological crisis early warning model, perform style classification on the initial psychological dialogue dataset to determine the implicit and explicit expression dialogue data in the initial psychological dialogue dataset. The implicit expression dialogue data is explicitly rewritten to obtain explicit rewriting results, and the explicit expression dialogue data is implicitly rewritten for different implicit expression categories to obtain implicit rewriting results. Determine the crisis type of the implicit expression dialogue data, the explicit rewriting result, the explicit expression dialogue data, and the implicit rewriting result; The psychological crisis dataset is constructed based on the implicit expression dialogue data, the explicit rewriting results, the explicit expression dialogue data, the implicit rewriting results, and their corresponding crisis types.

[0084] Specifically, in the embodiments of the present invention, when constructing the psychological crisis dataset, such as Figure 6 As shown, an initial psychological dialogue dataset can be obtained first. This dataset can include data from sources such as psychological counseling websites, online logs, publicly available psychological datasets, psychological forums, and social media platforms, or it can include dialogues generated by a large language model. The number of dialogue rounds can be single or multiple; no specific limitation is made here.

[0085] Then, using a psychological crisis early warning model, style classification is performed on the initial psychological dialogue dataset to identify implicit and explicit dialogue data within the dataset. Specifically, each data point in the initial psychological dialogue dataset is input into the psychological crisis early warning model, which then performs style classification to obtain implicit and explicit dialogue data.

[0086] Subsequently, for explicit dialogue data, different implicit expression categories can be injected into the prompts. Each prompt is then fed into a large language model, which implicitly rewrites the explicit dialogue data using different implicit expression categories, yielding the implicit rewriting results. These different implicit expression categories can include metaphor, irony, and homophony.

[0087] Similarly, for implicit expression dialogue data, explicit expression transformation requirements can be injected into the prompts, and the prompts can be input into a large language model. The large language model can then explicitly rewrite the implicit expression dialogue data according to the explicit expression transformation requirements to obtain the explicit rewriting results.

[0088] Subsequently, a multi-model voting method can be used to determine the crisis type of implicit dialogue data, explicit rewriting results, explicit dialogue data, and implicit rewriting results. That is, the implicit dialogue data, explicit rewriting results, explicit dialogue data, and implicit rewriting results are respectively input into multiple large language models, and the crisis type of the implicit dialogue data, explicit rewriting results, explicit dialogue data, and implicit rewriting results is predicted by each language model, and the prediction results are output.

[0089] If all large language models output the same prediction results, then the consistent prediction results will be taken as the crisis type of the corresponding data.

[0090] If the prediction results output by all large language models are not completely consistent, then the corresponding data will be deleted.

[0091] Subsequently, a psychological crisis dataset was constructed using implicit expression dialogue data, explicit rewriting results, explicit expression dialogue data, implicit rewriting results, and their corresponding crisis types.

[0092] Among them, implicit expression dialogue data and explicit expression dialogue data are considered as psychological crisis data with corresponding relationships, explicit expression dialogue data and implicit rewriting results are considered as psychological crisis data with corresponding relationships, and implicit expression dialogue data and explicit rewriting results are considered as psychological crisis data with corresponding relationships. This can expand the data volume of the initial psychological dialogue dataset, so that the constructed psychological dialogue dataset has a sufficient amount of data.

[0093] In this embodiment of the invention, by explicitly rewriting the implicit expression dialogue data in the initial psychological dialogue dataset and implicitly rewriting the explicit expression dialogue data, psychological crisis data with corresponding relationships can be further mined from the initial psychological dialogue dataset, so that the psychological crisis dataset covers multiple expression styles and solves the problem of insufficient diversity caused by the sparsity of implicit expression data in the prior art.

[0094] Based on the above embodiments, determining the crisis type of the implicit expression dialogue data, the explicit rewriting result, the explicit expression dialogue data, and the implicit rewriting result includes: Based on the semantic consistency between the implicit expression dialogue data and the explicit rewriting result, the implicit expression dialogue data and the explicit rewriting result are filtered to obtain a first filtering result. Based on the semantic consistency between the explicit expression dialogue data and the implicit rewriting result, the explicit expression dialogue data and the implicit rewriting result are filtered to obtain a second filtering result. Based on multi-model voting, crisis types are generated for the first screening result and the second screening result, respectively.

[0095] Specifically, when determining the crisis type of implicit expression dialogue data, explicit rewrite results, and the crisis type of explicit expression dialogue data and implicit rewrite results, a semantic measurement model can be used to extract the semantic features of the implicit expression dialogue data and explicit rewrite results respectively, and the semantic consistency between the semantic features of the implicit expression dialogue data and explicit rewrite results can be calculated. Implicit expression dialogue data and explicit rewrite results with low semantic consistency can be filtered out, and implicit expression dialogue data and explicit rewrite results with high semantic consistency can be selected as the first selection result. For example, implicit expression dialogue data and explicit rewrite results with semantic consistency less than a preset threshold can be filtered out. Here, the preset threshold can be set as needed, and no specific limitation is made.

[0096] Similarly, semantic measurement models can be used to extract semantic features from explicit dialogue data and implicit rewriting results, respectively, and the semantic consistency between these features can be calculated. Explicit dialogue data and implicit rewriting results with low semantic consistency can be filtered out, while those with high semantic consistency can be selected as a second filtering result. For example, explicit dialogue data and implicit rewriting results with semantic consistency less than a preset threshold can be filtered out.

[0097] Subsequently, a multi-model voting method can be used to generate crisis types for the first and second screening results, respectively.

[0098] In this embodiment of the invention, filtering by semantic consistency can ensure the quality of psychological crisis data with corresponding relationships in the psychological crisis dataset, and determining the crisis type by multi-model voting can improve the accuracy of crisis type determination.

[0099] Based on the above embodiments, each of the crisis types corresponds to a thought chain; the thought chain is used to characterize the logical reasoning process for determining the corresponding crisis type.

[0100] Specifically, the thought chain for each crisis type can be generated through a large language model, representing the logical reasoning process that determines the corresponding crisis type, i.e., the reasons why the large language model considers it to belong to the corresponding crisis type. For example, the first model output of the psychological crisis early warning model can also include "Cause: Because of..., therefore the crisis type is...".

[0101] In this embodiment of the invention, by introducing thought chains for each type of crisis, the interpretability of the output results of the target psychological crisis early warning model can be improved.

[0102] In summary, the psychological crisis early warning model training method provided in this embodiment of the invention is a method for training a psychological crisis early warning model to address the difficulty in detecting implicit psychological crises. It effectively expands the coverage of psychological crisis detection for various types of psychological crises, thereby achieving more comprehensive and accurate early warning of implicit psychological crises in real online dialogue environments.

[0103] Based on the above embodiments, such as Figure 7 As shown in the figure, this embodiment of the invention also provides a psychological crisis early warning method, which includes: S21, Obtain the dialogue data to be detected; S22, input the dialogue data to be detected into the target psychological crisis early warning model, and obtain the psychological crisis early warning result of the dialogue data to be detected output by the target psychological crisis early warning model; The target psychological crisis early warning model is trained based on the psychological crisis early warning model training method provided in the above embodiments.

[0104] Specifically, the psychological crisis early warning method provided in this embodiment of the invention is implemented by a psychological crisis early warning device, which can be configured in online psychological counseling platforms, adolescent mental health monitoring systems, and family emotional interaction analysis tools.

[0105] First, step S21 is executed to obtain the dialogue data to be detected. This dialogue data can be the dialogue data of the user to be detected, used to provide early warning of psychological crisis for the user, and to determine whether the user has a psychological crisis and what type of psychological crisis it is.

[0106] Then, step S22 is executed, where the dialogue data to be detected is input into the target psychological crisis early warning model. The target psychological early warning model then obtains and outputs the psychological crisis early warning result of the dialogue data to be detected. This psychological crisis early warning result includes whether the user to be detected has a psychological crisis and what type of psychological crisis it is.

[0107] It is understood that the target psychological crisis early warning model trained by the psychological crisis early warning model training method provided in the above embodiments has at least the ability to convert expression style and classify psychological crises. Therefore, the target psychological crisis early warning model can directly provide psychological crisis early warning when the dialogue data to be detected is explicit, and when the dialogue data to be detected is implicit, the dialogue data to be detected can be converted into explicit expression first, and then psychological crisis early warning can be provided through the converted explicit expression.

[0108] In this embodiment of the invention, the psychological crisis early warning model is used to provide psychological crisis early warning for the dialogue data to be detected, which can reduce the difficulty of detecting implicitly expressed psychological crisis data and improve the accuracy of detecting implicitly expressed psychological crisis data.

[0109] Based on this, the ability of the target psychological crisis early warning model to effectively cover multiple crisis types can be utilized. Even when faced with dialogue data to be detected that exceeds the coverage of the psychological crisis dataset in terms of style, scene, or expression, accurate early warning can still be achieved.

[0110] Based on the above embodiments, such as Figure 8 As shown, this embodiment of the invention also provides a psychological crisis early warning model training device, comprising: The dataset acquisition module 81 is used to acquire a psychological crisis dataset; the psychological crisis dataset includes psychological crisis data with different expression styles, and the psychological crisis data includes explicit expression data and implicit expression data with corresponding relationships; The crisis classification module 82 is used to perform expression style transformation on the implicit expression data based on the psychological crisis early warning model, obtain the style transformation result, and perform psychological crisis classification on the style transformation result to obtain the target crisis classification result. The model training module 83 is used to train the psychological crisis early warning model based on the style transfer results, the target crisis classification results, and the explicit expression data corresponding to the implicit expression data.

[0111] Specifically, the functions of each module in the psychological crisis early warning model training device provided in this embodiment of the invention correspond one-to-one with the operation flow of each step in the above-mentioned psychological crisis early warning model training method embodiment, and the achieved effect is also the same. For details, please refer to the above embodiments, and this will not be repeated in this embodiment of the invention.

[0112] Based on the above embodiments, such as Figure 9 As shown, this embodiment of the invention also provides a psychological crisis early warning device, comprising: The data acquisition module 91 is used to acquire the dialogue data to be detected. The model application module 92 is used to input the dialogue data to be detected into the target psychological crisis early warning model, and obtain the psychological crisis early warning result of the dialogue data to be detected output by the target psychological crisis early warning model; The target psychological crisis early warning model is trained based on the psychological crisis early warning model training method provided in the above embodiments.

[0113] Specifically, the functions of each module in the psychological crisis early warning device provided in this embodiment of the invention correspond one-to-one with the operation flow of each step in the above-mentioned psychological crisis early warning method embodiment, and the achieved effects are also the same. For details, please refer to the above embodiments, and this will not be repeated in this embodiment of the invention.

[0114] Figure 10 A schematic diagram of the physical structure of an electronic device, such as... Figure 10 The electronic device may include a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call logical instructions in the memory 830 to execute the psychological crisis early warning model training method or the psychological crisis early warning method provided in the above embodiments.

[0115] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to related technologies, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0116] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the psychological crisis early warning model training method or the psychological crisis early warning method provided in the above embodiments.

[0117] In another aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program is implemented to perform the psychological crisis early warning model training method or the psychological crisis early warning method provided in the above embodiments. This computer-readable storage medium can be either a non-transitory computer-readable storage medium or a transient computer-readable storage medium, and no specific limitation is made herein.

[0118] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0119] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of software products. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A training method for a psychological crisis early warning model, characterized in that, include: Obtain a psychological crisis dataset; the psychological crisis dataset includes psychological crisis data with different expression styles, and the psychological crisis data includes explicit expression data and implicit expression data with corresponding relationships; Based on the psychological crisis early warning model, the implicit expression data is subjected to expression style transformation to obtain style transformation results, and the style transformation results are then used to classify psychological crises to obtain target crisis classification results. The psychological crisis early warning model is trained based on the style transfer results, the target crisis classification results, and the explicit expression data corresponding to the implicit expression data.

2. The training method for the psychological crisis early warning model according to claim 1, characterized in that, The psychological crisis dataset includes psychological crisis data for multiple crisis types; The training of the psychological crisis early warning model based on the style transfer results, the target crisis classification results, and the explicit expression data corresponding to the implicit expression data includes: Calculate the crisis consistency reward between the crisis type of the implicit expression data and the target crisis classification result, and extract the semantic features of the style transfer result as the first semantic feature and the semantic features of the implicit expression data as the second semantic feature. Based on the first semantic feature and the second semantic feature, a semantic consistency reward is calculated, and the psychological crisis early warning model is trained based on the crisis consistency reward and the semantic consistency reward.

3. The training method for the psychological crisis early warning model according to claim 2, characterized in that, The process of training the psychological crisis early warning model based on the crisis consistency reward and the semantic consistency reward includes: Based on the psychological crisis early warning model, the target style classification result of the psychological crisis data is determined, and based on the target style classification result and the expression style corresponding to the psychological crisis data, the expression style consistency reward is calculated. The psychological crisis early warning model is trained based on the aforementioned expression style consistency reward.

4. The training method for the psychological crisis early warning model according to claim 2, characterized in that, The step of extracting the semantic features of the style transfer result as the first semantic feature and the semantic features of the implicit expression data as the second semantic feature includes: Based on the semantic measurement model, the first semantic feature and the second semantic feature are extracted respectively; the semantic measurement model is obtained by comparative learning of semantic features based on the explicit expression data, the implicit expression data and the normal expression data.

5. The training method for the psychological crisis early warning model according to claim 2, characterized in that, The training of the psychological crisis early warning model based on the style transfer results, the target crisis classification results, and the explicit expression data corresponding to the implicit expression data includes the following steps: Based on the aforementioned psychological crisis early warning model, the psychological crisis data is classified into crisis categories to determine the initial crisis classification results. Based on the initial crisis classification results and the crisis types corresponding to the psychological crisis data, the crisis classification loss is calculated, and the psychological crisis early warning model is trained based on the crisis classification loss.

6. The training method for the psychological crisis early warning model according to claim 2, characterized in that, The training of the psychological crisis early warning model based on the style transfer results, the target crisis classification results, and the explicit expression data corresponding to the implicit expression data includes the following steps: Based on the aforementioned psychological crisis early warning model, the psychological crisis data is classified in style to determine the initial style classification results; Based on the initial style classification results and the expression styles corresponding to the psychological crisis data, the style classification loss is calculated, and the psychological crisis early warning model is trained based on the style classification loss.

7. The training method for a psychological crisis early warning model according to any one of claims 1-6, characterized in that, The acquisition of the psychological crisis dataset includes: Obtain an initial psychological dialogue dataset, and based on the psychological crisis early warning model, perform style classification on the initial psychological dialogue dataset to determine the implicit and explicit expression dialogue data in the initial psychological dialogue dataset. The implicit expression dialogue data is explicitly rewritten to obtain explicit rewriting results, and the explicit expression data is implicitly rewritten for different implicit expression categories to obtain implicit rewriting results. Determine the crisis type of the implicit expression dialogue data, the explicit rewriting result, the explicit expression dialogue data, and the implicit rewriting result; The psychological crisis dataset is constructed based on the implicit expression dialogue data, the explicit rewriting results, the explicit expression dialogue data, the implicit rewriting results, and their corresponding crisis types.

8. The training method for a psychological crisis early warning model according to claim 7, characterized in that, The process of determining the crisis type of the implicit dialogue data, the explicit rewriting result, the explicit dialogue data, and the implicit rewriting result includes: Based on the semantic consistency between the implicit expression dialogue data and the explicit rewriting result, the implicit expression dialogue data and the explicit rewriting result are filtered to obtain a first filtering result. Based on the semantic consistency between the explicit expression dialogue data and the implicit rewriting result, the explicit expression dialogue data and the implicit rewriting result are filtered to obtain a second filtering result. Based on multi-model voting, crisis types are generated for the first screening result and the second screening result, respectively.

9. The training method for a psychological crisis early warning model according to claim 7, characterized in that, Each of the aforementioned crisis types corresponds to a thought chain; the thought chain is used to characterize the logical reasoning process for determining the corresponding crisis type.

10. A method for early warning of psychological crises, characterized in that, include: Obtain the dialogue data to be detected; The dialogue data to be detected is input into the target psychological crisis early warning model to obtain the psychological crisis early warning result of the dialogue data to be detected output by the target psychological crisis early warning model. The target psychological crisis early warning model is trained based on the psychological crisis early warning model training method as described in any one of claims 1-9.

11. A training device for a psychological crisis early warning model, characterized in that, include: The dataset acquisition module is used to acquire a psychological crisis dataset; the psychological crisis dataset includes psychological crisis data with different expression styles, and the psychological crisis data includes explicit expression data and implicit expression data with corresponding relationships; The crisis classification module is used to perform expression style transformation on the implicit expression data based on the psychological crisis early warning model, obtain the style transformation result, and perform psychological crisis classification on the style transformation result to obtain the target crisis classification result. The model training module is used to train the psychological crisis early warning model based on the style transfer results, the target crisis classification results, and the explicit expression data corresponding to the implicit expression data.

12. A psychological crisis early warning device, characterized in that, include: The data acquisition module is used to acquire the dialogue data to be detected. The model application module is used to input the dialogue data to be detected into the target psychological crisis early warning model, and obtain the psychological crisis early warning result of the dialogue data to be detected output by the target psychological crisis early warning model. The target psychological crisis early warning model is trained based on the psychological crisis early warning model training method as described in any one of claims 1-9.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the psychological crisis early warning model training method as described in any one of claims 1-9, or the psychological crisis early warning method as described in claim 10.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the psychological crisis early warning model training method as described in any one of claims 1-9, or the psychological crisis early warning method as described in claim 10.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the psychological crisis early warning model training method as described in any one of claims 1-9, or the psychological crisis early warning method as described in claim 10.