Network psychological counseling method and system based on human-computer interaction technology
Through the online psychological counseling method based on human-computer interaction technology, combined with speech recognition and in-depth model, targeted psychological counseling is provided, which solves the problems of insufficient accuracy and user privacy protection of existing AI psychological counseling robots, and improves psychological counseling Accuracy and user experience.
Patent Information
- Application Number
- CN202410966663.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing AI psychological counseling robots have shortcomings in accuracy and user privacy protection, especially users with mental and sexual-related emotional problems, which are unwilling to seek psychological assistance, and psychological diseases and physiological diseases affect each other, so more effective psychological counseling is needed. method.
Using a network psychological counseling method based on human-computer interaction technology, voice signals are obtained through intelligent devices, combined with speech recognition, intention recognition and slot filling, semantic understanding is used using seq2seq model and attention mechanism, and combined with finite state machine and depth model to generate nature Language output, providing targeted psychological counseling, including supportive psychotherapy, psychoanalytic therapy, cognitive behavioral therapy, and humanistic therapy.
It improves the accuracy and user experience of psychological counseling. Through fine-grained word information integration and joint modeling, the accumulation of wrong results is avoided, more accurate psychological counseling is provided, and the support effect of user experience and mental health is improved.
Smart Images

Figure CN118969199A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of human-computer interaction, and in particular to a network psychological consultation method and system based on human-computer interaction technology. Background Art
[0002] At present, mental illness is becoming increasingly prominent. Physiological diseases and mental illnesses influence each other. Mental illness can lead to many physical diseases. For example, negative emotions such as anxiety and depression can lead to gastrointestinal disorders, insomnia, etc., and physical diseases can also lead to mental illness. For example, insomnia can aggravate depression and anxiety.
[0003] When people encounter some psychological problems, they do not immediately seek help from psychologists or counselors, especially for men's psychological problems or emotional problems related to gender. It is common for people to not seek psychological help because they are embarrassed or worried about leaking personal privacy. With the increase in demand, some AI psychological counseling robots have appeared on the market that can interact with people through voice and help regulate people's emotions, but their accuracy needs to be improved. Therefore, we propose an online psychological counseling method and system based on human-computer interaction technology to solve the above problems. Summary of the invention
[0004] The purpose of the present invention is to provide a network psychological consultation method and system based on human-computer interaction technology to solve the problems in the current market raised by the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solution: a network psychological consultation method based on human-computer interaction technology, comprising the following steps:
[0006] Step 1: Obtain the user's voice signal through the smart device and perform voice recognition;
[0007] Step 2: Understand the semantics of user sentences through intent recognition and slot recognition, and train the seq2seq model with the attention mechanism to obtain intent label information, which is used to guide the subsequent slot filling task, so as to perform joint modeling of intent recognition and slot filling.
[0008] Step 3: Track the dialogue state and match the dialogue strategy based on the rule-based finite state machine to generate abstract system actions;
[0009] Step 4: Based on knowledge base learning and deep models, the abstract system actions are converted into shallow expressions in natural language and output to the user end;
[0010] Step 5: Comprehensively evaluate the user's status based on the content of the user's conversation and provide targeted psychological guidance.
[0011] Preferably, the speech recognition receives input x through the RNN of the encoder, and finally outputs a context vector c that encodes all information. The intermediate neurons do not output. The decoder passes in the context vector c and then decodes the required information. The calculation formula of the context vector c is:
[0012] c=q(h1,h2,...,h N );
[0013] Among them, the q function represents a certain transformation, h1 represents the hidden state of the first neuron, and h N represents the hidden state of the last neuron.
[0014] Preferably, in the step 2, sentence-level word information is integrated into the overall representation of the user's speech to perform intent recognition, and character-level word information is integrated into the encoded representation of the user's speech to perform slot filling, and the weights between character features and word features are adaptively determined to achieve fine-grained integration of word information.
[0015] Preferably, the attention mechanism retains the hidden layer vector h of each neuron of the encoder, and then the t-th neuron of the decoder is based on the hidden layer vector h' of the previous neuron t-1 Calculate the correlation et between the current state and each neuron of the encoder. The calculation formula is as follows:
[0016] e t =[a(h' t-1 ,h1),a(h' t-1 ,h2),...,a(h' t-1 ,h N )].
[0017] Preferably, the natural language output form includes text and / or voice output.
[0018] Preferably, in step five, if the user state is sad, supportive psychotherapy is used to provide psychological counseling to the user; if the user state is angry, psychoanalysis therapy is used to provide psychological counseling to the user; if the user state is depressed and anxious, cognitive behavioral therapy is used to provide psychological counseling to the user; if the user state is peaceful, humanistic therapy is used to provide psychological counseling to the user.
[0019] A network psychological consultation system based on human-computer interaction technology, comprising:
[0020] A speech recognition module, used to obtain the user's speech signal and perform speech recognition;
[0021] The natural language understanding module is used to receive speech recognition content, obtain intent label information by training the seq2seq model, and deeply understand the meaning of user sentences;
[0022] The dialogue management module is used to track the dialogue state and match the dialogue strategy to generate abstract system actions;
[0023] The natural language generation module is used to convert abstract system actions into shallow expressions in natural language and output them to the user end;
[0024] Intelligent diagnosis module, used to comprehensively evaluate the user's status based on the user's conversation content and provide targeted psychological counseling;
[0025] The communication module is used for transmitting signaling and voice streams.
[0026] Preferably, the natural language understanding module includes a graph recognition function and a slot filling function.
[0027] Preferably, the natural language generation module performs conversion into natural language form based on knowledge base retrieval and deep model.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] The present invention combines the attention mechanism in natural language understanding to train the seq2seq model to obtain intent label information, thereby achieving fine-grained integration of word information, and performing joint modeling of intent recognition and slot filling to avoid the accumulation of erroneous results, thereby improving the performance of the model and the accuracy of recognition, thereby optimizing the conversation content, providing accurate psychological counseling for users, and improving user experience.
[0030] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present invention will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 The present invention is a flowchart of a network psychological consultation method based on human-computer interaction technology. DETAILED DESCRIPTION
[0032] 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.
[0033] See also Figure 1 , a network psychological consultation method based on human-computer interaction technology, comprising the following steps:
[0034] Step 1: Obtain the user's voice signal through the smart device and perform voice recognition;
[0035] Specifically, the encoder's RNN accepts input x and finally outputs a context vector c that encodes all information. The intermediate neurons do not output. The decoder passes in the context vector c and then decodes the required information. The calculation formula for the context vector c is:
[0036] c=q(h1,h2,...,h N );
[0037] Step 2: Understand the semantics of user sentences through intent recognition and slot recognition, train the seq2seq model with the attention mechanism, integrate sentence-level word information into the overall representation of user speech for intent recognition, integrate character-level word information into the encoded representation of user speech for slot filling, adaptively determine the weights between character features and word features, realize fine-grained integration of word information, and use the obtained intent label information to guide the subsequent slot filling task, so as to perform joint modeling of intent recognition and slot filling;
[0038] The attention mechanism retains the hidden layer vector h of each neuron in the encoder, and then the t-th neuron of the decoder is based on the hidden layer vector h' of the previous neuron. t-1 Calculate the correlation et between the current state and each neuron of the encoder. The calculation formula is as follows:
[0039] e t =[a(h' t-1 ,h1),a(h' t-1 ,h2),...,a(h' t-1 ,h N )],
[0040] Among them, the q function represents a certain transformation, h1 represents the hidden state of the first neuron, and h N represents the hidden state of the last neuron;
[0041] Step 3: Track the dialogue state and match the dialogue strategy based on the rule-based finite state machine to generate abstract system actions;
[0042] Step 4: Based on knowledge base learning and deep models, the abstract system actions are converted into shallow expressions in natural language form and output to the user end; the natural language output form includes text and / or voice output;
[0043] Step 5: Comprehensively evaluate the user's status based on the user's conversation content and provide targeted psychological counseling; if the user's status is sad, use supportive psychotherapy to provide psychological counseling for the user; if the user's status is angry, use psychoanalytic therapy to provide psychological counseling for the user; if the user's status is depressed and anxious, use cognitive behavioral therapy to provide psychological counseling for the user; if the user's status is peaceful, use humanistic therapy to provide psychological counseling for the user.
[0044] A network psychological consultation system based on human-computer interaction technology, comprising:
[0045] A speech recognition module, used to obtain the user's speech signal and perform speech recognition;
[0046] The natural language understanding module is used to receive speech recognition content and obtain intent label information by training the seq2seq model to guide the subsequent slot filling task, so as to perform joint modeling of intent recognition and slot filling and deeply understand the meaning of user sentences. After training, the seq2seq model can imitate human language ability and judge the meaning of user sentences.
[0047] The dialogue management module tracks the dialogue state and matches the dialogue strategy based on knowledge base retrieval and deep models to generate abstract system actions. The dialogue management methods include rule-based finite state machines, statistical methods, or neural network-based methods. This module is equivalent to the brain of the task-based robot.
[0048] A natural language generation module is used to convert abstract system actions into shallow expressions in natural language and output them to the user end; the output forms include text and / or voice output, which is selected according to user customization;
[0049] The intelligent diagnosis module is used to comprehensively evaluate the user's status based on the user's conversation content and provide targeted psychological counseling. If the user's status is sad, supportive psychotherapy is used to provide psychological counseling for the user; if the user's status is angry, psychoanalysis therapy is used to provide psychological counseling for the user; if the user's status is depression and anxiety, cognitive behavioral therapy is used to provide psychological counseling for the user; if the user's status is peaceful, humanistic therapy is used to provide psychological counseling for the user;
[0050] The communication module is used for transmitting signaling and voice streams.
[0051] The present invention combines the attention mechanism in natural language understanding to train the seq2seq model to obtain intent label information, thereby achieving fine-grained integration of word information, and performing joint modeling of intent recognition and slot filling to avoid the accumulation of erroneous results, thereby improving the performance of the model and the accuracy of recognition, thereby optimizing the conversation content, providing accurate psychological counseling for users, and improving user experience.
[0052] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0053] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0054] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0055] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0056] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by hardware associated with program instructions, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps in the method embodiment.
[0057] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0058] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A network psychological consultation method based on human-computer interaction technology, characterized in that: The steps include: Step 1: Obtain the user's voice signal through the smart device and perform voice recognition; Step 2: Understand the semantics of user sentences through intent recognition and slot recognition, and train the seq2seq model with the attention mechanism to obtain intent label information, which is used to guide the subsequent slot filling task, so as to perform joint modeling of intent recognition and slot filling. Step 3: Track the dialogue state and match the dialogue strategy based on the rule-based finite state machine to generate abstract system actions; Step 4: Based on knowledge base learning and deep models, the abstract system actions are converted into shallow expressions in natural language and output to the user end; Step 5: Comprehensively evaluate the user's status based on the content of the user's conversation and provide targeted psychological counseling.
2. The network psychological consultation method based on human-computer interaction technology according to claim 1 is characterized by: The speech recognition receives input x through the RNN of the encoder, and finally outputs a context vector c that encodes all information. The intermediate neurons do not output. The decoder passes in the context vector c and then decodes the required information. The calculation formula of the context vector c is: c=q(h1,h2,...,h N ); Among them, the q function represents a certain transformation, h1 represents the hidden state of the first neuron, and h N represents the hidden state of the last neuron.
3. The network psychological consultation method based on human-computer interaction technology according to claim 1 is characterized by: In the step 2, sentence-level word information is integrated into the overall representation of the user's speech to perform intent recognition, character-level word information is integrated into the encoded representation of the user's speech to fill in the slots, and the weights between character features and word features are adaptively determined.
4. The network psychological consultation method based on human-computer interaction technology according to claim 1 is characterized by: The attention mechanism retains the hidden layer vector h of each neuron of the encoder, and then the tth neuron of the decoder is based on the hidden layer vector h' of the previous neuron t-1 Calculate the correlation et between the current state and each neuron of the encoder. The calculation formula is as follows: e t =[a(h' t-1 ,h1),a(h' t-1 ,h2),...,a(h' t-1 ,h N )]。 5. The network psychological consultation method based on human-computer interaction technology according to claim 1 is characterized by: The natural language output form includes text and / or voice output.
6. The network psychological consultation method based on human-computer interaction technology according to claim 1 is characterized by: In the step 5, if the user is in a sad state, supportive psychotherapy is used to provide psychological counseling to the user; If the user is angry, psychoanalysis therapy is used to provide psychological counseling for the user; if the user is depressed and anxious, cognitive behavioral therapy is used to provide psychological counseling for the user; If the user is in a peaceful state, humanistic therapy will be used to provide psychological counseling to the user.
7. A network psychological consultation system based on human-computer interaction technology, characterized in that: include: A speech recognition module, used to obtain the user's speech signal and perform speech recognition; The natural language understanding module is used to receive speech recognition content, obtain intent label information by training the seq2seq model, and deeply understand the meaning of user sentences; The dialogue management module is used to track the dialogue state and match the dialogue strategy to generate abstract system actions; The natural language generation module is used to convert abstract system actions into shallow expressions in natural language and output them to the user end; Intelligent diagnosis module, which is used to comprehensively evaluate the user's status based on the user's conversation content and provide targeted psychological guidance; The communication module is used for transmitting signaling and voice streams.
8. The network psychological consultation system based on human-computer interaction technology according to claim 7 is characterized by: The natural language understanding module includes an intent recognition function and a slot filling function.
9. The network psychological consultation system based on human-computer interaction technology according to claim 7 is characterized by: The natural language generation module performs conversion into natural language form based on knowledge base retrieval and deep model.
