Psychological intervention suggestion training method of large language model

By processing and training large-scale text data in the field of psychotherapy, a large language model suitable for the field of psychological intervention is constructed, which solves the problem that users find it difficult to find a suitable psychologist and has high diagnosis and treatment costs, and improves the accuracy of the model in the field of psychological intervention.

CN119598187APending Publication Date: 2025-03-11SHENZHEN GUOGUAN INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411638858.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the prior art, psychological intervention usually requires professional psychologists to perform, making it difficult for users to find a suitable psychologist and the diagnosis and treatment cost is high, and there is a lack of a large language model suitable for the field of psychological intervention.

Method used

A psychological intervention suggestion training method for large language models is proposed. By collecting large-scale text data in the field of psychotherapy, data cleaning, word segmentation, marking and noise reduction processing are carried out, training samples are constructed and vocabulary collection is established through random changes, and a large language model is imported for training.

Benefits of technology

Through a scientific and reasonable training sample set, the accuracy of the large language model in the field of psychological intervention is improved, so that the predicted answers output by the model include more content in the field of psychological intervention, filling the gap in training in the field of psychological intervention in the field of large language models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119598187A_ABST
    Figure CN119598187A_ABST
Patent Text Reader

Abstract

The invention discloses a psychological intervention suggestion training method of a large language model. The method specifically comprises the following steps: S1, data preparation; s2, data processing; s3, constructing a training sample; s4, establishing a vocabulary set; s5, data training; the method has the beneficial effects that data in the field of psychological intervention is acquired from multiple media, and the acquired data text information is processed, so that the situation that a model autonomously removes redundant data is avoided, and the training time and training energy are saved; and by configuring a scientific and reasonable training sample set, the accuracy of the model relative to the psychological intervention field can be effectively improved, so that predicted answers output by the large language model can contain more contents in the psychological intervention field, and the blank of training of the psychological intervention field on the large language model is filled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of model training, and in particular to a psychological intervention suggestion training method for a large language model. Background Art

[0002] A large language model refers to a deep learning model trained using a large amount of text data. It can generate natural language text or understand the meaning of language text. The large language model can handle a variety of natural language tasks, such as text classification, question and answer, and dialogue, and is an important path to artificial intelligence.

[0003] As people's quality of life improves, more and more people pay attention to their mental health, so psychological intervention comes into being. Psychological intervention refers to the process of influencing the psychological activities, personality traits or psychological problems of a certain object in a planned and step-by-step manner under the guidance of psychological theory, so as to make it change towards the expected goal. However, this intervention is generally carried out by professional psychologists, which will cause two problems: 1. Psychologists are scarce talents in society, and it is difficult for users to find qualified and suitable psychologists; 2. The consultation price of psychologists is expensive, which greatly increases the user's diagnosis and treatment costs. Therefore, there is an urgent need for a large language model applied to the field of psychological intervention. Therefore, this paper proposes a psychological intervention suggestion training method for a large language model, which is used to train the large language model in the field of psychological intervention. Summary of the invention

[0004] The purpose of the present invention is to provide a psychological intervention suggestion training method for a large language model to solve the problems raised in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A psychological intervention suggestion training method for a large language model specifically includes the following steps:

[0007] S1. Data preparation: Collect large-scale text data in the field of psychotherapy;

[0008] S2. Data processing: cleaning, word segmentation, tagging and noise reduction of the collected large-scale text data;

[0009] S3, construct training samples: organize the processed data into training samples and expand them through random changes;

[0010] S4. Establishing a vocabulary collection: Processing the training sample data to obtain a vocabulary collection that can be imported into the model for training;

[0011] S5, data training: import training samples into the large language model for training;

[0012] S6. Import verification: If the verification passes, it means that the large voice model training is completed and the model is confirmed. If the verification fails, it is obtained and returned to S3.

[0013] As a preferred solution of the present invention: the collection sources of the S1 text data include but are not limited to the Internet, books, news and social media, and the text data in S1 needs to be clean, rich and diverse.

[0014] As a preferred solution of the present invention: the data processing of S2 specifically includes the following steps:

[0015] S2.1. Data cleaning: Remove or repair noise, errors and inconsistencies in the data as required;

[0016] S2.2, Data tagging: Split text data into subword sequences and perform tokenization processing;

[0017] S2.3, Data unification: Convert the text to lowercase, remove punctuation and special characters, and unify the text data.

[0018] As a preferred solution of the present invention: the step of constructing training samples in S3 specifically includes the following steps:

[0019] S3.1. Organize data into primary training samples according to task requirements;

[0020] S3.2, randomly transform the primary training samples to obtain a set of training samples;

[0021] S3.3. Divide the training sample set into training set, validation set and test set.

[0022] As a preferred solution of the present invention: the specific operation of S3.1 is: extracting a continuous sequence from the text as an input sample by a sliding window, the target is defined as predicting the next word, and the random transformation of S3.2 includes but is not limited to random truncation, adding noise and synonym replacement.

[0023] As a preferred solution of the present invention, the step of establishing a vocabulary collection in S4 specifically comprises the following steps:

[0024] S4.1. Assign a unique integer index to each subword in the text data;

[0025] S4.2, encode the text data into a form acceptable to the model;

[0026] S4.3, standardizing the sequence length of the index;

[0027] S4.4. Match each index and integrate them to obtain a vocabulary collection.

[0028] As a preferred solution of the present invention: the data training of S5 specifically includes the following steps:

[0029] S5.1. Import the organized data training set, test set, validation set and vocabulary collection into the model;

[0030] S5.2, select text data in the training set one by one as input information for training until the model generates short-term memory information;

[0031] S5.3. Re-shuffle the training set and use it as input information for training again until the model generates long-term memory information.

[0032] S5.4. Combine input information, short-term memory information and long-term memory information, and input them into the model to generate a preliminary training model.

[0033] As a preferred solution of the present invention: the judgment method of the import verification of S6 is: if the current input information has a matching memory in the long-term memory information, the matching memory and short-term memory information are obtained, and the model is determined; if the current input information does not have a matching memory in the long-term memory information, only the short-term memory information is obtained, and the method is returned to S3 to re-execute.

[0034] Compared with the prior art, the beneficial effects of the present invention are as follows: the present application obtains data in the field of psychological intervention from multiple media and processes the obtained data text information, thereby eliminating the need for the model to autonomously eliminate redundant data and saving training time and effort; and by configuring a scientific and reasonable training sample set, the accuracy of the model relative to the field of psychological intervention can be effectively improved, so that the predicted answers output by the large language model can include more content in the field of psychological intervention, filling the gap in the training of large language models in the field of psychological intervention. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 This is a system block diagram of the present invention. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0037] See also Figure 1 , the present invention provides a technical solution:

[0038] A psychological intervention suggestion training method for a large language model, characterized by comprising the following steps:

[0039] S1. Data preparation: Collect large-scale text data in the field of psychotherapy;

[0040] S2. Data processing: cleaning, word segmentation, tagging and noise reduction of the collected large-scale text data;

[0041] S3, construct training samples: organize the processed data into training samples and expand them through random changes;

[0042] S4. Establishing a vocabulary collection: Processing the training sample data to obtain a vocabulary collection that can be imported into the model for training;

[0043] S5, data training: import training samples into the large language model for training;

[0044] S6. Import verification: If the verification passes, it means that the large voice model training is completed and the model is confirmed. If the verification fails, it is obtained and returned to S3.

[0045] Furthermore, the sources of S1 text data include but are not limited to the Internet, books, news, and social media. The text data in S1 needs to be clean, rich, and diverse to ensure the model's language understanding and generalization capabilities.

[0046] Furthermore, the data processing of S2 specifically includes the following steps:

[0047] S2.1. Data cleaning: Remove or repair noise, errors and inconsistencies in the data as needed, such as removing HTML tags, processing missing data, removing duplicate samples, etc., to ensure data quality;

[0048] S2.2, Data tagging: Split the text data into a sequence of subwords and perform tokenization so that each word can be mapped to a corresponding identifier;

[0049] S2.3, Data unification: Convert the text to lowercase, remove punctuation and special characters, and unify the text data to reduce data noise and unify the text presentation.

[0050] Furthermore, the construction of training samples of S3 specifically includes the following steps:

[0051] S3.1. Organize the data into primary training samples according to the task requirements. For language-based training, continuous sequences can be extracted from the text as input samples through a sliding window. The goal is to predict the next word.

[0052] S3.2, perform random transformations on the primary training samples, such as random truncation, adding noise, synonym replacement, etc., to improve the robustness and generalization ability of the model, and obtain a collection of training samples;

[0053] S3.3. Divide the training sample set into training set, validation set and test set.

[0054] Furthermore, the establishment of the vocabulary collection in S4 specifically includes the following steps:

[0055] S4.1. Assign a unique integer index to each subword in the text data for encoding and processing by the model.

[0056] S4.2. Encode the text data into the form accepted by the model, that is, replace each vocabulary index with the corresponding word embedding vector;

[0057] S4.3, standardizing the sequence length of the index;

[0058] S4.4. In order to maintain the consistency of data dimensions, each index is matched and marked, and then integrated to obtain a vocabulary collection.

[0059] Furthermore, the data training of S5 specifically includes the following steps:

[0060] S5.1. Import the organized data training set, test set, validation set and vocabulary collection into the model;

[0061] S5.2, select text data in the training set one by one as input information for training until the model generates short-term memory information;

[0062] S5.3. Re-shuffle the training set and use it as input information for training again until the model generates long-term memory information.

[0063] S5.4. Combine input information, short-term memory information and long-term memory information, and input them into the model to generate a preliminary training model.

[0064] Furthermore, the judgment method of the import verification of S6 is: if the current input information has a matching memory in the long-term memory information, then the matching memory and short-term memory information are obtained, and the model is determined; if the current input information does not have a matching memory in the long-term memory information, then only the short-term memory information is obtained, and return to S3 to re-execute this method.

[0065] In actual operation, this application is divided into the following steps:

[0066] 1. Data preparation: Collect large-scale text data from related fields, including data from the Internet, books, news, social media, etc. The data should be clean, rich and diverse to ensure the model's language understanding and generalization capabilities.

[0067] 2. Data cleaning: Remove or repair noise, errors and inconsistencies in the data, such as removing HTML tags, processing missing data, removing duplicate samples, etc. to ensure data quality.

[0068] 3. Word segmentation and tokenization: Split the text data into a sequence of words or subwords and perform tokenization so that each word can be mapped to a corresponding identifier.

[0069] 4. Data preprocessing: Convert text to lowercase, remove punctuation, special characters, etc. to reduce data noise and unify the presentation of text.

[0070] 5. Construct samples: Organize the data into training samples according to the task requirements. For example, for language type, you can extract continuous sequences from the text as input samples by sliding the window, and the goal is to predict the next word.

[0071] 6. Data augmentation: Expand the dataset by performing random transformations on the training data, such as random truncation, adding noise, synonym replacement, etc., to improve the robustness and generalization ability of the model.

[0072] 7. Build a vocabulary: Assign a unique integer index to each word or subword in the text data so that the model can encode and process it.

[0073] 8. Data encoding: Encode the text data into a form acceptable to the model, usually by replacing each vocabulary index with the corresponding word embedding vector.

[0074] 9. Sequence length standardization: In order to maintain the consistency of data dimensions, the sequence length is standardized, such as truncating or padding the sequence.

[0075] 10. Divide the data set: Divide the data into training set, validation set, and test set so that different data can be used when training, tuning, and evaluating the model.

[0076] 11. Training and verification: Combine the current input information, long-term memory and short-term memory information, and input them into the psychology model to generate psychological counseling information. If the current input information has a matching memory in the long-term memory information, the matching memory and short-term memory information are obtained; otherwise, only the short-term memory information is obtained.

[0077] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A psychological intervention suggestion training method for a large language model, characterized in that: The specific steps include: S1. Data preparation: Collect large-scale text data in the field of psychotherapy; S2. Data processing: cleaning, word segmentation, tagging and noise reduction of the collected large-scale text data; S3, construct training samples: organize the processed data into training samples and expand them through random changes; S4. Establishing a vocabulary collection: Processing the training sample data to obtain a vocabulary collection that can be imported into the model for training; S5, data training: import training samples into the large language model for training; S6. Import verification: If the verification passes, it means that the large voice model training is completed and the model is confirmed. If the verification fails, it is obtained and returned to S3.

2. The psychological intervention suggestion training method of a large language model according to claim 1, characterized in that: The sources of the S1 text data include but are not limited to the Internet, books, news and social media. The text data in S1 needs to be clean, rich and diverse.

3. The psychological intervention suggestion training method of a large language model according to claim 1, characterized in that: The data processing of S2 specifically includes the following steps: S2.

1. Data cleaning: Remove or repair noise, errors and inconsistencies in the data as required; S2.2, Data tagging: Split text data into subword sequences and perform tokenization processing; S2.3, Data unification: Convert the text to lowercase, remove punctuation and special characters, and unify the text data.

4. The psychological intervention suggestion training method of a large language model according to claim 1, characterized in that: The construction of training samples in S3 specifically includes the following steps: S3.

1. Organize data into primary training samples according to task requirements; S3.2, randomly transform the primary training samples to obtain a set of training samples; S3.

3. Divide the training sample set into training set, validation set and test set.

5. The psychological intervention suggestion training method of a large language model according to claim 4, characterized in that: The specific operation of S3.1 is: extracting a continuous sequence from the text as an input sample through a sliding window, and the target is defined as predicting the next word. The random transformation of S3.2 includes but is not limited to random truncation, adding noise and synonym replacement.

6. The psychological intervention suggestion training method of a large language model according to claim 1, characterized in that: The step of establishing a vocabulary collection in S4 specifically includes the following steps: S4.

1. Assign a unique integer index to each subword in the text data; S4.2, encode the text data into a form acceptable to the model; S4.3, standardizing the sequence length of the index; S4.

4. Match each index and integrate them to obtain a vocabulary collection.

7. The psychological intervention suggestion training method of a large language model according to claim 1, characterized in that: The data training of S5 specifically includes the following steps: S5.

1. Import the organized data training set, test set, validation set and vocabulary collection into the model; S5.2, select text data in the training set one by one as input information for training until the model generates short-term memory information; S5.

3. Re-shuffle the training set and use it as input information for training again until the model generates long-term memory information. S5.

4. Combine input information, short-term memory information and long-term memory information, and input them into the model to generate a preliminary training model.

8. The psychological intervention suggestion training method of a large language model according to claim 1, characterized in that: The judgment method of the import verification of S6 is: if the current input information has a matching memory in the long-term memory information, the matching memory and short-term memory information are obtained, and the model is determined; if the current input information does not have a matching memory in the long-term memory information, only the short-term memory information is obtained, and return to S3 to re-execute this method.

Citation Information

Cited By

  • Psychological intervention decision optimization system and method based on machine learning

    CN121031826A