CN114661864A - Psychological consultation method and device based on controlled text generation and terminal equipment - Google Patents

Psychological consultation method and device based on controlled text generation and terminal equipment Download PDF

Info

Publication number
CN114661864A
CN114661864A CN202210303626.4A CN202210303626A CN114661864A CN 114661864 A CN114661864 A CN 114661864A CN 202210303626 A CN202210303626 A CN 202210303626A CN 114661864 A CN114661864 A CN 114661864A
Authority
CN
China
Prior art keywords
psychological
knowledge
text
sentence
controlled
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210303626.4A
Other languages
Chinese (zh)
Inventor
徐涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202210303626.4A priority Critical patent/CN114661864A/en
Publication of CN114661864A publication Critical patent/CN114661864A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The invention is suitable for the technical field of artificial intelligence, and provides a psychological consultation method, a device and terminal equipment based on controlled text generation, wherein the method comprises the steps of inputting sample data into an emotion detection model and a scene theme type identification model; inputting the sample data, the emotion type of the text and the theme of the text scene into a knowledge detection model by combining a psychological knowledge map, and simultaneously acquiring a sentence most related to the information of the next sentence so as to enable the knowledge detection model to output knowledge keywords; after the data are spliced, generating control information, and training a controlled text generation algorithm model together with sample data; generating an algorithm model through the trained controlled text, and outputting the psychological consultation reply of the psychological consultation question-answer data at the machine side. The controlled text generation algorithm model is applied to a human-computer interaction psychological consultation scene, the content relevance and the fluency generated in the psychological consultation session are improved, the semantics are consistent and the logic is self-consistent, and the effect of improving the intelligent consultation session is achieved.

Description

Psychological consultation method and device based on controlled text generation and terminal equipment
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a psychological consultation method and device based on controlled text generation and terminal equipment.
Background
Automatic text generation is an important application direction in the field of natural language processing, such as machine translation, intelligent voice interaction technology and the like. For example, the number of the personnel practicing psychological consultants and the market demand of psychological consultation have a large gap and are limited by factors such as irregular literacy of psychological consultants, time, space and the like, people cannot obtain effective psychological consultation well and conveniently, and the efficiency of psychological consultation work can be improved by means of the intelligent voice interaction technology, so that the market demand gap is made up to a certain extent.
However, when a text with a long space is required to be generated, the conventional automatic text generation method cannot ensure that the psychological consultation question-answer data generated by the machine side is semantically coherent and logically self-consistent.
Disclosure of Invention
The invention mainly aims to provide a psychological consultation method, a psychological consultation device and terminal equipment based on controlled text generation, and aims to solve the problem that the existing automatic text generation method cannot ensure that psychological consultation question-answer data generated by a machine side are semantically coherent and logically self-consistent.
In order to achieve the above object, a first aspect of embodiments of the present invention provides a psychological consultation method based on controlled text generation, including:
inputting sample data into an emotion detection model and a scene theme type identification model; the emotion detection model outputs a text emotion type, and the scene theme type identification model outputs a text scene theme;
inputting the sample data, the emotion type of the text and the theme of the text scene into a knowledge detection model by combining a psychological knowledge map, and simultaneously acquiring a sentence most related to the information of the next sentence so as to enable the knowledge detection model to output knowledge keywords;
after the knowledge key words, the emotion types of the texts, the themes of the text scenes and the sentences most relevant to the information of the next sentence are spliced, generating control information, and using the control information and the sample data together for training the controlled text generation algorithm model;
and generating an algorithm model through the trained controlled text, analyzing the processed psychological consultation question-answer data of the user side, and outputting psychological consultation response of the psychological consultation question-answer data of the machine side.
With reference to the first aspect of the present invention, in the first embodiment of the present invention, before the knowledge detection model outputs the knowledge keyword, the method includes:
matching and outputting the ternary phrases according to the content keywords extracted by the knowledge detection model;
and converting the ternary phrase into a sentence to obtain a ternary sentence group.
With reference to the first embodiment of the first aspect of the present invention, in a second embodiment of the present invention, the obtaining a sentence most relevant to next sentence information includes:
and searching a sentence with the content closest to the three-phrase from the target characteristic sentence set as a sentence most related to the information of the next sentence.
With reference to the second implementation manner of the first aspect of the present invention, in a third implementation manner of the present invention, the outputting a knowledge keyword by the knowledge detection model includes:
and sequencing the sentences of the ternary sentence group according to the sentence most relevant to the next sentence information, and outputting content keywords with a sequencing order through a sequencing result, wherein the content keywords with the sequencing order are the knowledge keywords.
With reference to the first aspect of the present invention, in a fourth implementation manner of the present invention, after the knowledge keyword, the emotion type of the text, the topic of the text scene, and the sentence most related to the information of the next sentence are spliced, control information is generated and used for training the controlled text generation algorithm model together with the sample data, including:
splicing the psychological consultation question-answer data of the user side with the control information to serve as a training set for training the controlled text generation algorithm model;
and taking the next sentence information as a verification set for training the controlled text generation algorithm model.
With reference to the first aspect of the present invention, in a fifth embodiment of the present invention, before generating an algorithm model from a trained controlled text, analyzing processed psychological counseling question-answer data of a user side and outputting a psychological counseling reply of the psychological counseling question-answer data of a machine side, the method includes:
obtaining psychological consultation question-answer data of a user side through man-machine interaction;
and processing the psychological consulting question-answer data of the user side.
With reference to the fifth embodiment of the first aspect of the present invention, in a sixth embodiment of the present invention, the processing of psychological consulting question-answer data on the user side includes:
converting the psychological consultation question-answer data of the user side into the control information;
and splicing the psychological consulting question-answer data of the user side with the control information to generate processed psychological consulting question-answer data of the user side.
A second aspect of an embodiment of the present invention provides a psychological consultation apparatus based on controlled text generation, including:
the sample data processing module is used for inputting sample data into the emotion detection model and the scene theme type identification model; the emotion detection model outputs a text emotion type, and the scene theme type identification model outputs a text scene theme;
the knowledge keyword output module is used for inputting the sample data, the emotion type of the text and the theme of the text scene into a knowledge detection model by combining a psychological knowledge map, and simultaneously acquiring a sentence most related to the information of the next sentence so as to enable the knowledge detection model to output knowledge keywords;
the controlled text generation algorithm model training module is used for generating control information after splicing the knowledge key words, the text emotion types, the text scene themes and the sentences most related to the next sentence information, and is used for training the controlled text generation algorithm model together with the sample data;
and the psychological consultation reply output module is used for generating an algorithm model through the trained controlled text, analyzing the processed psychological consultation question-answer data of the user side and outputting psychological consultation reply of the psychological consultation question-answer data of the machine side.
A third aspect of embodiments of the present invention provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method provided in the first aspect when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of the method as provided by the first aspect above.
The embodiment of the invention provides a psychological counseling method based on controlled text generation, which is characterized in that the output of psychological counseling question-answer data at a machine side is converted into the output of a controlled text generation algorithm model, so that the controlled text generation algorithm model is applied to a human-computer interaction psychological counseling scene, the content relevance and fluency generated during psychological counseling conversation are improved, the semantics are coherent and logic is self-consistent, and the effect of improving intelligent counseling conversation is achieved.
Drawings
Fig. 1 is a schematic flow chart illustrating an implementation process of a psychological consultation method based on controlled text generation according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a psychological consultation device based on controlled text generation according to an embodiment of the present invention.
The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Suffixes such as "module", "part", or "unit" used to denote elements are used herein only for the convenience of description of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
As shown in fig. 1, a psychological counseling method based on controlled text generation, firstly training a controlled text generation algorithm model through sample data of psychological counseling question-answer data, and then using the processed psychological counseling question-answer data of the user side to make the processed psychological counseling question-answer data conform to the input of the controlled text generation algorithm model, so as to apply the controlled text generation algorithm model to a psychological counseling scene of human-computer interaction, the method includes but is not limited to the following steps:
s101, inputting sample data into an emotion detection model and a scene theme type identification model;
the emotion detection model outputs a text emotion type, and the scene theme type identification model outputs a text scene theme.
In the step S101, the sample data is historical psychological counseling question-answer data collected in the actual psychological counseling process, and is sorted and divided into historical psychological counseling question-answer data on the user side and historical psychological counseling question-answer data on the machine side corresponding to the historical psychological counseling question-answer data on the user side, wherein the historical psychological counseling question-answer data on the machine side includes the next sentence of information.
In the embodiment of the invention, the emotion detection model and the scene topic type identification model are trained Neural Network models, such as Neural Network structures of Recurrent Neural Networks (RNN), Convolutional Neural Networks (CNN), transformers, and the like. Illustratively, the emotion detection model is trained in the following way:
1. processing sample data, converting the sample data into a text with emotion labels, and marking the text as a first sample text, wherein the emotion labels comprise but are not limited to basic emotion types such as 'happiness', 'anger', 'sadness', 'joy', 'surprise', 'sadness', and 'terror';
2. and taking the first sample text as the input of the emotion detection model, acquiring the output result of the emotion detection model based on the first parameter and the emotion label, and adjusting the first parameter of the emotion detection model according to the output result and the first sample text until the output result of the emotion detection model is consistent with the emotion label. The output of the method is that the conditional probability value of the corresponding emotion label is obtained from the first sample text, the parameters of the emotion detection model are iterated through the loss function until the convergence condition is reached, and the convergence condition can enable the value of the loss function to be smaller than a preset threshold value or enable the iteration times to reach a preset iteration time threshold value.
The training mode of the scene theme type recognition model is as follows:
1. and processing the sample data, and acquiring text data with the text scene theme type as a second sample text. The text scene theme types include, but are not limited to, more than 200 scene theme types, such as "couple is not happy", "child game addiction", "how the workplace refuses", "high college entrance pressure", and "love amortization".
In a specific application, different scene theme types can influence the result of text generation, different scene themes and the same emotion tags express different meanings, for example, a "college entrance examination" scene theme and a "work" scene theme are different theme types, when the emotion tags are all in a "high pressure", when a conversation is generated, responses should be made according to the stress feeling brought by highlighting college entrance examination learning, and responses should be made according to the working state of people who step into the society to fight for life.
2. And taking the second sample text as an input of the scene theme type identification model. And acquiring an output result of the scene theme type identification model based on the second parameter and the text scene theme type, and adjusting the second parameter of the scene theme type identification model according to the output result and the second sample text until the output result of the scene theme type identification model is consistent with the second sample text label. The output of the model is that the conditional probability value of the corresponding text scene topic type is obtained from the second text sample, parameters of the scene topic type identification model are iterated through a loss function until a convergence condition is reached, and the convergence condition can be that the value of the loss function is smaller than a preset threshold value or the iteration times reach a preset iteration time threshold value.
And S102, inputting the sample data, the emotion type of the text and the theme of the text scene into a knowledge detection model by combining a psychological knowledge map, and simultaneously acquiring a sentence most related to the information of the next sentence so as to enable the knowledge detection model to output knowledge keywords.
In step S102, when the sample data, the emotion type of the text, and the theme of the text scene are input into the knowledge detection model by combining with the mental knowledge map, and the sentence most related to the next sentence information is input into the knowledge detection model, the contents are spliced by the < S > connector and then input, for example, the sample data is: when a girl friend proposes to divide hands with me, the emotion type of the text is sadness, the theme type of the text scene is love division, and the sentence most relevant to the next sentence information is ' do you talk about the experience that she knows with me specifically ', when the sentence is input into a knowledge detection model, the form is ' university quick division, girl friend proposes to divide hands with me < s > emotion: sad < s > topic: love hands < s > can you specifically talk to me about the experience she knows.
In the embodiment of the present invention, the mental knowledge map is a triplet of mental professional field, and includes at least three words with the attributes of < disorder, trigger, and expression >, such as < depression, trigger, and depression >.
In the embodiment of the present invention, the knowledge keyword output by the knowledge detection model is a three-element phrase with a ranking order, and the three-element phrase at least includes three words with attributes of < subject, relation, object >, such as < a, like, B >. Therefore, before the knowledge keyword is output by the knowledge detection model in step S102, the method for generating the knowledge keyword includes:
s1021, matching and outputting the ternary phrase according to the content keywords extracted by the knowledge detection model;
and S1022, converting the ternary phrase into a sentence to obtain a ternary sentence group.
In the embodiment of the present invention, the acquisition of the sentence most relevant to the next sentence information is realized by the common sense generation task, the target characteristic sentence set is constructed using the concept set and the automatically generated sentence capable of describing the concept set as the candidate set of the sentence most relevant to the next sentence information, and the finally generated sentence cannot violate the common sense. Therefore, the obtaining of the sentence most related to the next sentence information in step S102 includes:
and searching a sentence with the content closest to the ternary phrase from the target characteristic sentence set as a sentence most relevant to the information of the next sentence.
Based on this, the implementation manner of the knowledge detection model in step S102 to output the knowledge keyword may be:
and sequencing the sentences of the ternary sentence group according to the sentence most relevant to the next sentence information, and outputting content keywords with a sequencing order through a sequencing result, wherein the content keywords with the sequencing order are the knowledge keywords.
In practical applications, when the ternary phrase is converted into a sentence in step S1022, a plurality of results can be obtained, for example, based on < a, like, B >, B like B, B like a, like A B, if a sentence whose content is closest to the ternary phrase in the target characteristic sentence set is retrieved as B and also like a, then the sentence a like B is ordered > sentence B like a > AB, and the final output knowledge keyword is [ a, like, B ]. Similarly, based on sample data of ' university quick graduation, female friend proposes to divide hands with me ', the obtained knowledge key word is divided hands, which is felt and depressed by people '.
S103, after the knowledge key words, the text emotion types, the text scene themes and the sentences most related to the next sentence information are spliced, control information is generated and is used for training the controlled text generation algorithm model together with the sample data.
In the embodiment of the invention, the input of the controlled text generation algorithm model is the spliced knowledge key words, the text emotion types, the text scene topics, the sentences most related to the information of the next sentence and the sample data. Based on the above example, exemplarily, the content input in step S103 is "university quick graduation, girlfriend proposes to always feel depressed < S > emotion with my < S > hand division: sad < s > topic: love hands < s > can you specifically talk to me about the experience she knows.
The method comprises the following steps that sample data and control information are initial signals of an additional input module in an input controlled text generation algorithm model, knowledge keywords are used as sequence signals of a sequence input module in the input controlled text generation algorithm model, and the training mode is as follows:
splicing the psychological consultation question-answer data of the user side with the control information to serve as a training set for training the controlled text generation algorithm model;
and taking the next sentence information as a verification set for training the controlled text generation algorithm model.
It should be noted that, in the embodiment of the present invention, a generation operation module in the controlled text generation algorithm model adopts a Pre-Training text generation algorithm (GPT model), which is an auto-regressive language model, that is, a model parameter is optimized by predicting a future word by using an existing word and calculating a multi-layer Perceptron (MLP) loss for the probability of the predicted word.
In the embodiment of the invention, a training target module in a controlled text generation algorithm model updates parameters of the model by using a gradient descent method, specifically: setting eta as a learning rate, wherein the learning rate represents the updating amplitude of the parameters each time, and continuously iterating and calculating the parameters in an iteration mode through the sample data, the control information and the information of the next sentence until a convergence condition is reached, wherein the convergence condition is that a loss function is smaller than a preset threshold value or the number of training iterations is larger than a preset iteration number threshold value.
And S104, generating an algorithm model through the trained controlled text, analyzing the processed psychological consultation question-answer data of the user side, and outputting psychological consultation reply of the psychological consultation question-answer data of the machine side.
In the step S104, outputting the psychological consultation response, that is, generating the output text, wherein in the process, the output of the output module is completed through Top-p Sampling, so as to avoid the problem that the similarity of a plurality of texts output through the cluster search algorithm is high and the diversity of the output text is insufficient because the controlled text generation algorithm model predicts one word in the output text at each stage.
In a specific application, Top p Sampling is performed in a cumulative probability manner, that is, a word whose cumulative probability exceeds a certain threshold p is sampled. According to the embodiment of the invention, the Top-P Sampling increases the probability of generating words with smaller occurrence probability according to the size adjustment (0< = P < =1) of the parameter P, so that the diversity of output texts can be increased.
In the embodiment of the present invention, the psychological consulting question-answer data of the user side is obtained through a psychological consulting process of human-computer interaction, that is, before the step S104, the method includes:
obtaining psychological consultation question-answer data of a user side through man-machine interaction;
and processing the psychological consultation question-answer data of the user side.
Wherein, processing the psychological consulting question-answer data of the user side comprises:
converting the psychological consultation question-answer data of the user side into the control information;
and splicing the psychological consulting question-answer data of the user side with the control information to generate processed psychological consulting question-answer data of the user side.
In the embodiment of the present invention, the processing of the psychological consulting question-answer data on the user side is to obtain the control information based on the psychological consulting question-answer data on the user side, that is, the knowledge keyword, the text emotion type, the text scene topic, and the sentence most related to the next sentence information, through the processing manners in the above steps S101 to S103.
As shown in fig. 2, an embodiment of the present invention further provides a psychological counseling apparatus 20 based on controlled text generation, including:
the sample data processing module 21 is used for inputting sample data into the emotion detection model and the scene theme type identification model; the emotion detection model outputs a text emotion type, and the scene theme type identification model outputs a text scene theme;
a knowledge keyword output module 22, configured to input the sample data, the emotion type of the text, and the theme of the text scene into a knowledge detection model in combination with a psychological knowledge map, and meanwhile, obtain a sentence most relevant to information of a next sentence, so that the knowledge detection model outputs a knowledge keyword;
the controlled text generation algorithm model training module 23 is used for generating control information after splicing the knowledge key words, the text emotion types, the text scene themes and the sentences most related to the next sentence information, and is used for training the controlled text generation algorithm model together with the sample data;
and the psychological consultation reply output module 24 is used for generating an algorithm model through the trained controlled text, analyzing the processed psychological consultation question-answer data on the user side and outputting psychological consultation reply of the psychological consultation question-answer data on the machine side.
The embodiment of the present invention further provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the processor implements the steps of the psychological consulting method based on controlled text generation as described in the above embodiments.
An embodiment of the present invention further provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, the computer program implements the steps in the psychological consulting method based on controlled text generation as described in the above embodiments.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the foregoing embodiments illustrate the present invention in detail, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A psychological counseling method based on controlled text generation, comprising:
inputting sample data into an emotion detection model and a scene theme type identification model; the emotion detection model outputs a text emotion type, and the scene theme type identification model outputs a text scene theme;
inputting the sample data, the emotion type of the text and the theme of the text scene into a knowledge detection model by combining a psychological knowledge map, and simultaneously acquiring a sentence most related to the information of the next sentence so as to enable the knowledge detection model to output knowledge keywords;
after the knowledge key words, the emotion types of the texts, the themes of the text scenes and the sentences most relevant to the information of the next sentence are spliced, generating control information, and using the control information and the sample data together for training the controlled text generation algorithm model;
and generating an algorithm model through the trained controlled text, analyzing the processed psychological consultation question-answer data of the user side, and outputting psychological consultation reply of the psychological consultation question-answer data of the machine side.
2. A psychological consultation method based on controlled text generation according to claim 1, characterized in that before the knowledge detection model outputs the knowledge key words, it includes:
matching and outputting the ternary phrases according to the content keywords extracted by the knowledge detection model;
and converting the ternary phrase into a sentence to obtain a ternary sentence group.
3. A psychological counseling method based on controlled text generation as recited in claim 2, wherein the obtaining of the sentence most related to the next sentence information comprises:
and searching a sentence with the content closest to the three-phrase from the target characteristic sentence set as a sentence most related to the information of the next sentence.
4. A psychological counseling method based on controlled text generation as recited in claim 3, wherein the knowledge detection model outputs knowledge keywords comprising:
and sequencing the sentences of the ternary sentence group according to the sentence most relevant to the next sentence information, and outputting content keywords with a sequencing order through a sequencing result, wherein the content keywords with the sequencing order are the knowledge keywords.
5. A psychological counseling method based on controlled text generation as recited in claim 1, wherein after the knowledge keyword, the emotion type of the text, the topic of the text scene and the sentence most related to the next sentence information are spliced, control information is generated and used together with the sample data for training the controlled text generation algorithm model, comprising:
splicing the psychological consultation question-answer data of the user side with the control information to serve as a training set for training the controlled text generation algorithm model;
and taking the next sentence information as a verification set for training the controlled text generation algorithm model.
6. A psychological counseling method based on controlled text generation according to claim 1, wherein before the processed user-side psychological counseling quiz data is analyzed through the trained controlled text generation algorithm model and the psychological counseling reply of the machine-side psychological counseling quiz data is outputted, comprising:
obtaining psychological consultation question-answer data of a user side through man-machine interaction;
and processing the psychological consultation question-answer data of the user side.
7. A method for psychological counseling based on controlled text generation as recited in claim 6, wherein the processing of the user-side psychological counseling question-answer data comprises:
converting the psychological consultation question-answer data of the user side into the control information;
and splicing the psychological consulting question-answer data of the user side with the control information to generate processed psychological consulting question-answer data of the user side.
8. A psychological counseling apparatus based on controlled text generation, comprising:
the sample data processing module is used for inputting sample data into the emotion detection model and the scene theme type identification model; the emotion detection model outputs a text emotion type, and the scene theme type identification model outputs a text scene theme;
the knowledge keyword output module is used for inputting the sample data, the emotion types of the texts and the scene themes of the texts into a knowledge detection model by combining a psychological knowledge map, and simultaneously acquiring sentences most relevant to the information of the next sentence so as to enable the knowledge detection model to output knowledge keywords;
the controlled text generation algorithm model training module is used for generating control information after splicing the knowledge key words, the text emotion types, the text scene themes and the sentences most related to the next sentence information, and is used for training the controlled text generation algorithm model together with the sample data;
and the psychological consultation reply output module is used for generating an algorithm model through the trained controlled text, analyzing the processed psychological consultation question-answer data of the user side and outputting psychological consultation reply of the psychological consultation question-answer data of the machine side.
9. A terminal device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the computer program, performs the steps of the controlled text generation based psychological counseling method according to any one of claims 1 to 7.
10. A storage medium which is a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the controlled text generation based psychological counseling method according to any one of claims 1 to 7.
CN202210303626.4A 2022-03-24 2022-03-24 Psychological consultation method and device based on controlled text generation and terminal equipment Pending CN114661864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210303626.4A CN114661864A (en) 2022-03-24 2022-03-24 Psychological consultation method and device based on controlled text generation and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210303626.4A CN114661864A (en) 2022-03-24 2022-03-24 Psychological consultation method and device based on controlled text generation and terminal equipment

Publications (1)

Publication Number Publication Date
CN114661864A true CN114661864A (en) 2022-06-24

Family

ID=82031470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210303626.4A Pending CN114661864A (en) 2022-03-24 2022-03-24 Psychological consultation method and device based on controlled text generation and terminal equipment

Country Status (1)

Country Link
CN (1) CN114661864A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116821287A (en) * 2023-08-28 2023-09-29 湖南创星科技股份有限公司 Knowledge graph and large language model-based user psychological portrait system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116821287A (en) * 2023-08-28 2023-09-29 湖南创星科技股份有限公司 Knowledge graph and large language model-based user psychological portrait system and method
CN116821287B (en) * 2023-08-28 2023-11-17 湖南创星科技股份有限公司 Knowledge graph and large language model-based user psychological portrait system and method

Similar Documents

Publication Publication Date Title
CN108363790B (en) Method, device, equipment and storage medium for evaluating comments
CN107798140B (en) Dialog system construction method, semantic controlled response method and device
JP6819990B2 (en) Dialogue system and computer programs for it
US7630981B2 (en) Method and system for learning ontological relations from documents
CN109460459B (en) Log learning-based dialogue system automatic optimization method
CN113127624B (en) Question-answer model training method and device
Zhao et al. ZYJ123@ DravidianLangTech-EACL2021: Offensive language identification based on XLM-RoBERTa with DPCNN
CN110442880B (en) Translation method, device and storage medium for machine translation
Shen et al. Kwickchat: A multi-turn dialogue system for aac using context-aware sentence generation by bag-of-keywords
CN116821457B (en) Intelligent consultation and public opinion processing system based on multi-mode large model
CN114297399A (en) Knowledge graph generation method, knowledge graph generation system, storage medium and electronic equipment
CN114676259B (en) Conversation emotion recognition method based on causal perception interactive network
CN116821290A (en) Multitasking dialogue-oriented large language model training method and interaction method
CN116431806A (en) Natural language understanding method and refrigerator
CN109710913A (en) Semantic hierarchy generation method and terminal based on dependency analysis
Varaprasad et al. Applications and Techniques of Natural Language Processing: An Overview.
CN114661864A (en) Psychological consultation method and device based on controlled text generation and terminal equipment
TWI734085B (en) Dialogue system using intention detection ensemble learning and method thereof
US20230103313A1 (en) User assistance system
CN107153685B (en) Cognitive method and device based on timeline memory in man-machine conversation system
Al-Abri et al. A scheme for extracting information from collaborative social interaction tools for personalized educational environments
CN114330285A (en) Corpus processing method and device, electronic equipment and computer readable storage medium
CN113971212A (en) Multilingual question and answer method and device, electronic equipment and storage medium
Ali et al. AI-Natural Language Processing (NLP)
CN111460106A (en) Information interaction method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination