Cognitive behavioral assessment and grading method and related devices
By applying artificial intelligence technology and information extraction models, the problem of insufficient number of psychological counselors has been solved, enabling rapid and accurate correction of cognitive behavior record texts and improving the effectiveness of psychological counseling and treatment.
Patent Information
- Application Number
- CN202211699453.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-12-28
AI Technical Summary
The current technology suffers from a shortage of qualified and qualified mental health counselors, resulting in an inability to meet patients' needs for cognitive behavioral therapy. This leads to inefficiency and difficulty in effectively helping patients distinguish between facts and thoughts and their impact on emotions and behaviors.
By leveraging artificial intelligence technology, relevant information is extracted from the cognitive behavior records entered by users through a trained information extraction model. The model is then automatically graded based on cognitive behavior patterns, including data augmentation and model fine-tuning, to improve grading speed and accuracy.
It enables rapid and accurate correction of cognitive behavior record texts, helping patients better grasp the theory of goal-oriented psychotherapy and improve the effectiveness of psychological counseling and treatment.
Smart Images

Figure CN116189852B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of psychology and artificial intelligence, and in particular to a method, apparatus, system, computer device, and storage medium for evaluating and correcting cognitive behavior. Background Technology
[0002] The following statements are provided only as background information in relation to this application and do not necessarily constitute prior art.
[0003] According to data from the National Center for Mental Health of the Chinese Center for Disease Control and Prevention, the number of people suffering from various mental illnesses in China is increasing, including anxiety disorders, mood disorders, and alcohol and drug use disorders. Disease burden data from the World Health Organization and the World Bank show that mental health issues have become a prominent problem in the global disease burden.
[0004] Cognitive behavior therapy (CBT), developed by A.Beck in the 1860s, is a structured psychotherapy approach that combines cognitive and behavioral therapies. It has proven effective in treating mental illnesses such as depression and anxiety. CBT offers various theoretical explanations for cognitive-behavioral patterns, including but not limited to the ABC theory of emotion. The ABC theory of emotion is one of the fundamental theories of CBT, where A stands for Activating event, B for Belief, and C for Consequence (emotional and behavioral consequences).
[0005] Traditionally, people often believe that triggering events directly lead to emotional and behavioral consequences. Therefore, in daily life, they may frequently confuse facts with thoughts, firmly believing in their own ideas, which can cause emotional and behavioral distress. Cognitive behavioral therapy (CBT) theory posits that the transition from an event to emotional and behavioral outcomes also involves the influence of beliefs and thoughts. Therefore, in addition to medication and psychotherapy, thought correction can be used to help patients. During CBT treatment, a crucial task for therapists is helping clients collect automatic thoughts, identify events, thoughts, emotions, and behaviors in various life scenarios, find the connections between them, become aware of the emotions and behaviors they exhibit under the influence of their thoughts, and clearly distinguish between facts and thoughts, recognizing that thoughts are not equivalent to facts.
[0006] Currently, the quantity and quality of mental health counselors fall far short of patients' needs. To address this issue, the inventors realized that artificial intelligence technology could be used to assist mental health counselors. For example, machine learning technology could be used to help counselors grade patients' cognitive-behavioral record forms, which is more efficient than manual grading and allows counselors to serve more patients. These record forms help patients distinguish between facts and thoughts, and recognize the impact of thoughts on emotions and behaviors. Summary of the Invention
[0007] To address the aforementioned shortcomings or deficiencies, this application provides a method, apparatus, system, computer device, and storage medium for evaluating and correcting cognitive behavior. The embodiments of this application can accurately and quickly correct cognitive behavior record texts submitted by users, helping users to better grasp the theory of target psychotherapy, thereby achieving better psychological counseling and treatment results.
[0008] This application provides a cognitive behavior evaluation and correction method according to a first aspect. In some embodiments, the method includes:
[0009] The process involves: acquiring multiple cognitive behavior description texts pre-written according to various styles of cognitive behavior patterns in the theory of goal-oriented psychotherapy; fine-tuning a pre-trained general information extraction model based on these multiple cognitive behavior description texts to obtain a trained information extraction model; acquiring cognitive behavior record texts input by the user; processing the cognitive behavior record texts using the information extraction model to obtain element description information; and evaluating and correcting the texts based on the element description information.
[0010] In some embodiments, the cognitive behavior pattern includes multiple elements; the cognitive behavior description text includes descriptive information of one or more of the above elements; the style of the cognitive behavior pattern is composed of one or more of the above elements.
[0011] In some embodiments, the pre-trained general information extraction model is fine-tuned based on the above-mentioned multiple cognitive behavior description texts to obtain a trained information extraction model, including:
[0012] The cognitive behavior description texts in the above multiple cognitive behavior description texts are divided into the first text and the second text; the first text refers to the cognitive behavior description text written according to the style composed of one element, and the second text refers to the cognitive behavior description text written according to the style composed of multiple elements.
[0013] Data augmentation based on the number of elements is performed on each of the above multiple cognitive behavior description texts, and data augmentation based on the element order is performed on each of the above multiple cognitive behavior description texts as a second text.
[0014] All cognitive behavior description texts obtained through data augmentation are used as training samples to fine-tune the pre-trained general information extraction model, resulting in a well-trained information extraction model.
[0015] In some embodiments, the cognitive behavior record text input by the user includes the record text entered by the user in multiple input boxes; the multiple input boxes correspond one-to-one with the various elements included in the cognitive behavior pattern.
[0016] The cognitive behavior record text is processed using an information extraction model to obtain element description information, including:
[0017] The model extracts the recorded text input information entered by the user in each input box, and obtains the corresponding element information output by the information extraction model; the above element description information includes the element information corresponding to the recorded text entered by the user in each input box.
[0018] In some embodiments, before evaluating and correcting based on element description information, the above method further includes:
[0019] Check whether the preset conditions are met based on the element description information;
[0020] If the test result is yes, perform a batching operation based on the element description information;
[0021] If the test result is negative, prompt the user to re-enter the information based on the test result.
[0022] The preset conditions include: the element information corresponding to the recorded text entered by the user in each input box contains only element information belonging to the element corresponding to that input box.
[0023] In some embodiments, evaluation and correction are performed based on element description information, including:
[0024] Semantic analysis is performed on each element information contained in the element description information to obtain the correction information of the cognitive behavior record text;
[0025] Cluster analysis and sentiment analysis are performed on each element information contained in the element description information to obtain the evaluation information of the cognitive behavior record text.
[0026] In some embodiments, semantic analysis is performed on each element information contained in the element description information to obtain the correction information of the cognitive behavior record text, including:
[0027] Obtain the reference text corresponding to each element included in the above cognitive behavioral pattern;
[0028] Each element in the element description information is matched with the corresponding reference text to obtain a similarity value. The interval corresponding to the similarity value is determined, and the correction result corresponding to the interval is obtained as the correction result corresponding to the element information.
[0029] The correction results corresponding to each element information contained in the element description information are used as the correction information for the cognitive behavior record text.
[0030] In some embodiments, cluster analysis and sentiment analysis are performed on each element information contained in the element description information to obtain evaluation information of the cognitive behavior record text, including:
[0031] Cluster analysis is performed on each element information contained in the element description information to determine the main category corresponding to each element information;
[0032] Based on the primary category corresponding to each element information, sentiment analysis is performed on each element information to determine the secondary category corresponding to each element information.
[0033] The primary and secondary categories corresponding to each element are obtained as evaluation information for the cognitive behavior record text.
[0034] This application provides a cognitive behavior evaluation and correction device according to a second aspect. In some embodiments, the device includes:
[0035] The first acquisition module is used to acquire multiple cognitive behavior description texts that have been pre-written according to various styles of cognitive behavior patterns in the theory of goal-oriented psychotherapy;
[0036] The training module is used to fine-tune the pre-trained general information extraction model based on the above multiple cognitive behavior description texts to obtain the trained information extraction model.
[0037] The second acquisition module is used to acquire the cognitive behavior record text input by the user;
[0038] The information extraction module is used to process cognitive behavior record text using an information extraction model to obtain element description information;
[0039] The grading module is used to evaluate and grade elements based on their descriptions.
[0040] According to a third aspect, this application provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the cognitive behavior evaluation and correction method provided in any of the above embodiments.
[0041] According to a fourth aspect, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the cognitive behavior evaluation and correction method provided in any of the above embodiments.
[0042] In the above embodiments of this application, multiple cognitive behavior description texts, pre-written according to various styles of cognitive behavior patterns in the theory of target psychotherapy, are obtained; a pre-trained general information extraction model is fine-tuned based on the multiple cognitive behavior description texts to obtain a trained information extraction model; cognitive behavior record text input by the user is obtained; the cognitive behavior record text is processed using the information extraction model to obtain element description information; and evaluation and correction are performed based on the element description information. The embodiments of this application can accurately and quickly correct the cognitive behavior test answers submitted by the user, helping the user to better grasp the theory of target psychotherapy, thereby achieving better psychological counseling and treatment results. Attached Figure Description
[0043] Figure 1-1 and Figure 1-2 These are application environment diagrams of cognitive behavior evaluation and correction methods provided in some embodiments;
[0044] Figure 2 A flowchart illustrating a cognitive behavior evaluation and correction method provided for some embodiments;
[0045] Figure 3 A schematic diagram of the UIE model provided for some embodiments;
[0046] Figure 4 A flowchart illustrating the training information extraction model provided in some embodiments;
[0047] Figure 5 A schematic diagram of the evaluation and correction process provided for some embodiments;
[0048] Figure 6 A schematic diagram illustrating another evaluation and correction process provided for some embodiments;
[0049] Figure 7 A structural block diagram of a cognitive behavior evaluation and correction device provided in some embodiments;
[0050] Figure 8 Internal structural diagrams of a computer device provided for some embodiments. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] This application provides a method for evaluating and correcting cognitive behaviors. In some embodiments, this method can be applied to... Figure 1-1 In the illustrated application scenario, the user terminal displays relevant test questions for the target psychotherapy on the screen and provides a visual interface for the user. The user can then input cognitive behavioral record text related to the test questions into the user terminal through this interface. After receiving the input cognitive behavioral record text, the user terminal evaluates and corrects the text, and displays the corresponding evaluation information and correction results to the user on the screen. In other embodiments, this method can be applied to... Figure 1-2 In the illustrated application scenario, the client requests relevant test questions for the target psychotherapy from the server and displays the test questions on the screen. The user inputs the cognitive behavioral record text of the test questions into the client through a visual interface. After receiving the user's input, the client uploads the text to the server. The server evaluates and corrects the user's input and returns the evaluation information and correction results to the client, which then displays these information and results to the user on the screen. The user terminal or client can be various personal computers (PCs), laptops, smartphones, tablets, and other computing devices. The server can be a standalone server or a server cluster consisting of multiple servers.
[0053] The cognitive behavior evaluation and grading method provided in this embodiment applies artificial intelligence technology to the field of psychology. A trained information extraction model extracts relevant information from the cognitive behavior record text input by the user, enabling automatic grading based on the extracted information. Compared to manual grading, this significantly improves grading speed and accuracy. To achieve accurate grading, this embodiment improves the information extraction stage. Considering the characteristics of cognitive behavior testing scenarios, a large number of cognitive behavior description texts written in various styles according to the cognitive behavior patterns in target psychotherapy theory are prepared in advance. These texts are used to train the information extraction model, allowing it to fully learn the various elements included in the cognitive behavior patterns of target psychotherapy theory, such as the four elements of the ABC model of cognitive behavior therapy (i.e., facts, thoughts, emotions, and behaviors). This enables the trained information extraction model to accurately extract information related to each element from the user's input answers. Furthermore, this embodiment fine-tunes the pre-trained general information extraction model, allowing for faster training of the information extraction model.
[0054] Furthermore, the above method can be applied to open scenarios where the test questions provided to users do not have standard answers.
[0055] The above-mentioned cognitive behavioral evaluation and correction methods include, for example: Figure 2 The steps shown are described below, and each step of the method will be explained in detail below.
[0056] S110: Obtain multiple cognitive behavior description texts pre-written according to various styles of cognitive behavior patterns in the theory of goal-oriented psychotherapy.
[0057] Goal-oriented psychotherapy can be any psychotherapy used to intervene in cognitive behavioral patterns, including but not limited to cognitive behavioral therapy, dialectical behavioral therapy, acceptance and commitment therapy, etc.
[0058] As mentioned above, cognitive behavioral therapy (CBT) is a structured psychotherapy method developed by A.Beck in the 1860s. It combines cognitive therapy and behavioral therapy and has shown positive effects in treating mental illnesses such as depression and anxiety. CBT offers various theoretical explanations for cognitive-behavioral patterns, including but not limited to the ABC theory of emotion. The ABC theory of emotion, also known as the ABC model, is one of the fundamental theories of CBT. Here, A stands for Activating event, B for Belief (beliefs and thoughts), and C for Consequence (emotional and behavioral consequences).
[0059] Dialectical Behavior Therapy (DBT) primarily targets symptoms of borderline personality disorder (BPD), such as emotional instability, behavioral instability, unstable self-image, and unstable interpersonal relationships. DBT emphasizes that BPD patients often experience distress or withdrawal during treatment because "change" cannot occur, while "acceptance" can make them feel that their suffering is not being seen. Therefore, DBT emphasizes finding a balance between "change" and "acceptance." Based on dialectical philosophy, DBT, with the help of behavioral interventions, aims to restore the social functioning and self-management abilities of BPD patients. The intervention process mainly includes mindfulness techniques, emotion regulation techniques, interpersonal efficacy techniques, and pain coping techniques.
[0060] Acceptance and Commitment Therapy (ACT) is suitable for a variety of clients with predominantly emotional and behavioral problems. ACT's treatment is based on functional contextualism and relational framing theory, which posits that the intricate relationships between language (such as thoughts, ideas, and opinions) are the primary root cause of emotional distress. ACT's etiological model identifies an interconnected relationship between six factors: cognitive fusion, experiential avoidance, ineffective action, a conceptualized future of the past, a conceptualized self, and a vague value orientation. Emotional distress arises from numerous ineffective actions driven by a vague value orientation, influenced by cognitive fusion, experiential avoidance, a conceptualized self, and a conceptualized past and future. Its intervention model corresponds to the etiological model, following a "flexible hexagon" approach: the combined effects of cognitive dissociation, acceptance, value-aligned action, present-moment focus, self-reflection, and a clear value orientation. This approach enables patients to lead meaningful and value-aligned lives.
[0061] The cognitive behavior pattern involved in this embodiment includes a variety of elements. When different target psychotherapies are used, the types and number of elements included in the above cognitive behavior pattern may also be different, and the content and composition of the above cognitive behavior pattern will also be different.
[0062] For example, when using the ABC model from cognitive behavioral therapy to explain cognitive behavioral patterns, the elements included in the aforementioned cognitive behavioral patterns refer to the various elements involved in the ABC model, namely, facts (i.e., the Activating event mentioned above), thoughts (i.e., Belief mentioned above), emotions (i.e., emotions in the Consequence mentioned above), and behaviors (i.e., behavioral consequences in the Consequence mentioned above). In some implementations, to further improve the accuracy of information extraction and thus enhance the accuracy of automatic grading, the element of "emotion" is subdivided into "protagonist emotions" and "third-party emotions." That is, the element categories in this implementation include five types: facts, thoughts, protagonist emotions, third-party emotions, and behaviors. Among them, "protagonist emotions" refers to the user's own emotions, while "third-party emotions" refers to the emotions of anyone other than the user. By subdividing "emotions" into "protagonist emotions" and "third-party emotions," the model, after being trained, can distinguish between content related to protagonist emotions and content related to third-party emotions from the user's input answers, thereby improving the accuracy of grading.
[0063] Accordingly, the above ABC model consists of one or more elements, such as facts, facts + thoughts, facts + thoughts + emotions, or facts + thoughts + emotions + behavior. Cognitive behavioral description text includes descriptive information from one or more of these elements. For example, assuming that cognitive behavioral description text needs to be written in the styles of "facts" and "facts + thoughts," then a cognitive behavioral description text written in the style of "facts" could be "Xiaoming ate his favorite bread this morning," or "Xiaohua broke up with her boyfriend," etc. A cognitive behavioral description text written in the style of "facts + thoughts" could be "Xiaoming ate his favorite bread this morning, and he felt he loved it even more," or "Xiaohua broke up with her boyfriend, and she felt she had wasted five years of her youth," etc.
[0064] There are many styles of ABC models. However, when writing cognitive behavior description text, you can choose the style according to the needs of the specific application scenario. For example, in some scenarios, when conducting tests, users only need to fill in three elements: facts, thoughts, and emotions. In this case, when training the information extraction model, you can write the cognitive behavior description text according to the style consisting of one or more of these three elements. Similarly, if when conducting tests, users need to fill in four elements: facts, thoughts, emotions, and behaviors, then when training the information extraction model, you can write the cognitive behavior description text according to the style consisting of one or more of these four elements.
[0065] Similarly, when the etiological model of acceptance and commitment therapy is used to explain cognitive-behavioral patterns, the elements included in the above-mentioned cognitive-behavioral patterns include six elements: cognitive fusion, experiential avoidance, ineffective actions, conceptualized past and future, conceptualized self, and ambiguous value orientation. Correspondingly, the above patterns can be cognitive fusion, cognitive fusion + experiential avoidance, etc.
[0066] When dialectical behavior therapy is needed to explain cognitive-behavioral patterns, the elements included in the above-mentioned cognitive-behavioral patterns include four elements: emotional instability, behavioral instability, self-image instability, and interpersonal relationship instability. Correspondingly, the above pattern could be emotional instability, behavioral instability plus self-image instability, etc.
[0067] The following section will focus on the ABC model of cognitive behavioral therapy to illustrate the cognitive behavioral evaluation and correction method provided in this application.
[0068] Furthermore, to improve the accuracy of information extraction, experts such as psychologists can write cognitive behavioral description texts for training the model.
[0069] The prepared cognitive behavior description text can be stored in a database or the user terminal's storage space. When model training is required, the cognitive behavior description text can be retrieved from the database or the user terminal's storage space.
[0070] S120: Based on the above multiple cognitive behavior description texts, fine-tune the pre-trained general information extraction model to obtain a trained information extraction model.
[0071] The general information extraction model used in this embodiment is the UIE (Universal Information Extraction) model. A brief introduction to the UIE model follows.
[0072] The UIE model is an automated text-to-structure generation framework that can universally model different information extraction (IE) tasks, adaptively generate target structures, and collaboratively learn general IE capabilities from various knowledge sources. Specifically, the UIE model uses a structured extraction language to uniformly encode different text extraction structures, adaptively generates target extraction through a prompt-based mechanism—the Structural Schema Instructor (SSI), and captures common IE capabilities through a large-scale pre-trained text-to-structure model.
[0073] First, the Structured Extraction Language (SEL) is used to uniformly encode the heterogeneous extraction structures, that is, to encode entities, relations, and events into a unified representation. Then, the Structured Schema Instruction (SSI) is described, which is a schema-based prompt mechanism used to control the UIE model, which can locate, associate, and generate content for different extraction settings.
[0074] The heterogeneous IE structure is encoded into a unified representation as follows. The IE structure generation can be decomposed into two atomic operations:
[0075] 1. Spotting refers to locating target information segments within a sentence, such as entities and trigger words in an event.
[0076] 2. Associating refers to connecting different pieces of information according to the desired association, such as the relationship between entity pairs or the interaction between events and their arguments.
[0077] The Unified Structured Extended Language (SEL) encodes different IE structures by locating associated structures. The specific form of SEL is as follows: (
[0079] (Spot Name: Info Span)
[0080] (Asso Name: Info Span)
[0081] (Asso Name: Info Span) ) )
[0084] Each SEL expression contains three types of semantic units: 1) Spot Name indicates the presence of a specific information segment in the source text, which includes the type of point name; 2) Asso Name indicates the presence of a specific information segment in the source text that is associated with the upper-level Spotted information in the structure by an Asso Name; 3) Info Span indicates the text range corresponding to a specific location or associated information segment in the source text. Furthermore, the colon ":" in the SEL indicates a mapping from the Info Span to its location or associated name, and the two structure indicators "(" and ")" are used to form a hierarchical structure among the extracted information.
[0085] The advantages of SEL are: 1) It encodes different IE structures in a unified way, so different IE tasks can be modeled as the same text-to-structure generation process; 2) It effectively represents all the extraction results of sentences in the same structure, so joint extraction can be performed naturally; 3) The generated output structure is very compact, which greatly reduces the complexity of decoding.
[0086] In one example, the overall structure of the UIE used in this embodiment can be found in [reference needed]. Figure 3 The SSI format and the generated SEL are as follows:
[0087] 1. [spot] Entity Category [spot] Entity Category [text]: [spot] Fact [spot] Thought [text] Xiaoming ate his favorite bread this morning and felt he loved it even more. Schema: ["Fact", "Thought"]. Generated SEL: Figure 3 The first result on the right is shown.
[0088] 2. [spot] Entity Category [spot] Entity Category [spot] Entity Category [text]: [spot] Fact [spot] Thought [spot] Emotion [text] Xiaoming ate his favorite bread this morning and felt he loved it even more. He was very happy. The schema is: ["Fact", "Thought", "Emotion"]. The generated SEL is Figure 3 The second result on the right is shown.
[0089] 3. [spot] Entity Category [spot] Entity Category [spot] Entity Category [spot] Entity Category [text]: [spot] Fact [spot] Thought [spot] Emotion [spot] Behavior [text] Xiaoming ate his favorite bread this morning and felt he loved it even more. He was very happy, so he immediately went to buy another one. The schema is: ["Fact", "Thought", "Emotion", "Behavior"]. The generated SEL is Figure 3 The third result on the right is shown.
[0090] Furthermore, the overall UIE architecture diagram is expressed as follows:
[0091]
[0092] Where S represents SSI, T represents the original input sentence, and UIE represents the UIE model.
[0093] The output Z is structured data described using SEL syntax, where The representation is:
[0094]
[0095] For example, the SSI "[spot]fact[spot]idea[text]" represents the record of extracting the entity "Xiaoming ate his favorite bread this morning and felt he loved it even more." from the sentence. Given the SSI, the UIE first encodes the textT and then uses an encoder-decoder style architecture to generate the target structure in a linearized SEL.
[0096] A schema-based prompt can: 1) effectively guide the generation of SELs in UIE, thereby transferring general IE capabilities to new IE tasks; and 2) adaptively control the content to be searched, associated, and generated, so as to better share semantic knowledge between different tags and tasks.
[0097] The UIE generation structure takes a given SSI and text T as input, and extracts target information by generating a linearized SEL. We use an encoder-decoder style architecture to represent this text as an SEL generation process. Given the original text sequence and schema instructions, UIE first computes the hidden representation for each token:
[0098] H = Encoder(s1,s2,s3,…,s| s |,t1,t2,t3,…t| t |)
[0099] The Encoder() function is part of the Transformer encoder. The user interface then decodes the input text into a linearized SEL using an autoregressive style. Next, hidden layers are used to generate the target structured information at the Decoder level, as shown below:
[0100]
[0101] The Decoder(·) is a component of the Transformer decoder.
[0102] In some implementations, the pre-trained general information extraction model is fine-tuned based on the aforementioned multiple cognitive behavior description texts to obtain a trained information extraction model, such as... Figure 4 As shown, it may include:
[0103] S121: Divide the cognitive behavior description texts in the above multiple cognitive behavior description texts into the first text and the second text.
[0104] The first text refers to a cognitive behavior description text written in a style consisting of one element, while the second text refers to a cognitive behavior description text written in a style consisting of multiple elements.
[0105] S122: Perform data augmentation processing based on the number of elements on each of the above multiple cognitive behavior description texts, and perform data augmentation processing based on the element order on each of the above multiple cognitive behavior description texts.
[0106] In order to enable the model to accurately identify information related to various elements from texts with various word orders, this implementation performs data augmentation processing on the pre-prepared cognitive behavior description text.
[0107] This implementation provides two data augmentation methods: one based on the number of elements and the other based on the order of elements. Data augmentation of pre-written cognitive behavior description text can expand the text size. Furthermore, to ensure the accuracy of the model's recognition of each element's information, experts can use the aforementioned data augmentation methods to augment the previously written cognitive behavior description text.
[0108] When performing data augmentation based on the number of elements, it is necessary to consider that each cognitive behavior description text contains more than two pieces of information for each element.
[0109] For example, the original cognitive behavior description text is written in the "fact + idea" format. The text content is "Xiaoming takes two hours to get to work by bus, and he thinks the commute is a bit far." Here, "Xiaoming takes two hours to get to work by bus" is the fact element, and "he thinks the commute is a bit far" is the idea element. If we need to make the number of each element-related information in the text equal to 2, then after data augmentation, the new cognitive behavior description text can be "Xiaoming takes two hours to get to work by bus, his company is on the 15th floor, he thinks the commute is a bit far, and he wants to move to a house closer to his company." This text contains two fact-related pieces of information, namely "Xiaoming takes two hours to get to work by bus" and "his company is on the 15th floor," and two idea-related pieces of information, namely "he thinks the commute is a bit far" and "he wants to move to a house closer to his company."
[0110] When performing element-order-based data augmentation, each element of information contained in each cognitive behavior description text should be placed before, in, and after the text.
[0111] For example, the original text describing cognitive behavior is:
[0112] Xiao Ming ate his favorite bread this morning and felt he loved it even more. (Fact / Thought)
[0113] After enhancement, it can be:
[0114] Xiaoming felt an even greater craving for it this morning, having eaten his favorite bread. (Thought / Fact)
[0115] For example, the original text describing cognitive behavior is:
[0116] Xiao Ming ate his favorite bread this morning and felt he loved it even more. He was very happy. (Fact / Thought / Emotion)
[0117] If we enhance the factual information within it, we can obtain:
[0118] Xiao Ming was very happy. He ate his favorite bread for breakfast and felt he loved it even more now. (Emotion / Fact / Thought)
[0119] Xiao Ming was very happy, feeling that he loved eating it even more now. He ate his favorite bread for breakfast. (Emotion / Thought / Fact)
[0120] S123: Using all cognitive behavior description texts obtained through data augmentation as training samples, fine-tune the pre-trained general information extraction model to obtain a trained information extraction model.
[0121] The cognitive behavior description texts obtained through the aforementioned data augmentation process include each pre-written cognitive behavior description text and the corresponding new cognitive behavior description texts obtained through augmentation.
[0122] This approach allows for the training of a general information extraction model using conventional information extraction training data, or by directly using pre-trained general information extraction models for fine-tuning. This implementation fine-tunes the model based on a pre-trained general information extraction model, thus enabling faster training of the information extraction model.
[0123] S130: Obtain the cognitive behavior record text input by the user.
[0124] After a user inputs the cognitive behavior record text through a visual interface, the client or user terminal can obtain the cognitive behavior record text.
[0125] S140: Use an information extraction model to process cognitive behavior record text and obtain element description information.
[0126] In some implementations, the visual user interface may include input boxes for entering various elements of information, such as fact input boxes, thought input boxes, emotion input boxes, and behavior input boxes. In this case, the cognitive behavior record text entered by the user includes the recorded text entered by the user in multiple input boxes; these multiple input boxes correspond one-to-one with the various elements included in the cognitive behavior pattern. For example, when the multiple input boxes are fact input boxes, thought input boxes, emotion input boxes, and behavior input boxes, the cognitive behavior record text entered by the user includes the first answer text entered by the user in the fact input box, the second answer text entered by the user in the thought input box, the third answer text entered by the user in the emotion input box, and the fourth answer text entered by the user in the behavior input box.
[0127] Accordingly, an information extraction model is used to process the cognitive behavior record text to obtain element description information, including: extracting the record text input information entered by the user in each input box from the information extraction model to obtain the corresponding element information output by the information extraction model. Accordingly, the element description information at this point includes the element information corresponding to the record text entered by the user in each input box.
[0128] Based on the above example, by inputting the first answer text, the second answer text, the third answer text, and the fourth answer text into the information extraction model, we can obtain the first element information corresponding to the first answer text, the second element information corresponding to the second answer text, the third element information corresponding to the third answer text, and the fourth element information corresponding to the fourth answer text, respectively, output by the information extraction model.
[0129] Furthermore, in some implementations, before evaluating and correcting based on element description information, such as Figure 5 As shown, the above method also includes:
[0130] S210: Check whether the preset conditions are met based on the element description information;
[0131] S220: In response to a yes test result, perform an evaluation and correction operation based on the element description information;
[0132] S230: In response to a negative test result, prompt the user to re-enter the information based on the test result.
[0133] The preset conditions include: the element information corresponding to the recorded text entered by the user in each input box contains only element information belonging to the element corresponding to that input box.
[0134] In the above example, the preset condition could be that the first element information contains only factual element information, the second element information contains only thought element information, the third element information contains only emotional element information, and the fourth element information contains only behavioral element information.
[0135] In other words, if a user enters information in an input box that does not contain information related to the element corresponding to that input box, or contains information unrelated to the element corresponding to that input box, then the user is prompted to re-enter the information. For example, if a user enters "I went to Beijing today, and I was very happy" in the emotion input box, after processing by the information extraction model, it can be determined that the user's input contains fact-related information (i.e., I went to Beijing today) and emotion-related information (i.e., I was very happy). Since "I went to Beijing today" is unrelated to emotion, the user can be prompted: The current input information is a mixture of fact-related and emotion-related information; please re-enter information that is only related to emotion. As another example, if a user enters "I went to Beijing today" in the emotion input box, after processing by the information extraction model, it can be determined that the user's input contains only fact-related information (i.e., I went to Beijing today). Since "I went to Beijing today" is unrelated to emotion, the user can be prompted: The current input information is unrelated to emotion; please re-enter information that is only related to emotion.
[0136] S150: Evaluate and correct based on element description information.
[0137] The grading method is related to the test objective; different test objectives require different grading methods.
[0138] In some implementations, the purpose of cognitive behavioral tests is to help users distinguish between various elements. In this case, a test is considered correct as long as the user enters only information related to the element corresponding to that test box. For example, if the first element contains only factual information, the second element contains only thought-related information, the third element contains only emotion-related information, and the fourth element contains only behavior-related information, then a feedback result is output, such as: "Congratulations, all the information you entered is correct."
[0139] In other implementations, the purpose of cognitive behavioral testing is to help users distinguish various elements and accurately write down complete information related to each element. In this case, it is necessary to further calculate a score for the user's input, allowing the user to understand the completeness of the information they input related to each element. This leads to a more accurate understanding of the user's grasp of the correct answer, helping them better grasp the theory of targeted psychotherapy and thus achieving better psychological counseling and treatment outcomes.
[0140] In this implementation, evaluation and correction are performed based on element description information, such as... Figure 6 As shown, it includes:
[0141] S151: Perform semantic analysis on each element information contained in the element description information to obtain the correction information of the cognitive behavior record text;
[0142] S152: Perform cluster analysis and sentiment analysis on each element information contained in the element description information to obtain the evaluation information of the cognitive behavior record text.
[0143] The semantic analysis technique used in step S151 is similarity matching of the meaning of the entire sentence. In some embodiments, performing semantic analysis on each element information contained in the element description information to obtain the correction information of the cognitive behavior record text may include: obtaining the reference text corresponding to each element included in the above cognitive behavior pattern; performing similarity matching between each element information contained in the element description information and the corresponding reference text to obtain a similarity value, determining the interval corresponding to the above similarity value, obtaining the correction result corresponding to the above interval as the correction result corresponding to the element information; and obtaining the correction result corresponding to each element information contained in the element description information as the correction information of the cognitive behavior record text.
[0144] Taking the ABC model of cognitive behavioral therapy as an example, the cognitive behavioral record text may include the first answer text entered by the user in the fact input box, the second answer text entered by the user in the thought input box, the third answer text entered by the user in the emotion input box, and the fourth answer text entered by the user in the behavior input box. The reference text corresponding to each element included in the above cognitive behavioral model may include the fact reference text corresponding to the fact input box, the thought reference text corresponding to the thought input box, the emotion reference text corresponding to the emotion input box, and the behavior reference text corresponding to the behavior input box.
[0145] During similarity matching, the first answer text is matched with the factual reference text, the second answer text with the thought reference text, the third answer text with the emotion reference text, and the fourth answer text with the behavior reference text to obtain the similarity value for each answer text. Then, the correction result for each answer text is determined according to preset rules. For example, suppose the preset rule is: "If the similarity value is between [90, 100], the correction result is 'Input information is correct'; if the similarity value is between [30, 89], the correction result is 'Input information is insufficient'; if the similarity value is between [0, 29], the correction result is 'Invalid input'." Taking the first answer text as an example, if the similarity value between the first answer text and the factual reference text is 80, then based on the above rule, the correction result for the first answer text can be determined as 'Insufficient input information'.
[0146] Furthermore, the above similarity matching process can be as follows: The user-inputted answer text and its corresponding reference text are processed through the SimCSE model to obtain corresponding statement vectors. Then, the cosine similarity between the two statement vectors is directly calculated. The obtained similarity value is between -1 and 1. The closer the user's test answer is to the reference answer, the higher the similarity value. If the user's answer text is identical to the reference text, the similarity value is 1.
[0147] For example, assuming any answer text input by the user is Sentence A, and the corresponding reference text is Sentence B, then Sentence A and Sentence B, after entering the SimCSE model, can yield two 768-dimensional vectors x and y, that is:
[0148]
[0149]
[0150] Two vectors are fed into the cosine similarity calculation formula to calculate their corresponding similarity values:
[0151]
[0152] The SimCSE model described above can be trained using supervised or unsupervised methods. For specific training procedures, please refer to existing technologies.
[0153] Considering that the cosine similarity value is a fixed value, and since such a single value does not specify a region where the similarity value performs poorly (i.e., the range of similarity value estimation), within this range, there are false positives and false negatives that differ from human judgment. In this case, the calculated similarity value cannot accurately reflect the actual score of the user's input answer. To avoid the aforementioned false positives and false negatives, this implementation sets an upper threshold d and a lower threshold w, with the relationship between them being: -1 ≤ w ≤ d ≤ 1. In addition, the correct interval is defined as the interval above the upper threshold and the interval below the lower threshold. After calculating the similarity value, the similarity value is compared with the upper threshold w and the lower threshold d respectively. If the similarity value is within [-1, w] or [d, 1], then the similarity value is determined to be correct (or reasonable).
[0154] Specifically, to limit the ratio of false correct and false incorrect classifications, and considering the increased probability of false correct and false incorrect classifications, a series of possible inappropriate scoring scenarios are defined in the region between the upper threshold d and the lower threshold w. These inappropriate scoring scenarios are defined as random variables; therefore, the double-threshold problem is expressed as the formula:
[0155]
[0156] The constraints are as follows:
[0157] E[fd(w,Ψ - )]≤Z
[0158] E[fg(w,ψ + )]≤Z
[0159] -1≤w≤d≤1
[0160] Where λ represents the weighting parameter, Z represents the maximum level of false correctness and false false error, and ψ + This indicates that the similarity value is considered reasonable, ψ - This indicates that the similarity value is deemed unreasonable, fc(w,ψ) + ) represents an event that was correctly classified as a true similarity score determined based on the upper threshold, fe(d,ψ) - fd(w,ψ) represents an event that was incorrectly classified as an incorrect event based on the true similarity score determined according to the lower threshold. - ) indicates that a truly unreasonable similarity value is correctly classified as an event, fg(w,ψ) + This indicates an event where a true and reasonable similarity value is incorrectly classified as an incorrect event.
[0161] That is, when training the SimCSE model, an answer text (which can be obtained from the written cognitive behavior description text) and its corresponding reference text are input into the model respectively. The two vectors output by the model are matched for similarity. If the similarity value is not in the correct range, the model parameters are adjusted until the similarity value calculated based on the vector output by the model is in the correct range.
[0162] In some implementations, step S152 above, which involves performing cluster analysis and sentiment analysis on each element information contained in the element description information to obtain evaluation information of the cognitive behavior recording text, includes: performing cluster analysis on each element information contained in the element description information to determine the main category corresponding to each element information; performing sentiment analysis on each element information based on the main category corresponding to each element information to determine the sub-category corresponding to each element information; and obtaining the main category and sub-category corresponding to each element information as evaluation information of the cognitive behavior recording text.
[0163] This implementation assigns multiple main categories to each element, and multiple subcategories to each main category. Taking the elements as events, emotions, thoughts, and behaviors as examples, the main categories and subcategories of each element can be as follows:
[0164] The main category corresponding to the element "Event" can be positive event, negative event, or neutral event. Among them, the main category of positive event can contain multiple subcategories, including but not limited to subcategories of family events, workplace events, and academic events. The subcategories contained in negative event can include but not limited to subcategories of emotional events, friend events, and relative events. The subcategories contained in neutral event can include but not limited to subcategories of family events, marriage events, and parent-child events.
[0165] The main category of an emotion can be positive, negative, or neutral. The main category of positive emotions can include multiple subcategories, including but not limited to subcategories of joy, happiness, and gratitude. The subcategories of negative emotions can include but not limited to subcategories of frustration, sadness, and grief. The subcategories of neutral emotions can include but not limited to subcategories of relief, confusion, and embarrassment.
[0166] The main category of an idea can be positive, negative, or neutral. The main category of positive ideas can contain multiple subcategories, including but not limited to subcategories such as confident ideas and persevering ideas. The subcategories of negative ideas can include but not limited to subcategories such as blaming ideas and inferiority complex ideas. The subcategories of neutral ideas can include but not limited to subcategories such as random ideas and irrelevant ideas.
[0167] The main category corresponding to a behavior can be positive behavior, negative behavior, or neutral behavior. Among them, the main category of positive behavior can contain multiple subcategories, including but not limited to immediate action subcategories, proactive communication subcategories, etc.; the subcategories contained in negative behavior can include but not limited to impulsive subcategories, resistant subcategories, etc.; the subcategories contained in neutral behavior can include but not limited to arbitrary behavior subcategories, unrelated behavior subcategories, etc.
[0168] The clustering analysis described above is based on the statements extracted by the information extraction model, analyzing whether the main category corresponding to the statement is positive, negative, or neutral. The sentiment analysis described above is used to analyze the subcategories corresponding to the statement under the determined main category. For example, if clustering analysis determines that the text information entered by the user in the fact input box belongs to positive facts (its corresponding subcategories are family events, workplace events, and academic events), then sentiment analysis can further determine whether the subcategory corresponding to the text information is family events, workplace events, or academic events.
[0169] In some implementations, the Affinity Propagation Clustering (AP) algorithm is chosen for cluster analysis. The AP algorithm is particularly suitable for rapid clustering of high-dimensional, multi-class data, offering significant improvements in performance and efficiency compared to traditional clustering algorithms. The basic idea of the AP algorithm is to treat all samples as nodes in a network and then calculate the cluster center of each sample through message passing between edges in the network. During the clustering process, two types of messages are passed between nodes: responsibility and availability. The AP algorithm iteratively updates the responsibility and availability values of each point until m high-quality exemplars (similar to centroids) are generated, while the remaining data points are assigned to the corresponding clusters. The main process of the AP algorithm is shown below:
[0170] • Step 1: Initialize the algorithm by setting the attraction matrix R and the belonging matrix to zero matrices;
[0171] Step 2: Update the attraction matrix;
[0172] Step 3: Update the affiliation matrix;
[0173] Step 4: Attenuate the two formulas according to the attenuation coefficient;
[0174] Repeat steps 2, 3, and 4 until the matrix is stable or the maximum number of iterations is reached, at which point the algorithm terminates.
[0175] The largest k is ultimately chosen as the cluster center.
[0176] The clustering result can be obtained based on the final Cluster category, that is, the main category corresponding to the element information.
[0177] In some implementations, a pre-trained sentiment analysis model can be used to identify the sub-category corresponding to element information. This sentiment analysis model can be obtained by fine-tuning a pre-trained original UIE model.
[0178] For example, taking the sentiment analysis model's use to identify subcategories within positive, negative, or neutral emotions as an example, we can pre-write corresponding descriptive text for each subcategory corresponding to each main category in positive, negative, and neutral emotions, and label each descriptive text with a corresponding tag (to represent the subcategory), such as, "I ate my favorite bread today, I'm so happy (happy tag)", "I lost my phone today, I'm so sad (sad tag)", "My son didn't do his homework properly, I'm so angry (angry tag)", and so on. Using each descriptive text and its corresponding tag as a training sample, we can fine-tune the pre-trained UIE model to obtain the aforementioned sentiment analysis model.
[0179] It should be noted that, unless otherwise explicitly stated herein, the execution order of the steps included in the cognitive behavior evaluation and correction method provided in any of the above embodiments is not strictly limited, and these steps can be executed in other orders. Moreover, at least some of these steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0180] Based on the same inventive concept, this application also provides a cognitive behavior evaluation and correction device. In some embodiments, such as Figure 7 As shown, the device includes the following modules:
[0181] The first acquisition module 110 is used to acquire multiple cognitive behavior description texts that have been pre-written according to various styles of cognitive behavior patterns in the theory of target psychotherapy;
[0182] Training module 120 is used to fine-tune the pre-trained general information extraction model based on the above multiple cognitive behavior description texts to obtain a trained information extraction model.
[0183] The second acquisition module 130 is used to acquire the cognitive behavior record text input by the user;
[0184] The information extraction module 140 is used to process cognitive behavior record text using an information extraction model to obtain element description information;
[0185] The grading module 150 is used to evaluate and grade elements based on their descriptions.
[0186] In some embodiments, the cognitive behavior pattern includes multiple elements; the cognitive behavior description text includes descriptive information of one or more of the above elements; the style of the cognitive behavior pattern is composed of one or more of the above elements.
[0187] In some embodiments, the training module 120 is specifically used to divide the cognitive behavior description texts in the above-mentioned multiple cognitive behavior description texts into a first text and a second text; the first text refers to the cognitive behavior description text written according to a style composed of one type of element, and the second text refers to the cognitive behavior description text written according to a style composed of multiple types of elements; to perform data augmentation processing based on the number of elements on each of the above-mentioned multiple cognitive behavior description texts, and to perform data augmentation processing based on the element order on each of the above-mentioned multiple cognitive behavior description texts; and to use all the cognitive behavior description texts obtained by performing data augmentation processing as training samples to fine-tune the pre-trained general information extraction model to obtain a trained information extraction model.
[0188] In some embodiments, the cognitive behavior record text input by the user includes the record text entered by the user in multiple input boxes; the multiple input boxes correspond one-to-one with the various elements included in the cognitive behavior pattern. Accordingly, the information extraction module 140 is specifically used to extract the record text input by the user in each input box into the information extraction model to obtain the corresponding element information output by the information extraction model; the element description information includes the element information corresponding to the record text entered by the user in each input box.
[0189] In some embodiments, the above-described apparatus further includes a verification module (not shown in the figures). The verification module is configured to verify whether preset conditions are met based on the element description information before making corrections based on the element description information; in response to a yes verification result, perform a correction operation based on the element description information; and in response to a no verification result, prompt the user to re-enter the data based on the verification result. The preset conditions include: the element information corresponding to the recorded text entered by the user in each input box contains only element information belonging to the element corresponding to that input box.
[0190] In some embodiments, the grading module 150 is specifically used to perform semantic analysis on each element information contained in the element description information to obtain grading information of the cognitive behavior record text; and to perform cluster analysis and sentiment analysis on each element information contained in the element description information to obtain evaluation information of the cognitive behavior record text.
[0191] In some embodiments, when the correction module 150 performs semantic analysis on each element information contained in the element description information to obtain correction information for the cognitive behavior record text, it is specifically used to obtain the reference text corresponding to each element included in the above-mentioned cognitive behavior pattern; perform similarity matching between each element information contained in the element description information and the corresponding reference text to obtain a similarity value, determine the interval corresponding to the similarity value, and obtain the correction result corresponding to the interval as the correction result corresponding to the element information; and obtain the correction result corresponding to each element information contained in the element description information as the correction information for the cognitive behavior record text.
[0192] In some embodiments, when the grading module 150 performs cluster analysis and sentiment analysis on each element information contained in the element description information to obtain the evaluation information of the cognitive behavior record text, it is specifically used to perform cluster analysis on each element information contained in the element description information to determine the main category corresponding to each element information; perform sentiment analysis on each element information according to the main category corresponding to each element information to determine the sub-category corresponding to each element information; and obtain the main category and sub-category corresponding to each element information as the evaluation information of the cognitive behavior record text.
[0193] Specific limitations regarding the cognitive behavior evaluation and correction device can be found in the limitations of the cognitive behavior evaluation and correction method described above, and will not be repeated here. Each module in the aforementioned cognitive behavior evaluation and correction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0194] In some embodiments, a computer device is provided, the internal structure of which can be shown as follows: Figure 8 As shown.
[0195] The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and the database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The database stores pre-written descriptions of multiple cognitive behaviors, and the specific data stored can be further defined in the above method embodiments. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a cognitive behavior evaluation and correction method.
[0196] Those skilled in the art will understand that Figure 8 The structures shown are merely block diagrams of some structures related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figures, or combinations of certain components, or different component arrangements. For example, the computer device may also include display devices such as a screen, and input devices such as a mouse and keyboard.
[0197] This embodiment also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it can implement the steps of the cognitive behavior evaluation and correction method provided in any of the above embodiments.
[0198] In some embodiments, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the cognitive behavior evaluation and correction method provided in any of the above embodiments.
[0199] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0200] Those skilled in the art will understand that implementing all or part of the processes in the above method embodiments can be accomplished by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus (RAMbus), direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0201] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0202] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for evaluating and correcting cognitive behavior, characterized in that, The method includes: Obtain multiple cognitive behavior description texts pre-written according to various styles of cognitive behavior patterns in the theory of goal-oriented psychotherapy; Based on the multiple cognitive behavior description texts, the pre-trained general information extraction model is fine-tuned to obtain a trained information extraction model. Obtain the text recording of user-input cognitive behavior; The information extraction model is used to process the cognitive behavior record text to obtain element description information; Evaluation and correction are performed based on the element description information; The cognitive behavior pattern includes multiple elements; the cognitive behavior description text includes descriptive information of one or more of the elements; the style of the cognitive behavior pattern is composed of one or more of the elements. Based on the multiple cognitive behavior description texts, the pre-trained general information extraction model is fine-tuned to obtain a trained information extraction model, including: The cognitive behavior description texts in the multiple cognitive behavior description texts are divided into a first text and a second text; the first text refers to the cognitive behavior description text written according to a style composed of one of the elements, and the second text refers to the cognitive behavior description text written according to a style composed of multiple of the elements. Data augmentation based on the number of elements is performed on each of the multiple cognitive behavior description texts, and data augmentation based on the element order is performed on each of the multiple cognitive behavior description texts. All cognitive behavior description texts obtained through the data augmentation process are used as training samples to fine-tune the pre-trained general information extraction model, resulting in a well-trained information extraction model. Evaluation and correction are performed based on the element description information, including: Semantic analysis is performed on each element information contained in the element description information to obtain the correction information of the cognitive behavior record text; Cluster analysis and sentiment analysis are performed on each element information contained in the element description information to obtain the evaluation information of the cognitive behavior record text; Semantic analysis is performed on each element of the element description information to obtain the correction information of the cognitive behavior record text, including: Obtain the reference text corresponding to each element included in the cognitive behavior pattern; Each element information contained in the element description information is matched with the corresponding reference text to obtain a similarity value, the interval corresponding to the similarity value is determined, and the correction result corresponding to the interval is obtained as the correction result corresponding to the element information. The correction result corresponding to each element information contained in the element description information is obtained as the correction information of the cognitive behavior record text; Cluster analysis and sentiment analysis are performed on each element information contained in the element description information to obtain the evaluation information of the cognitive behavior record text, including: Cluster analysis is performed on each element information contained in the element description information to determine the main category corresponding to each element information. Based on the primary category corresponding to each element information, sentiment analysis is performed on each element information to determine the secondary category corresponding to each element information; The primary and secondary categories corresponding to each element are obtained as evaluation information for the cognitive behavior record text.
2. The method as described in claim 1, characterized in that, The cognitive behavior record text input by the user includes the record text entered by the user in multiple input boxes; each of the multiple input boxes corresponds one-to-one with a variety of elements included in the cognitive behavior pattern; The information extraction model is used to process the cognitive behavior record text to obtain element description information, including: The recorded text entered by the user in each of the input boxes is input into the information extraction model to obtain the corresponding element information output by the information extraction model; The element description information includes element information corresponding to the record text entered by the user in each input box.
3. The method as described in claim 2, characterized in that, Before evaluating and correcting based on the element description information, the method further includes: Check whether the preset conditions are met based on the element description information; In response to a yes test result, perform an evaluation and correction operation based on the element description information; If the test result is negative, prompt the user to re-enter the information based on the test result. The preset conditions include: The element information corresponding to the recorded text entered by the user in each input box only includes element information belonging to the element corresponding to that input box.
4. A computer 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 steps of the method according to any one of claims 1 to 3.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Psychological thought cognition deviation recognition method and device and electronic equipment
CN113609851A
Petition element extraction method and extraction system based on deep learning model
CN113806548A
