Question and answer method, device and equipment based on psychological counseling and computer program product
By constructing a case database and using machine learning technology to generate psychological counseling planning schemes and dialogues, the problem that psychological counseling services in the existing technology are difficult to cover the vast demands, and an automated psychological counseling question and answer system is realized.
Patent Information
- Application Number
- CN202510111040.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-05-13
AI Technical Summary
The existing technology centers rely highly on limited professional human resources and are difficult to cover the vast number of people in need.
By constructing a case database, machine learning technology is used to retrieve cases associated with the consulting object's problems from the case database, corresponding consultation planning schemes are generated, and psychological intervention dialogue is generated through small sample learning.
An automated psychological counseling question and answer system is realized, which can automatically generate psychological counseling conversations, cover the majority of people in need, and even provide professional psychological intervention without professional psychological counselors.
Smart Images

Figure CN119988559A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of multi-round question-answering, and in particular to a psychological counseling question-answering method, device, electronic device and computer program product. Background Art
[0002] As society progresses, personal mental health is increasingly valued. Psychological counseling, as a professional service, aims to help people solve psychological problems and improve their mental health. At present, people mainly receive psychological counseling through interactive communication with professional psychological counselors, but this method is highly dependent on limited professional human resources and is difficult to cover the vast number of people in need. Summary of the invention
[0003] In view of this, the present application proposes a psychological counseling question-and-answer method, device, electronic device and computer program product to solve the problem in the prior art that psychological counseling is highly dependent on limited professional human resources and is difficult to cover a large number of people in need.
[0004] The technical solutions proposed in this application are as follows:
[0005] In a first aspect, an embodiment of the present application provides a psychological consultation question-and-answer method, comprising:
[0006] According to the first problem description statement of the consulting object, a second problem description statement associated with the first problem description statement is retrieved from a plurality of problem description statements stored in a case database; the case database stores the plurality of problem description statements and consulting planning schemes corresponding to the respective problem description statements;
[0007] Generate a first consulting planning solution corresponding to the first problem description statement by learning the second problem description statement and the second consulting planning solution corresponding to the second problem description statement;
[0008] A psychological intervention dialogue is generated with the consulting object according to the first consulting planning scheme.
[0009] Furthermore, the above method further includes:
[0010] Conduct an inquiry dialogue with the consulting object, and extract a first problem description sentence of the consulting object based on the dialogue sentences generated during the inquiry dialogue.
[0011] Furthermore, in the above method, the process of constructing the case database includes:
[0012] By analyzing the psychological consultation sentences obtained in advance, constructing problem description sentences with different degrees of perfection, and the consultation planning schemes corresponding to the problem description sentences with different degrees of perfection;
[0013] The problem description statements with different degrees of perfection and the consulting planning solutions corresponding to the problem description statements with different degrees of perfection are stored as cases in the case database.
[0014] Furthermore, in the above method, the problem description statements with different degrees of perfection are constructed by analyzing the pre-acquired psychological consultation statements, and the consultation planning schemes corresponding to the problem description statements with different degrees of perfection include:
[0015] By analyzing the pre-acquired psychological consultation sentences, the problem description sentences and the consultation planning scheme therein are extracted; the problem description sentences include a basic problem description sentence generated according to a part of the content of the inquiry stage of the psychological consultation sentence, and a complete problem description sentence generated according to the complete content of the inquiry stage of the psychological consultation sentence, and the consultation planning scheme is generated according to the complete problem description sentence;
[0016] Determining the difference between the basic problem description statement and the complete problem description statement;
[0017] The consulting planning scheme is modified according to the differentiated content to generate a consulting planning scheme corresponding to the basic problem description statement.
[0018] Furthermore, in the above method, the problem description statements with different degrees of perfection are constructed by analyzing the pre-acquired psychological consultation statements, and the consultation planning schemes corresponding to the problem description statements with different degrees of perfection include:
[0019] By analyzing the psychological consultation sentences obtained in advance, the problem description sentences and consultation planning schemes are extracted;
[0020] Expanding the problem description statement to obtain an expanded problem description statement;
[0021] The consulting plan is modified according to the expanded content in the expansion process to obtain a consulting plan corresponding to the expanded problem description statement.
[0022] Furthermore, in the above method, the retrieving a second problem description statement associated with the first problem description statement from a plurality of problem description statements stored in the case database includes:
[0023] Calculating sentence similarity between a plurality of problem description sentences stored in the case database and the first problem description sentence; the sentence similarity includes a first similarity and / or a second similarity, the first similarity is determined based on similarities between the plurality of problem description sentences stored in the case database and the first problem description sentence in each problem dimension; the second similarity includes types and quantities of problem dimensions included in the plurality of problem description sentences stored in the case database and the first problem description sentence;
[0024] According to the sentence similarity, a second problem description sentence associated with the first problem description sentence is determined.
[0025] Furthermore, in the above method, the step of generating a first consulting planning solution corresponding to the first problem description statement by learning the second problem description statement and the second consulting planning solution corresponding to the second problem description statement includes:
[0026] Using the second problem description sentence as a sample and the second consultation planning scheme corresponding to the second problem description sentence as a label, performing few-sample learning on the psychological consultation model;
[0027] The first problem description statement is input into the learned psychological counseling model so that the learned psychological counseling model generates a first counseling planning scheme corresponding to the first problem description statement.
[0028] Furthermore, in the above method, the method further comprises:
[0029] Acquiring feedback information from the consulting subject; the feedback information includes feedback from the consulting subject on the psychological intervention dialogue;
[0030] An adjustment plan for the first consulting planning plan is determined based on the feedback information.
[0031] Furthermore, in the above method, determining an adjustment plan for the first consulting planning plan according to the feedback information includes:
[0032] If the feedback information of the consulting object includes negative feedback, determining the adjustment plan of the first consulting planning method includes regenerating the first problem description statement, and re-determining the first consulting planning plan according to the regenerated first problem description statement;
[0033] The negative feedback includes that the feedback from the consulting object exceeds the scope of the first consulting planning scheme, and / or the consulting object does not accept the logic of the first consulting planning scheme.
[0034] In a second aspect, an embodiment of the present application provides a psychological consultation question-and-answer device, comprising:
[0035] A retrieval module, configured to retrieve, according to a first problem description statement of a consulting object, a second problem description statement associated with the first problem description statement from a plurality of problem description statements stored in a case database; the case database stores the plurality of problem description statements and consulting planning schemes corresponding to the plurality of problem description statements;
[0036] A generation module is used to generate a first consultation plan corresponding to the first problem description statement by learning the second problem description statement and the second consultation plan corresponding to the second problem description statement; and generate a psychological intervention dialogue with the consultation object based on the first consultation plan.
[0037] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0038] A memory and a processor; wherein the memory is used to store programs; and the processor is used to implement any of the methods described above by running the programs in the memory.
[0039] In a fourth aspect, an embodiment of the present application provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the computer program implements any one of the above methods. Optionally, the computer program can be stored in a readable storage medium of a computer device or in the cloud; the processor of the computer device reads the computer program from the readable storage medium or the cloud.
[0040] The question-and-answer method based on psychological counseling proposed in the present application can retrieve a second question description statement associated with the first question description statement from multiple question description statements stored in a case database according to the first question description statement of the counseling object, and the case database stores multiple question description statements and counseling planning schemes corresponding to each question description statement. By learning the second question description statement and the second counseling planning scheme corresponding to the second question description statement, a first counseling planning scheme corresponding to the first question description statement is generated, so as to generate a psychological intervention dialogue with the counseling object according to the first counseling planning scheme. In this way, a psychological counseling dialogue can be automatically generated by learning the case associated with the counseling object, and automatic psychological counseling Q&A can be realized. Even if the user does not interact with a professional psychological counselor, he can still get professional psychological intervention, which can cover a large number of people in need. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0042] Figure 1 It is a schematic diagram of a feasible application scenario of the question-and-answer method based on psychological counseling provided in an embodiment of the present application.
[0043] Figure 2 It is a flowchart of a question-and-answer method based on psychological counseling provided in an embodiment of the present application.
[0044] Figure 3 It is a flowchart of another question-and-answer method based on psychological counseling provided in an embodiment of the present application.
[0045] Figure 4 It is a structural diagram of a question-and-answer device based on psychological consultation provided in an embodiment of the present application.
[0046] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0048] Personal mental health issues are increasingly valued in modern society. As a professional service, psychological counseling plays a vital role. It not only helps people solve psychological problems, but also strives to improve personal mental health and promote the comprehensive development of their emotional, cognitive and social functions. Through interactive communication with professional psychological counselors, help seekers can explore their own psychological problems in a safe and confidential environment. Psychological counselors use psychological methods and theories to help help seekers discover potential root causes of problems, improve self-cognition, and explore effective coping strategies.
[0049] However, the current psychological counseling service model faces significant limitations. This approach is highly dependent on limited professional human resources, namely qualified and experienced psychological counselors. Due to the relative scarcity of excellent psychological counselors, it is difficult for psychological counseling services to cover the vast number of people in need. In particular, it is particularly difficult to obtain professional psychological counseling in some remote areas or places with scarce resources. In addition, face-to-face counseling may be limited by factors such as time, location and personal privacy, further reducing the accessibility and convenience of the service.
[0050] As people's awareness of mental health increases, the contradiction between supply and demand becomes more obvious. Many people seeking help cannot get the necessary support in time. Especially when facing acute psychological crises, the impact of this imbalance between supply and demand is more serious. Therefore, the existing psychological counseling model has encountered severe challenges in meeting the broad social needs.
[0051] Based on this, the present application proposes a question-and-answer method, device, equipment and computer program product based on psychological counseling. The technical solution automatically generates psychological counseling dialogues by learning cases associated with the counseling object, thereby achieving the effect of automatic psychological counseling question-and-answering.
[0052] Figure 1 The feasible application scenarios of the question-answering method based on psychological consultation are shown, such as Figure 1 In the scenario shown, a client and a server are set up.
[0053] The client can be an electronic device with network access capability. Specifically, for example, the client can be a desktop computer, a tablet computer, a laptop computer, a smart phone, a digital assistant, a smart wearable device, a shopping guide terminal, a television, etc. Among them, the smart wearable device includes but is not limited to a smart bracelet, a smart watch, a smart glasses, a smart helmet, a smart necklace, etc. Alternatively, the client can also be software that can run in an electronic device.
[0054] The server can be an electronic device with certain computing and processing capabilities. It can have a network communication module, a processor, and a memory, etc. Of course, the server can also refer to software running in an electronic device. The server can also be a distributed server, which can be a system with multiple processors, memories, network communication modules, etc. operating in collaboration. Alternatively, the server can also be a server cluster formed by several servers. Alternatively, with the development of science and technology, the server can also be a new technical means that can realize the corresponding functions of the implementation method of the specification. For example, it can be a new form of "server" based on quantum computing.
[0055] The client and the server can communicate through the target network. The target network can be any type of network. For example, the target network can be a network that can be subdivided into multiple subnetworks. The target network or the multiple subnetworks contained in the target network can be at least one of a cellular mobile network (such as 2G, 3G, 4G or 5G), ZIGBEE, WIFI, Bluetooth, or any combination of at least one of these networks and other networks.
[0056] In the above feasible application scenario, the client is used to conduct an inquiry dialogue with the consulting object under the instruction of the server, and send the dialogue sentences generated during the inquiry dialogue to the server. The server extracts the first problem description sentence of the consulting object based on the dialogue sentences generated during the inquiry dialogue, and then retrieves the second problem description sentence associated with the first problem description sentence from multiple problem description sentences stored in the case database according to the first problem description sentence of the consulting object. The case database stores multiple problem description sentences and consultation planning schemes corresponding to each problem description sentence. By learning the second problem description sentence and the second consultation planning scheme corresponding to the second problem description sentence, a first consultation planning scheme corresponding to the first problem description sentence is generated, and a psychological intervention dialogue with the consulting object is generated according to the first consultation planning scheme, and the dialogue content is sent to the client so that the client can have a dialogue with the consulting object.
[0057] During the psychological intervention process, the server sends the psychological intervention dialogue to the client, so that the client outputs the psychological intervention dialogue to interact with the consulting object, and then the client collects the feedback information of the consulting object and sends the feedback information to the server. The server generates the next sentence of psychological intervention dialogue according to the first consultation plan, the feedback information of the consulting object and the context information and sends it to the client, so that the client outputs the next sentence of psychological intervention dialogue to interact with the consulting object, and then the client collects the feedback information of the consulting object and sends the feedback information to the server, and so on and so forth until the psychological intervention is completed.
[0058] In this way, psychological counseling dialogues can be automatically generated by learning cases related to the counseling objects, and psychological counseling questions and answers can be automatically conducted. Even if users do not interact with professional counselors, they can receive professional psychological intervention, which can cover a large number of people in need.
[0059] Furthermore, the embodiment of the present application proposes a question-and-answer method based on psychological consultation, which can be executed by an electronic device, which can be any device with data and instruction processing functions, such as a laptop, tablet computer, desktop computer, mobile device (e.g., mobile phone, personal digital assistant, dedicated messaging device) and other types of user terminals or a combination of any two or more of these electronic devices, or a server, such as the server in the above embodiment. Figure 2 As shown, the method includes:
[0060] S101. According to a first problem description statement of a consulting object, a second problem description statement associated with the first problem description statement is retrieved from a plurality of problem description statements stored in a case database.
[0061] In this embodiment, the consulting object refers to the object of psychological counseling.
[0062] The first problem description statement of the consulting object is used to describe the current state of the consulting object. The first problem description statement includes multiple problem dimensions, so as to describe the current state of the consulting object from different problem dimensions. The above multiple problem dimensions include at least one of the consulting object's basic information, main complaint, problem background, problem development process, coping style, previous psychological problems, physical disease history and family medical history.
[0063] Among them, the basic information of the consultant includes the name, gender, age, occupation and other information of the consultant. It should be noted that in order to protect the privacy of the consultant, the name of the consultant can be a pseudonym, such as Xiao A, Xiao B, etc. The main complaint refers to the main problems and troubles stated by the consultant himself, including the specific manifestations, duration, severity, etc. of the problem. For example, "In the past month, I have always felt anxious, had difficulty falling asleep at night, and could not concentrate at work." The problem background indicates whether the problem is triggered by a specific event, such as changes in the family environment and interpersonal relationships. For example, "The problem appeared after changing to a new job. The work pressure is very high, and the relationship between colleagues is also tense." The problem development process describes in detail the development and changes of the problem from the beginning to the present, including the ups and downs of the problem, and the factors that aggravate or relieve it. For example, "At first, I only felt anxious occasionally, and then it gradually worsened, especially when the project deadline was approaching, the anxiety became more obvious." Coping style records the coping styles adopted by the consultant when facing the problem, and the effectiveness of these styles. For example, "I have tried to relieve anxiety through exercise and listening to music, but the effect is not obvious." Past psychological problems are used to understand whether the consultant has a history of other psychological problems, including treatment status and treatment effects. For example, "I had a period of depression two years ago, but it got better after psychological counseling and medication." Some physical illnesses may affect the psychological state, so it is necessary to understand the physical disease history of the person being consulted. For example, "I have a history of high blood pressure and have been taking medication to control it." Psychological problems or a history of mental illness in the family may increase the risk of the person developing psychological problems, so it is necessary to understand the family history of the person being consulted. For example, "There are people with depression in the family."
[0064] In a specific embodiment, the first problem description statement should at least include basic information, main complaint and problem background, and then the first problem description statement is considered complete. It should also be noted that the first problem description statement may not use the first person, but may use a pseudonymous third person.
[0065] In some embodiments, the medical records provided by the consulting object may be obtained, and the required first problem description sentence may be directly extracted from the medical records through text recognition, image recognition, etc.
[0066] In other embodiments, an inquiry dialogue may be conducted with the consulting object, and the first question description sentence of the consulting object may be extracted based on the dialogue sentences generated during the inquiry dialogue.
[0067] For example, multiple questions can be pre-set, and the pre-set multiple questions are output one by one at the stage of extracting the first question description statement, so that the consulting object can answer, and the multiple question-answering statements generated thereby are combined into a dialogue statement, and then the first question description statement of the consulting object is extracted from the dialogue statement. For example, sentences such as "Do you have any questions to tell me?", "How do you feel now?", "What was your situation before?", "Have you ever thought about what you can do to change your current situation?" can be set specifically according to actual conditions, and this embodiment does not limit them.
[0068] For another example, the large model can be used to conduct an inquiry dialogue with the consulting object, obtain the dialogue sentences generated during the inquiry dialogue, and extract the first question description sentence of the consulting object. The large model in this embodiment includes a large language model (LLM), and the large model described in the subsequent embodiments also includes LLM. The large model can be fine-tuned to enable it to have the ability to perform inquiry dialogues.
[0069] For example, psychological counseling statements generally include dialogue data from three stages: pre-consultation, mid-consultation, and post-consultation. The dialogue data from the pre-consultation stage is mainly used to collect information, including basic information, main complaints, and problem background information; the dialogue data from the mid-consultation stage is mainly used to intervene in the counseling object using counseling therapy; the dialogue data from the post-consultation stage is mainly used for personalized advice and guidance. Therefore, a large number of high-quality psychological counseling statements can be collected, and the dialogue data from the pre-consultation stage can be extracted and input into the big model so that the big model can learn this dialogue method and have the ability to perform inquiry dialogues. Then, the big model can be used to conduct inquiry dialogues with the counseling object to obtain the dialogue statements generated during the inquiry dialogue process.
[0070] When extracting the first problem description statement of the consulting object from the dialogue data, the big model can also be used for summary extraction. Specifically, a large number of high-quality psychological consultation statements can be collected, and the dialogue data in the early stage of the consultation can be extracted. The dialogue data in the early stage of the consultation can be used as training samples, and the first problem description statement can be manually extracted from the training samples as training labels. The big model is supervised and trained using the training samples and training labels until the big model meets the training requirements and has the ability to extract the first problem description statement from the dialogue data. Alternatively, the training samples and training labels are combined into text pairs, and the text pairs are sent to the big model so that the big model can learn how to extract the first problem description statement from the dialogue data and has the ability to extract the first problem description statement from the dialogue data.
[0071] The extracted dialogue data is input into the above-mentioned large model capable of extracting the first problem description sentence from the dialogue data, and the first problem description sentence output by the large model is obtained.
[0072] It should be noted that, in some embodiments, when conducting an inquiry dialogue with the consulting object, each time a round of dialogue is completed, the consulting object's first question description sentence is extracted from the dialogue data generated by the inquiry dialogue. When the extracted first question description sentence includes at least basic information, the main complaint and the background of the problem, it indicates that the first question description sentence is complete, and the inquiry dialogue with the consulting object can be ended to execute subsequent steps.
[0073] The case database mentioned above stores multiple problem description statements and the corresponding consultation planning schemes for each problem description statement. The consultation planning scheme refers to the scheme to alleviate or solve the psychological problems described in the corresponding problem description statement, including the consultation therapy application stage, the practical suggestions and practice stage. The consultation planning scheme in the consultation therapy application stage corresponds to the middle stage of consultation, including the statements for guiding the consultation object through the application of consultation therapies, such as cognitive behavioral therapy (CBT), humanistic therapy (Humanistic Therapy), dialectical behavior therapy (DBT), etc.; the consultation planning scheme in the practical suggestions and practice stage corresponds to the late stage of consultation, including the statements for providing specific suggestions to the consultation object.
[0074] In a specific embodiment, the consulting object is named Xiao A, and the corresponding consulting planning scheme may include:
[0075] In the application stage of counseling therapy, guide Xiao A to identify negative automatic thinking. Analyze the self-perception bias caused by the breakup. Use logic and cases to make Xiao A understand the irrationality, such as reviewing her own strengths to prove that negative thinking is one-sided. Encourage to replace it with positive thinking to enhance self-worth.
[0076] In the practical suggestions and practice phase, Xiao A was advised to listen to relaxing music to relieve his emotions, do moderate exercise to relieve stress, and write a mood diary to understand himself. He was assisted in making a study and life plan and encouraged to join interest groups to expand his social life. He was reminded to continue to think positively and to contact a counselor at any time if he encountered any problems.
[0077] When building a case database, a large number of high-quality psychological counseling sentences can be collected, including high-quality psychological counseling sentences in online human-computer dialogues or offline human counselor dialogues, and the psychological counseling sentences can be desensitized. Then, the desensitized psychological counseling sentences can be summarized using a large model to generate problem description sentences and consultation planning plans corresponding to each problem description sentence.
[0078] Specifically, a portion of the desensitized psychological counseling sentences can be input into a large model with strong command comprehension ability to obtain the problem description sentence output by the large model and the counseling plan corresponding to the problem description sentence. Then, professionals can construct the instruction data after screening the content output by the large model, and further train the large model's ability to generate problem description sentences and counseling plans to ensure that the generated data meets certain counseling standards. It should be noted that in some embodiments, the large model can be used to extract the first problem description sentence of the counseling object based on the dialogue sentences generated in the inquiry dialogue process of the above embodiments.
[0079] Each generated problem description statement and its corresponding consulting planning solution are stored in the case database as a group of cases in advance.
[0080] A second problem description statement associated with the first problem description statement is retrieved from multiple problem description statements stored in the case database. The second problem description statement is associated with the first problem description statement, which means that the similarity between the second problem description statement and the first problem description statement meets the set requirements, and the first consulting planning scheme corresponding to the first problem description statement can be generated based on the second consulting planning scheme corresponding to the second problem description statement. The above setting requirements can be set according to actual conditions, and this embodiment does not limit them.
[0081] In some embodiments, the second problem description statement associated with the first problem description statement can be retrieved from the multiple problem description statements stored in the case database by calculating the vector similarity. The first problem description statement is converted into a vector, and the multiple problem description statements stored in the case database are also converted into vectors. Then, the similarity between the vector corresponding to the first problem description statement and the vector corresponding to the multiple problem description statements stored in the case database is calculated, and the similarity between the vectors is used as the similarity between the first problem description statement and the multiple problem description statements stored in the case database. One or more of the statements with the highest similarity are selected as the second problem description statement. The specific number can be set according to the actual situation, and this embodiment does not limit it.
[0082] S102: Generate a first consulting planning solution corresponding to the first problem description statement by learning the second problem description statement and the second consulting planning solution corresponding to the second problem description statement.
[0083] After determining the second problem description statement, the second consulting plan corresponding to the second problem description statement can be extracted from the consulting plan solutions stored in the case database, so as to generate the first consulting plan corresponding to the first problem description statement by learning the second problem description statement and the second consulting plan solution.
[0084] The large model can be used to generate a first consulting plan corresponding to the first problem description statement. The second problem description statement and the second consulting plan are input into the large model as examples, so that the large model can learn from the examples and thus have the ability to generate consulting plans based on the problem description statement. The first problem description statement is then input into the large model after the example learning, so that the large model after the example learning generates and outputs the first consulting plan corresponding to the first problem description statement.
[0085] S103: Generate a psychological intervention dialogue with the consulting object according to the first consulting plan.
[0086] In some embodiments, the big model can be used to generate a psychological intervention dialogue to conduct questions and answers with the consulting object. The first consulting plan is a global plan. During the dialogue process, the big model generates and outputs the first round of dialogue according to the first consulting plan, and then generates and outputs subsequent dialogues based on the feedback statements of the consulting object and the first consulting plan until the dialogue ends.
[0087] In order to enable the big model to perform the task of generating a psychological intervention dialogue with the consulting object based on the first consultation plan, it is necessary to construct a large number of first consultation plans and corresponding question and answer data according to the task requirements, and then use the constructed data to fine-tune the big model.
[0088] Some models used for psychological counseling in the prior art tend to choose the best response at the moment in each round of multiple rounds of dialogue due to the lack of unified and overall planning. For example, the consultant mentioned three issues at the same time: the strained relationship with his parents, the lack of recognition at work, and the confusion about future career development. Without planning, the model may conduct some routine communication and guidance on the issue of the relationship with his parents in this round of dialogue, and in the next round, it may be attracted by the topic of the consultant's lack of recognition at work, and give some responses that seem more appropriate at the moment, and then turn to the confusion about career development in the next round. Although each round of such a dialogue process tries to give the best local response, due to the lack of a coherent plan, the dialogue seems to jump between multiple issues and cannot focus deeply on a key issue, which makes it difficult to ensure that the consultant's problems can be effectively solved in the end. The consultant may still be confused about each issue after the communication and has not received substantial help.
[0089] The solution of this embodiment can generate and output dialogues based on the feedback statements of the consulting object and the global first consulting plan. Each dialogue is generated based on the first consulting plan. The dialogue is coherent and can focus on the first problem description statement of the consulting object, so as to truly alleviate the problem of the consulting object.
[0090] In the above embodiment, according to the first problem description statement of the consulting object, the second problem description statement associated with the first problem description statement can be retrieved from multiple problem description statements stored in the case database, and multiple problem description statements and consultation planning schemes corresponding to each problem description statement are stored in the case database. By learning the second problem description statement and the second consultation planning scheme corresponding to the second problem description statement, a first consultation planning scheme corresponding to the first problem description statement is generated, so as to generate a psychological intervention dialogue with the consulting object according to the first consultation planning scheme. In this way, a psychological consultation dialogue can be automatically generated by learning the case associated with the consulting object, and automatic psychological consultation questions and answers can be realized. Even if the user does not interact with a professional psychological counselor, he can still get professional psychological intervention, which can cover a large number of people in need.
[0091] As an optional implementation, another embodiment of the present application discloses that the process of constructing the case database of the above embodiment may specifically include the following steps:
[0092] By analyzing the psychological counseling sentences acquired in advance, problem description sentences with different degrees of perfection and counseling planning schemes corresponding to the problem description sentences with different degrees of perfection are constructed; the problem description sentences with different degrees of perfection and counseling planning schemes corresponding to the problem description sentences with different degrees of perfection are stored as cases in a case database.
[0093] In the embodiment of the present application, based on the same psychological counseling statement obtained in advance, problem description statements with different degrees of perfection and counseling plans corresponding to problem description statements with different degrees of perfection can be constructed. There are fewer differences between the problem description statements constructed in this way. When retrieving a second problem description statement associated with a first problem description statement from multiple problem description statements stored in a case database, it is possible to pay attention to subtle differences and retrieve a second problem description statement that is more closely associated with the first problem description statement, thereby generating a more reasonable first counseling plan.
[0094] More specifically, in some embodiments, problem description statements with different degrees of perfection and consulting planning solutions corresponding to the problem description statements with different degrees of perfection may be constructed through the following steps:
[0095] By analyzing the pre-acquired psychological counseling sentences, the problem description sentences and counseling planning schemes are extracted; the problem description sentences include the basic problem description sentences generated according to the partial content of the inquiry stage of the psychological counseling sentences, and the complete problem description sentences generated according to the complete content of the inquiry stage of the psychological counseling sentences, and the counseling planning scheme is generated according to the complete problem description sentences; the differentiated content between the basic problem description sentences and the complete problem description sentences is determined; the counseling planning scheme is modified according to the differentiated content, and the counseling planning scheme corresponding to the basic problem description sentences is generated.
[0096] The psychological counseling statements may be obtained according to the records in the above-mentioned embodiments, which will not be described in detail here.
[0097] Analyze the obtained psychological counseling sentences and extract the problem description sentences and counseling plan. It should be noted that the psychological counseling sentences themselves have the problem of inconsistent information completeness: some counselors may tend to use long descriptions at the beginning or submit relatively complete problem description sentences in advance, while more counselors will not say too much at the beginning, and will gradually improve the problem description sentences in the counseling dialogue under the guidance of the psychological counselor.
[0098] Therefore, in the process of analyzing psychological counseling statements, it is necessary to identify in-depth counseling scenarios, including the inquiry stage, i.e., the stage characteristics of the above-mentioned pre-consultation, mid-consultation, and late-consultation. The identification characteristics of the dialogue data in the early stage of counseling include: the dialogue in the early stage of counseling is mainly for information collection, including some problem description statements and possible remaining problem description statement supplements, the dialogue data in the middle stage of counseling mainly uses counseling therapy to intervene in the counseling object, and the dialogue data in the late stage of counseling mainly provides personalized advice and guidance. This embodiment gradually updates the problem description statements based on the dialogue data in the early stage of counseling, and establishes a hierarchical case database from basic to complete.
[0099] Specifically, according to the dialogue order of the psychological counseling statement, the part of the inquiry stage of the psychological counseling statement can be identified sentence by sentence or paragraph by paragraph, and a basic problem description statement can be generated based on the partial content of the inquiry stage of the psychological counseling statement currently identified. Then, as the information is supplemented, the generated basic problem description statement becomes richer, until the complete content of the inquiry stage of the psychological counseling statement is identified, and a complete problem description statement is obtained. In the embodiments of the present application, the number of basic problem description statements is not limited, and it can be determined according to actual conditions, and this embodiment does not limit it.
[0100] In a specific embodiment, the consulting object is named Xiao A, and part of the content of the psychological consulting statement inquiry stage includes:
[0101] Consultant: My name is Xiao A, I am 15 years old this year, and I am relatively introverted. I was in a relationship with a boy in the same class before, and we had a good relationship. Not long ago, he broke up with me because his personality was not suitable for me.
[0102] Psychologist: Hearing about your experience, I feel really bad for you. How do you feel now?
[0103] Consultant: I feel very sad and the whole world seems dark. Because of this incident, I can't concentrate in class and my mind wanders all the time. I used to be able to listen to the lectures very attentively, but now I always think about the days when I was with him. My grades have plummeted, and I do very badly on homework and exams. After class, I just stare blankly by myself, feeling very depressed, and often cry secretly. I can't sleep well at night, and his shadow is all in my mind.
[0104] Psychologist: This change must be very painful for you. What was your previous study like?
[0105] Client: I used to have very good grades and always ranked at the top of the class in every exam. The teachers often praised me and my classmates envied me. But now I tend to be distracted in class and have no idea what to do in the future.
[0106] Based on the part of the inquiry phase of the psychological counseling statement, the basic problem description statements determined include:
[0107] Basic information: Xiao A is a 15-year-old girl with an introverted and quiet personality.
[0108] Chief complaint: Currently in a very low mood, distracted in class, unable to concentrate on studying, and with a serious decline in grades. After class, I often stare blankly and cry secretly. I don’t sleep well at night, and my mind is always filled with scenes of my love affair with a boy in the same class. I feel extremely confused about my future studies and life.
[0109] Background of the problem: Xiao A had a young love affair with a boy in the same class in middle school. Not long ago, the boy broke up with her on the grounds that their personalities were not compatible, which hit Xiao A hard.
[0110] In the subsequent dialogue, the consultant further improved the information, including:
[0111] Psychologist: Xiao A, you were so outstanding before, but now you are in trouble because of this incident. It is really not easy. I can understand your confusion and helplessness now. Have you ever thought about what you can do to change your current situation?
[0112] Consultant: I don’t know either. I have tried many methods, but nothing works.
[0113] Psychologist: Let's analyze your situation together. Can you tell me how this problem has developed from the beginning to now? Are there any factors that make the problem worse or alleviate it?
[0114] Client: When he broke up with me at first, I just felt sad, but then I found myself always distracted in class, and my grades dropped, so I became more and more sad. There was no easing factor, and I felt the situation was getting worse.
[0115] Psychologist: What methods did you use to deal with this problem? What was the effect?
[0116] Client: I have tried exercising, listening to music, and talking to friends, but nothing works. I still can't stop thinking about him and can't concentrate in class.
[0117] Psychologist: OK, I understand. Have you ever had a similar situation before?
[0118] Client: No, this is the first time I have encountered such a sad thing. I have never had any psychological problems before.
[0119] Based on the supplementary content, the complete problem description statement includes:
[0120] Basic information: Xiao A is a 15-year-old girl with an introverted and quiet personality.
[0121] Chief complaint: Currently in a very low mood, distracted in class, unable to concentrate on studying, and with a serious decline in grades. After class, I often stare blankly and cry secretly. I don’t sleep well at night, and my mind is always filled with scenes of my love affair with a boy in the same class. I feel extremely confused about my future studies and life.
[0122] Background of the problem: Xiao A had a young love affair with a boy in the same class in middle school. Not long ago, the boy broke up with her on the grounds that their personalities were not compatible, which hit Xiao A hard.
[0123] Development of the problem: Xiao A began to feel sad when the boy proposed to break up, and her emotions gradually worsened. She became more and more distracted in class, causing her grades to continue to decline. Currently, there is no factor that can alleviate this situation.
[0124] Coping methods: Xiao A has tried to relieve her emotions by doing exercise, listening to music, and chatting with friends, but the effects are not obvious. She still can't help thinking about boys and has difficulty concentrating in class.
[0125] Previous psychological problems: Xiao A had no history of other psychological problems before this.
[0126] The counseling plan is extracted from the mid-consultation and late-consultation statements. It should be noted here that the counseling plan is a psychological intervention plan implemented on the counseling object, which is determined by the counselor based on the complete dialogue in the inquiry stage, that is, the counseling plan is generated based on the complete problem description statement.
[0127] For example, in the psychological consultation sentences, the dialogue between the middle and end of the consultation includes:
[0128] Psychologist: Xiao A, in fact, many people will have similar feelings as you when they experience a breakup. We can now try to use some methods to help you get out of this dilemma. You know, sometimes some of our thoughts may be inaccurate. For example, you feel that you have no value because of a breakup. This is actually a negative automatic thought.
[0129] Consultant: Negative automatic thoughts? What do you mean?
[0130] Psychologist: These are some unreasonable thoughts that come to us inadvertently. For example, you feel that you are worthless, which is because the breakup has caused you to have a self-perception bias. But in fact, you have many advantages, such as your good academic performance, which shows that you are smart and hardworking.
[0131] Consultant: But my grades are not good now.
[0132] Psychologist: Don't worry, this is only temporary. We can replace negative thoughts with positive ones. For example, you can tell yourself "this breakup has made me grow up."
[0133] Consultant: I don’t understand where I have grown.
[0134] Psychologist: You can learn from this experience how to better deal with emotional problems and understand your needs better. We can also develop a plan to strengthen positive thinking. For example, after getting up every morning, tell yourself something positive in the mirror.
[0135] Client: Oh, I’ll try it.
[0136] Psychologist: In addition, I also recommend that you try some relaxation techniques such as yoga and meditation, which can help you relieve your emotions. You can also use online resources, such as listening to some relaxing music. Also, it is important to write a mood diary. I can provide you with some templates.
[0137] Consultant: OK. Then I still want to solve the problem of learning status first.
[0138] Psychologist: Then we can also make a study plan together. Set some specific goals, such as how many points you want to improve each week, and then make a schedule to arrange your study time reasonably. At the same time, you can also try more study methods to improve your study efficiency.
[0139] Consultant: OK, I feel like I have a direction.
[0140] Psychologist: Yes, Xiao A. You can also join some interest groups and other activities to expand your social circle, enrich your life experience, and enhance your sense of value. Remember to continue to use positive thinking. If you encounter any problems, feel free to contact me.
[0141] The counseling planning solutions extracted from the mid-consultation and post-consultation dialogues of the above counseling statements include:
[0142] In the application stage of counseling therapy, guide Xiao A to identify negative automatic thoughts, such as "I am worthless". Analyze the reasons for these thoughts, which may be caused by the blow of breaking up and leading to self-perception bias. Use logical analysis and cases to let Xiao A understand its irrationality, such as reviewing her own advantages to prove the one-sidedness of "I am a loser". Encourage Xiao A to replace it with positive thinking, such as "breaking up makes me grow up", and formulate a plan to strengthen positive thinking. Let Xiao A realize that breaking up does not mean that she is bad, and enhance her self-worth.
[0143] In the practical advice and practice phase, Xiao A was advised to try relaxation techniques such as yoga and meditation, and to use online resources. The importance of writing a mood diary was emphasized, and a template was provided. Xiao A was asked to develop a study plan, set goals, timetables, and methods. Xiao A was asked to plan his life, participate in interest groups and other activities to expand his social circle, enrich his experience, and enhance his sense of value. Xiao A was reminded to continue to use positive thinking and to contact a counselor at any time if he encountered any problems.
[0144] What is certain is that the complete problem description statement and the consulting plan must match, but the basic problem description statement and the consulting plan do not necessarily match. This is because in the process of improving the problem description statement, the consulting object may propose some new content or correct the previous content. Therefore, the consulting plan can adapt to the complete problem description statement, but cannot adapt to the basic problem description statement before the consulting object proposes some new content or corrects the previous content.
[0145] Therefore, the error correction capability of the big model can be used to rewrite the consulting plan according to the differentiated content between the basic problem description statement and the complete problem description statement, so as to obtain the consulting plan corresponding to each basic problem description statement, and then enable the consulting plan corresponding to each basic problem description statement to pay attention to the above-mentioned differentiated content, which means that the big model is required to do subtraction.
[0146] For example, in a specific embodiment, the consulting object is named Xiao A, and the consulting plan corresponding to the complete problem description statement is:
[0147] In the application stage of counseling therapy, guide Xiao A to identify negative automatic thoughts, such as "I am worthless". Analyze the reasons for these thoughts, which may be caused by the blow of breaking up and leading to self-perception bias. Use logical analysis and cases to let Xiao A understand its irrationality, such as reviewing her own advantages to prove the one-sidedness of "I am a loser". Encourage Xiao A to replace it with positive thinking, such as "breaking up makes me grow up", and formulate a plan to strengthen positive thinking. Let Xiao A realize that breaking up does not mean that she is bad, and enhance her self-worth.
[0148] In the practical advice and practice phase, Xiao A was advised to try relaxation techniques such as yoga and meditation, and to use online resources. The importance of writing a mood diary was emphasized, and a template was provided. Xiao A was asked to develop a study plan, set goals, timetables, and methods. Xiao A was asked to plan his life, participate in interest groups and other activities to expand his social circle, enrich his experience, and enhance his sense of value. Xiao A was reminded to continue to use positive thinking and to contact a counselor at any time if he encountered any problems.
[0149] If, during the process of improving the problem description, the client mentioned that "I have tried to relieve my emotions by doing exercise, listening to music, and chatting with friends, but the effects were not obvious.", and this sentence is a differentiated description between the basic problem description and the complete problem description, then based on this sentence, the corresponding part of the consultation plan corresponding to the complete problem description can be modified to music and exercise suggestions, for example:
[0150] In the application stage of counseling therapy, guide Xiao A to identify negative automatic thoughts, such as "I am worthless". Analyze the reasons for these thoughts, which may be caused by the blow of breaking up and leading to self-perception bias. Use logical analysis and cases to let Xiao A understand its irrationality, such as reviewing her own advantages to prove the one-sidedness of "I am a loser". Encourage Xiao A to replace it with positive thinking, such as "breaking up makes me grow up", and formulate a plan to strengthen positive thinking. Let Xiao A realize that breaking up does not mean that she is bad, and enhance her self-worth.
[0151] In the practical advice and practice phase, we suggest that Xiao A listen to relaxing music, exercise, and write a mood diary. We encourage her to make study and life plans and join interest groups. We remind Xiao A to continue to use positive thinking and contact a counselor at any time when she encounters problems.
[0152] In this way, the complete problem description statement and its corresponding consulting planning solution, each basic problem description statement and the consulting planning solution corresponding to each basic problem description statement can all be stored as cases in the case database.
[0153] In the above embodiment, the consulting plan can be modified according to the differentiated content to generate a consulting plan corresponding to the basic problem description statement, thereby increasing the cases in the case database and establishing a hierarchical case database from basic to complete.
[0154] In some other embodiments, problem description statements with different degrees of perfection and consulting planning solutions corresponding to problem description statements with different degrees of perfection may be constructed through the following steps:
[0155] By analyzing the pre-acquired psychological counseling sentences, the problem description sentences and counseling planning schemes are extracted; the problem description sentences are expanded to obtain expanded problem description sentences; the counseling planning scheme is modified according to the expanded content in the expansion process to obtain the counseling planning scheme corresponding to the expanded problem description sentences.
[0156] In addition to establishing a hierarchical case database from basic to complete according to the steps of the above embodiment, the pre-acquired psychological counseling statements can also be analyzed according to the records of the above embodiment to extract the problem description statements and counseling planning schemes. It should be noted that the problem description statement in this embodiment refers to the problem description statement used to generate a counseling planning scheme.
[0157] Then the big model can be required to expand the problem description statement to obtain an expanded problem description statement, and then modify the consulting plan based on the expanded content to obtain the consulting plan corresponding to the expanded problem description statement, that is, the big model is required to do addition.
[0158] In this way, the problem description statement and its corresponding consulting plan, the expanded problem description statement and its corresponding consulting plan can be stored as cases in the case database.
[0159] In the above embodiment, the problem description statement can be expanded to generate and expand the problem description statement and its corresponding consulting planning solution, thereby increasing the cases in the case database and establishing a hierarchical case database from basic to complete.
[0160] In other embodiments, for psychological counseling statements that include a complete problem description statement, the pre-acquired psychological counseling statements can be analyzed according to the records of the above embodiments, and the basic problem description statement and the complete problem description statement can be extracted therefrom, and then the differential content between the basic problem description statement and the complete problem description statement can be determined, and the counseling plan can be modified according to the differential content to generate a counseling plan corresponding to the basic problem description statement. For psychological counseling statements that do not include a complete problem description statement, the pre-acquired psychological counseling statements can be analyzed according to the records of the above embodiments, and the problem description statement can be expanded to obtain an expanded problem description statement, and the counseling plan can be modified according to the expanded content during the expansion process to obtain a counseling plan corresponding to the expanded problem description statement.
[0161] As an optional implementation, another embodiment of the present application discloses that the steps of the above embodiment retrieve a second problem description statement associated with the first problem description statement from multiple problem description statements stored in the case database, which may specifically include the following steps:
[0162] The sentence similarity between a plurality of problem description sentences stored in the case database and the first problem description sentence is calculated; the sentence similarity includes the first similarity and / or the second similarity; and according to the sentence similarity, a second problem description sentence associated with the first problem description sentence is determined.
[0163] The first similarity is determined based on the similarity between the multiple problem description statements stored in the case database and the first problem description statement in each problem dimension. In some embodiments, each problem dimension includes the basic information of the consulting object, the main complaint, the problem background, the problem development process, the coping style, the previous psychological problems, the history of physical diseases and the family history.
[0164] It should be noted that, in this embodiment, when the extracted first problem description statement includes at least basic information, main complaint and problem background, it means that the first problem description statement is complete and the inquiry dialogue with the consulting object can be ended. Therefore, the first problem description statement may include at least one of the problem development process, coping methods, previous psychological problems, physical disease history and family history, as well as basic information, main complaint, problem background, or only include the basic information, main complaint and problem background of the consulting object. Therefore, for the problem dimension not included in the first problem description statement, the similarity of the problem dimension is empty.
[0165] In each of the above-mentioned problem dimensions, the similarity between the multiple problem description statements stored in the case database and the first problem description statement is calculated. For example, if the similarity between the multiple problem description statements stored in the case database and the first problem description statement is calculated in the basic information problem dimension, the similarity between the basic information of the multiple problem description statements stored in the case database and the basic information of the first problem description statement is calculated; if the similarity between the multiple problem description statements stored in the case database and the first problem description statement is calculated in the main complaint problem dimension, the similarity between the main complaint of the multiple problem description statements stored in the case database and the main complaint of the first problem description statement is calculated.
[0166] The similarities between the multiple problem description statements stored in the case database and the first problem description statement in each problem dimension are weighted, and the weighted similarities between the multiple problem description statements stored in the case database and the first problem description statement in each problem dimension are obtained as the first similarity. It should be noted that the weight value during weighted processing can be adjusted according to actual conditions, and this embodiment does not limit it. In some embodiments, the weight value can be averaged during weighted processing. For example, if the number of problem dimensions is X, then the weight corresponding to the similarity in each problem dimension is 1 / X.
[0167] It should also be noted that the similarity refers to vector similarity, and vector retrieval can be performed using tools such as Faiss (Facebook AI Similarity Search) and Milvus, which is not limited in this embodiment. In some embodiments, a representation model of similar cases is completed using a text-based contrastive learning method. The representation model of similar cases uses a basic model, which is a BERT model (Bidirectional Encoder Representations from Transformers) or a subsequent upgraded and improved model of the BERT model. Since the problem description statement has been summarized in different problem dimensions, a comparison loss is constructed separately for each problem dimension to train the vector representation ability of the representation model of the similar case, thereby improving the ability of the representation model of the similar case to identify details.
[0168] Specifically, the name of the corresponding problem dimension is used as a prefix to represent the representation model of similar cases. For example, the following data are positive samples and negative samples based on the basic information dimension:
[0169] Positive sample: Basic information [sep] Xiao A is a 15-year-old girl with an introverted and quiet personality. [sep] Xiao B is a junior high school girl who is relatively introverted.
[0170] Negative samples: Basic information [sep] Xiao A is a 15-year-old girl with an introverted and quiet personality. [sep] Xiao C is a junior high school girl who is more extroverted.
[0171] By enhancing the ability of the representation model of the similar case to identify details, each problem description statement is converted into a vector representation based on the representation model of the similar case, and the obtained vector representation is more accurate.
[0172] After each problem description statement is converted into a vector representation, vector retrieval can be performed using tools such as Faiss and Milvus to obtain the above-mentioned first similarity.
[0173] The second similarity is determined by the types and quantities of problem dimensions contained in the multiple problem description statements stored in the case database and the first problem description statement. Specifically, the jaccard similarity can be calculated as the second similarity according to the problem dimension coverage. Specifically, if the problem dimension set contained in the first problem description statement is A, and the problem dimension set contained in any of the multiple problem description statements stored in the case database is B, the jaccard similarity of the two includes:
[0174] J(A,B)=|A∩B| / |A∪B
[0175] The first similarity or the second similarity can be used as the sentence similarity between multiple problem description statements stored in the case database and the first problem description statement, and one or more problem description statements with the highest sentence similarity to the first problem description statement are extracted from the multiple problem description statements stored in the case database as the second problem description statement associated with the first problem description statement.
[0176] In some other embodiments, the sentence similarity is determined based on the first similarity and the second similarity. Specifically, in each of the above-mentioned problem dimensions, after calculating the similarity between the multiple problem description sentences stored in the case database and the first problem description sentence, for each problem dimension, K problem description sentences with the highest similarity are extracted from the multiple problem description sentences stored in the case database as target problem description sentences, where K is a positive integer.
[0177] The similarity between the target problem description statement and the first problem description statement in each problem dimension is weighted, and the weighted similarity between the target problem description statement and the first problem description statement in each problem dimension is obtained as the first similarity. The target problem description statements are sorted in descending order according to the first similarity to obtain a target sequence. It should be noted that the weight value when calculating the weighted similarity can be 1, or adjusted according to the actual situation, which is not limited in this embodiment.
[0178] Then, according to the records of the above embodiment, the second similarity between each target problem description statement and the first problem description statement is calculated, and the order of the target sequence is adjusted according to the second similarity. For example, if it is determined according to the second similarity that the order of two target problem description statements is A first and B second, but B is first and A is second in the target sequence, then the order of A and B in the target sequence needs to be adjusted; for another example, if it is determined according to the second similarity that the order of two target problem description statements is A first and B second, and A is first and B is second in the target sequence, then the order of A and B in the target sequence does not need to be adjusted.
[0179] After the target sequence is adjusted in this way, one or more target problem description sentences at the front of the target sequence are extracted as second problem description sentences associated with the first problem description sentence. The number can be set according to actual conditions and is not limited in this embodiment.
[0180] In a specific embodiment, the consulting object is named Xiao B, and the first problem description statement includes:
[0181] Basic information: Xiao B is a 14-year-old girl with a lively and cheerful personality.
[0182] The client complained that after the boy suddenly proposed to break up, her smile disappeared and she became silent. She felt sad when she saw the places they had been together, her motivation to study decreased, and she began to doubt her own value.
[0183] Background of the problem: Xiao B was in love with a boy from the next class. Later, the boy broke up with her on the grounds that he wanted to focus on his studies, which caused a huge change in Xiao B's psychological state.
[0184] The retrieved second problem description sentences include:
[0185] Basic information: Xiao A is a 15-year-old girl with an introverted and quiet personality.
[0186] The client complained that he was in a very low mood, was distracted in class, could not concentrate on studying, and his grades had dropped significantly. He often sat in a daze and cried secretly after class, had poor sleep at night, and kept thinking about the scenes of his love affair with a boy in the same class. He felt extremely confused about his future studies and life.
[0187] Background of the problem: Xiao A had a young love affair with a boy in the same class in middle school. Not long ago, the boy broke up with her on the grounds that their personalities were not compatible, which hit Xiao A hard.
[0188] The consulting solution plan corresponding to the second problem description statement includes:
[0189] In the application stage of counseling therapy, guide Xiao A to identify negative automatic thoughts, such as "I am worthless". Analyze the reasons for these thoughts, which may be caused by the blow of breaking up and leading to self-perception bias. Use logical analysis and cases to let Xiao A understand its irrationality, such as reviewing her own advantages to prove the one-sidedness of "I am a loser". Encourage Xiao A to replace it with positive thinking, such as "breaking up makes me grow up", and formulate a plan to strengthen positive thinking. Let Xiao A realize that breaking up does not mean that she is bad, and enhance her self-worth.
[0190] In the practical advice and practice phase, we suggest that Xiao A listen to relaxing music, exercise, and write a mood diary. We encourage her to make study and life plans and join interest groups. We remind Xiao A to continue to use positive thinking and contact a counselor at any time when she encounters problems.
[0191] In the above embodiment, based on the first similarity and / or the second similarity, the second problem description statement determined to be associated with the first problem description statement can be retrieved from the multiple problem description statements stored in the case database.
[0192] As an optional implementation, another embodiment of the present application discloses that the steps of the above embodiment, by learning the second problem description statement and the second consultation planning scheme corresponding to the second problem description statement, generate the first consultation planning scheme corresponding to the first problem description statement, which may specifically include the following steps:
[0193] The second problem description sentence is used as a sample and the second consultation plan corresponding to the second problem description sentence is used as a label to perform few-sample learning on the psychological counseling model; the first problem description sentence is input into the learned psychological counseling model so that the learned psychological counseling model generates a first consultation plan corresponding to the first problem description sentence.
[0194] After determining the second problem description statement, the second consultation plan corresponding to the second problem description statement can be extracted from the consultation plan stored in the case database. So that the psychological counseling model can be subjected to few-shot learning (FSL) by the second problem description statement and the second consultation plan, wherein few-shot learning refers to a learning paradigm in which a machine learning model can quickly adapt to new tasks when there is only a small amount of labeled data. This learning method is intended to imitate human learning ability, and only a few examples are needed to identify new concepts or complete tasks that have never been seen. The first problem description statement is then input into the psychological counseling model that has been learned to generate the first consultation plan corresponding to the first problem description statement. A large model can be used as a basic model for few-shot learning to obtain a psychological counseling model, which is not limited in this embodiment.
[0195] This setting can utilize the high-quality consultation planning solutions in the case database to teach the big model to follow the standards of human psychological counselors for better consultation planning.
[0196] As an optional implementation, another embodiment of the present application discloses that the method of the above embodiment may further include the following steps:
[0197] Obtaining feedback from the consulting party; the feedback information includes the consulting party's feedback on the psychological intervention dialogue; and determining the adjustment plan for the first consulting plan based on the feedback information.
[0198] The feedback information refers to the statements fed back by the consulting object according to the output psychological intervention dialogue. During the dialogue process, this embodiment generates and outputs the first round of dialogue according to the first consultation planning scheme, and then generates and outputs subsequent dialogues based on the feedback information of the consulting object and the first consultation planning scheme until the dialogue ends.
[0199] More specifically, the feedback information of the consulting object is sent to the psychological counseling model of the above embodiment. The psychological counseling model generates and outputs a subsequent dialogue based on the feedback information of the consulting object and the first counseling plan until the dialogue ends.
[0200] In this embodiment, a psychological intervention dialogue can be generated and output based on the feedback information of the consulting object and the global first consulting plan. Each round of psychological intervention dialogue is generated based on the global first consulting plan, so that the psychological intervention dialogue can focus on the first problem description statement of the consulting object. The psychological intervention dialogue is coherent so as to alleviate the problems of the consulting object.
[0201] As an optional implementation, another embodiment of the present application discloses that the above embodiment, according to the feedback information, determines the adjustment scheme for the first consulting planning scheme, and further includes the following steps:
[0202] If the feedback information from the consulting object includes negative feedback, then determining the adjustment plan of the first consulting planning method includes regenerating the first problem description statement and redetermining the first consulting planning plan based on the regenerated first problem description statement; negative feedback includes that the feedback from the consulting object exceeds the scope of the first consulting planning plan, and / or the consulting object does not accept the logic of the first consulting planning plan.
[0203] Specifically, if the feedback information from the consulting subject includes positive feedback, that is, the consulting subject responds to the psychological intervention dialogue according to the logic of the first consulting plan, there is no need to adjust the first consulting plan.
[0204] If the feedback information from the consultant includes negative feedback, that is, the consultant does not respond to the psychological intervention dialogue according to the logic of the first consultation plan, then it means that the psychological state targeted by the current first consultation plan may not be consistent with the actual psychological state of the consultant, and it is necessary to regenerate the first problem description statement, redetermine the first consultation plan based on the regenerated first problem description statement, and regenerate the psychological intervention dialogue with the consultant according to the steps of the above-mentioned embodiment until the feedback information from the consultant is all positive feedback.
[0205] With such an arrangement, the first consulting planning scheme can be adjusted according to the feedback from the consulting object, so that the first consulting planning scheme is more in line with the actual situation of the consulting object.
[0206] This step can be implemented through the above-mentioned psychological counseling model, specifically:
[0207] The psychological counseling model is implemented based on the ReAct (thought-action-observation) method. The thought (planning) part is mainly responsible for the next decision, the action (execution) part generates the psychological counselor's response, and then obtains the feedback information of the counseling object through get_user_answer (calling API), and then observes whether there is any deviation from the first counseling plan through the observation (reflection) part:
[0208] In each round of observation, the consistency with the first consulting plan is observed, that is, whether the feedback information of the consulting object is positive or negative. If the feedback information of the consulting object meets the first consulting plan, it means that the feedback information of the consulting object is positive feedback. If the feedback information of the consulting object conflicts with the first consulting plan or does not belong to the first consulting plan, it means that the feedback information of the consulting object is negative feedback.
[0209] The feedback information of the consultant is negative feedback, which may be due to the fact that the information of the consultant does not meet the preset requirements, or the response of the psychological counselor generated by the psychological counseling model is not completely carried out according to the plan. In some embodiments, when it is judged that the feedback information of the consultant is inconsistent with the first consultation plan, "conflict with the first consultation plan" is output; when it is judged that the feedback information of the consultant exceeds the scope of the first consultation plan, "does not belong to the first consultation plan" is output. When there is one "conflict with the first consultation plan" or N "does not belong to the first consultation plan", it is determined that the feedback information of the consultant is negative feedback, and it is necessary to regenerate the first problem description statement, re-determine the first consultation plan based on the regenerated first problem description statement, and regenerate the psychological intervention dialogue with the consultant according to the steps of the above embodiment, start a new ReAct process, and continue until the consultation ends. The above N is a positive integer, and the value of N can be set according to actual conditions, which is not limited in this embodiment.
[0210] In a specific embodiment, the psychological counseling object is named Xiao B. The following is a specific example of "conflict with the first counseling plan":
[0211] First round
[0212] Thought: Start guiding the identification of negative thoughts.
[0213] Act ion: [Psychologist] Xiao B, after the breakup, do you have any bad thoughts that often come up? For example, how do you feel about yourself?
[0214] Get_user_answer:
Consultant
[0215] Observation: [Satisfies the consultation plan] Analysis: Xiao B’s answer clearly reflects negative automatic thinking, which is consistent with the steps in the first consultation plan to guide the identification of negative automatic thinking. The next step can be carried out as planned.
[0216] Round 2
[0217] Thought: Analyze the causes of negative thinking.
[0218] Act ion: [Psychological counselor] Xiao B, why do you feel that no one loves you?
[0219] Get_user_answer:
Consultant
[0220] Observation: [Satisfies the consultation plan] Analysis: Xiao B’s answer clearly points out that the cause of negative thinking is related to the breakup, which meets the requirements of the plan to analyze the causes of negative thinking and provides direction for further guidance.
[0221] Round 3
[0222] Thought: Use logic to analyze irrationality.
[0223] Action: [Psychologist] Xiao B, in fact, many people will have such thoughts after breaking up, but this is not necessarily correct. You see, before you fell in love, there were many people who liked you and cared about you, such as your family and friends. This shows that your value is not determined by this relationship.
[0224] Get_user_answer: [Consultant] But I think their liking is different from the liking in love, and I still feel like no one loves me.
[0225] Observation: [Conflict with the first consultation plan] Analysis: Little B did not accept the counselor’s logical analysis and still insisted on his negative thinking. This shows that the current guidance has not achieved the purpose of making Little B realize the irrationality of negative thinking, which conflicts with the consultation plan. The strategy needs to be adjusted to better guide Little B to change his thinking.
[0226] The following example is an updated first consultation plan:
[0227] In the application stage of counseling therapy, guide Xiao B to elaborate on the specific manifestations of "I have no one to love me" and analyze the mechanism of occurrence. Discuss the impact of breaking up on self-cognition and think about the changes before and after. Introduce other people's evaluations and cases to prove that negative thinking is one-sided. Encourage the creation of positive thinking and formulate reinforcement plans, such as setting reminders and self-reflection. Let Xiao B realize that breaking up does not mean bad things and enhance his self-worth.
[0228] In the practical advice and practice phase, we recommend relaxing music based on Xiao B's interests, develop exercise plans, and emphasize diary writing skills. We assist in developing study and life plans and join groups based on interests. We remind him to continue to use positive thinking and contact a counselor if he encounters problems.
[0229] The following example is a ReAct process generated by the updated first consulting planning solution:
[0230] First round
[0231] Thought: Start strengthening negative automatic thought identification.
[0232] Act ion: [Psychological counselor] Xiao B, can you tell me specifically when you felt that no one loved you?
[0233] Get_user_answer: [Consulting object] When you see a place you went to together before, or when you see other couples.
[0234] Observation: [Satisfies the consultation plan] Analysis: Xiao B’s answer clarified the specific situation that triggered negative thinking and provided direction for further analysis.
[0235] Round 2
[0236] Thought: In-depth analysis of self-cognitive bias.
[0237] Act ion: [Psychologist] Xiao B, do you think that the breakup has made you have a negative impression on other aspects of yourself?
[0238] Get_user_answer: [Consultant] I think I may not be good at getting along with others, otherwise he would not break up with me.
[0239] Observation: [Satisfies the consultation plan] Analysis: Xiao B began to think about the impact of the breakup on other aspects of himself, which meets the planning requirements.
[0240] Round 3
[0241] Thought: Arguing irrationality from multiple angles.
[0242] Action: [Psychologist] Xiao B, in fact, many people will have such thoughts after breaking up, but this is not necessarily correct. Your family and friends like you very much, and they think you are good at getting along with others. Moreover, there may be many reasons for breaking up, and it may not be your problem.
[0243] Get_user_answer:
Inquiry object
[0244] Observation: [Meets the consultation plan] Analysis: Although Xiao B has given some thought to the consultant’s words, he has not yet fully accepted them and needs further guidance.
[0245] Round 4
[0246] Thought: Continue to argue the irrationality.
[0247] Act ion: [Psychological counselor] Xiao B, let's think about some specific examples. For example, when you play with your friends, are you very happy and do they like you very much?
[0248] Get_user_answer: [Consultant] Well, I am very happy when I am with my friends.
[0249] Observation: [Satisfies the consultation plan] Analysis: Little B began to recall the positive experiences with friends and prepare for positive thinking substitution.
[0250] Fifth round
[0251] Thought: Positive thinking replacement and reinforcement.
[0252] Act ion: [Psychologist] Xiao B, since you are very happy with your friends, it means you are very good at getting along with others. We can think of it this way, breaking up is just an experience, it gives you the opportunity to meet more people and open up new friendships and possibilities.
[0253] Get_user_answer:
Consulting object
[0254] Observation: [Meets the consultation plan] Analysis: Little B has a certain recognition of positive thinking, but it needs further consolidation.
[0255] Round 6
[0256] Thought: Consolidate positive thinking.
[0257] Act ion: [Psychological counselor] Xiao B, we can make a small plan, such as recalling a happy thing with friends every day, or writing down one of your own strengths. This can help you strengthen your positive thinking.
[0258] Get_user_answer: [Consultant] OK, I'll try. ”
[0259] Observation: [Meets the consultation plan] Analysis: Xiao B agreed to formulate an enhanced plan and enter the preparation stage for the later stage of consultation.
[0260] Round 7
[0261] Thought: In the later stages of consultation, provide personalized emotion regulation advice.
[0262] Act ion: [Psychological counselor] Xiao B, let's think about how to better regulate our emotions. What kind of music do you like to listen to?
[0263] Get_user_answer: [Consultant] I like lighter music.
[0264] Observation: [Satisfy the consultation plan] Analysis: Start providing emotion regulation suggestions based on Xiao B’s preferences.
[0265] Round 8
[0266] Thought: Recommend specific relaxation music and emphasize the effects.
[0267] Act ion: [Psychological counselor] Xiao B, a light and inspiring song like "The Sun Always Comes After the Rain" is very suitable for you to listen to. When you feel sad, listening to it can help you relieve your emotions and remind yourself that the future will be better.
[0268] Get_user_answer:
Consultant
[0269] Observation: [Satisfies the consultation plan] Analysis: Xiao B accepted the advice and indicated that his condition had improved and he was inclined to end the consultation.
[0270] Round 9
[0271] Thought: Entering the closing phase, give encouragement and blessings.
[0272] Action: [Psychological counselor] I am glad to see your transformation. I believe you will become better and better in the future. Be brave to embrace a better life. If you need anything, please feel free to contact me.
[0273] Through the ReAct strategy, a step-by-step plan and reflection is generated based on the first consultation plan. When the feedback from the consultant is negative, a new round of process is initiated, so the plan has the ability to be automatically updated.
[0274] In a specific embodiment, Figure 3 As shown, the question-and-answer method based on psychological counseling includes the following steps:
[0275] Conduct inquiry dialogues with the consulting subjects;
[0276] Based on the dialogue sentences generated during the inquiry dialogue, extract the first question description sentence of the consulting object. When the extracted first question description sentence at least includes basic information, main complaint and problem background, it means that the first question description sentence is complete;
[0277] According to the first problem description statement of the consulting object, a second problem description statement associated with the first problem description statement is retrieved from a plurality of problem description statements stored in the case database;
[0278] Determine a second consulting planning solution corresponding to the second problem description statement;
[0279] The second problem description sentence is used as a sample and the second consultation plan corresponding to the second problem description sentence is used as a label to perform few-sample learning on the psychological consultation model;
[0280] Inputting the first problem description sentence into the learned psychological counseling model so that the learned psychological counseling model generates a first counseling planning scheme corresponding to the first problem description sentence;
[0281] Generate a psychological intervention dialogue with the counselor based on the first counseling planning scheme and conduct a ReAct cycle;
[0282] Determine whether the feedback from the consulting object is negative feedback;
[0283] If the feedback information from the consulting object is negative feedback, the first question description sentence of the consulting object is re-extracted; if the feedback information from the consulting object is not negative feedback, the ReAct cycle is continued until the consultation is completed.
[0284] Corresponding to the above-mentioned question-answering method based on psychological consultation, the embodiment of the present application also discloses a question-answering device based on psychological consultation, see Figure 4 As shown, the device comprises:
[0285] The retrieval module 100 is used to retrieve a second problem description statement associated with the first problem description statement from a plurality of problem description statements stored in a case database according to the first problem description statement of the consulting object; the case database stores a plurality of problem description statements and consulting planning schemes corresponding to each problem description statement;
[0286] The generation module 110 is used to generate a first consultation plan corresponding to the first problem description statement by learning the second problem description statement and the second consultation plan corresponding to the second problem description statement; and generate a psychological intervention dialogue with the consultation object according to the first consultation plan.
[0287] As an optional implementation, another embodiment of the present application discloses that the device in the above embodiment may further include:
[0288] The extraction module is used to conduct an inquiry dialogue with the consulting object and extract the first question description sentence of the consulting object based on the dialogue sentences generated during the inquiry dialogue.
[0289] As an optional implementation, another embodiment of the present application discloses that the device in the above embodiment may further include:
[0290] A construction module is used to analyze pre-acquired psychological counseling statements to construct problem description statements with different degrees of perfection, as well as counseling planning schemes corresponding to the problem description statements with different degrees of perfection; and store the problem description statements with different degrees of perfection, as well as counseling planning schemes corresponding to the problem description statements with different degrees of perfection, as cases in a case database.
[0291] As an optional implementation, another embodiment of the present application discloses that the building blocks of the above embodiment are specifically used for:
[0292] By analyzing the pre-acquired psychological counseling sentences, the problem description sentences and counseling planning schemes are extracted; the problem description sentences include the basic problem description sentences generated according to the partial content of the inquiry stage of the psychological counseling sentences, and the complete problem description sentences generated according to the complete content of the inquiry stage of the psychological counseling sentences, and the counseling planning scheme is generated according to the complete problem description sentences; the differentiated content between the basic problem description sentences and the complete problem description sentences is determined; the counseling planning scheme is modified according to the differentiated content, and the counseling planning scheme corresponding to the basic problem description sentences is generated.
[0293] As an optional implementation, another embodiment of the present application discloses that the building blocks of the above embodiment are specifically used for:
[0294] By analyzing the pre-acquired psychological counseling sentences, the problem description sentences and counseling planning schemes are extracted; the problem description sentences are expanded to obtain expanded problem description sentences; the counseling planning scheme is modified according to the expanded content in the expansion process to obtain the counseling planning scheme corresponding to the expanded problem description sentences.
[0295] As an optional implementation, another embodiment of the present application discloses that the search module 100 in the above embodiment is specifically used for:
[0296] Calculate sentence similarity between multiple problem description sentences stored in the case database and the first problem description sentence; the sentence similarity includes a first similarity and / or a second similarity, the first similarity is determined based on the similarity between the multiple problem description sentences stored in the case database and the first problem description sentence in each problem dimension; the second similarity is determined based on the type and quantity of problem dimensions included in the multiple problem description sentences stored in the case database and the first problem description sentence; determine a second problem description sentence associated with the first problem description sentence based on the sentence similarity.
[0297] As an optional implementation, another embodiment of the present application discloses that the generation module 110 in the above embodiment is specifically used for:
[0298] The second problem description sentence is used as a sample and the second consultation plan corresponding to the second problem description sentence is used as a label to perform few-sample learning on the psychological counseling model; the first problem description sentence is input into the learned psychological counseling model so that the learned psychological counseling model generates a first consultation plan corresponding to the first problem description sentence.
[0299] As an optional implementation, another embodiment of the present application discloses that the device in the above embodiment may further include:
[0300] The adjustment module is used to obtain feedback information from the consulting object; the feedback information includes the consulting object's feedback on the psychological intervention dialogue, and based on the feedback information, determine the adjustment plan for the first consulting plan.
[0301] As an optional implementation, another embodiment of the present application discloses that the adjustment module in the above embodiment is specifically used for:
[0302] If the feedback information from the consulting object includes negative feedback, then determining the adjustment plan of the first consulting planning method includes regenerating the first problem description statement and redetermining the first consulting planning plan based on the regenerated first problem description statement; negative feedback includes that the feedback from the consulting object exceeds the scope of the first consulting planning plan, and / or the consulting object does not accept the logic of the first consulting planning plan.
[0303] Specifically, the device provided in this embodiment belongs to the same application concept as the method provided in the above embodiment of this application, can execute the method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of the execution method. For the technical details not fully described in this embodiment, please refer to the specific processing content of the method provided in the above embodiment of this application, which will not be repeated here.
[0304] The functions implemented by the above modules can be implemented by the same or different processors respectively, and the embodiments of the present application are not limited thereto.
[0305] It should be understood that the modules in the above devices can be implemented in the form of a processor calling software. For example, the device includes a processor, the processor is connected to a memory, and instructions are stored in the memory. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of each module of the device, wherein the processor can be a general-purpose processor, such as a CPU or a microprocessor, etc., and the memory can be a memory in the device or a memory outside the device. Alternatively, the modules in the device can be implemented in the form of a hardware circuit, and the functions of some or all modules can be realized by designing the hardware circuit. The hardware circuit can be understood as one or more processors; for example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all modules above are realized by designing the logical relationship of the components in the circuit; for another example, in another implementation, the hardware circuit can be implemented by PLD, taking FPGA as an example, which can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by a configuration file, so as to realize the functions of some or all modules above. All modules of the above devices can be implemented in the form of a processor calling software, or in the form of a hardware circuit, or in the form of a processor calling software, and the remaining part can be implemented in the form of a hardware circuit.
[0306] In an embodiment of the present application, a processor is a circuit with the ability to process signals. In one implementation, the processor may be a circuit with the ability to read and run instructions, such as a CPU, a microprocessor, a GPU, or a DSP; in another implementation, the processor may implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit is fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the hardware circuit configuration can be understood as the process of the processor loading instructions to implement the functions of some or all of the above modules. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, DPU, etc.
[0307] It can be seen that each module in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.
[0308] In addition, the modules in the above device can be fully or partially integrated together, or can be implemented independently. In one implementation, these modules are integrated together and implemented in the form of a SOC. The SOC may include at least one processor for implementing any of the above methods or implementing the functions of the modules of the device. The type of the at least one processor may be different, for example, including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.
[0309] An embodiment of the present application further provides a control device, which includes a processor and an interface circuit. The processor in the control device is connected to an input-output component through the interface circuit of the control device.
[0310] The input-output component specifically refers to a hardware component that enables a user to input information and output information to the user, such as a microphone, keyboard, handwriting tablet, touch screen, display, speaker, printer, etc.
[0311] The above-mentioned interface circuit can be any interface circuit that can realize the data communication function, for example, it can be a USB interface circuit, a Type-C interface circuit, a serial port circuit, a PCIE circuit, etc.
[0312] The processor in the control device is a circuit with signal processing capability, which can automatically conduct psychological consultation questions and answers by executing any one of the psychological consultation question-and-answer methods described in the above embodiments. The specific implementation of the processor can refer to the above processor implementation, and the embodiments of this application are not strictly limited.
[0313] When the control device is applied to a device with a human-computer interaction function, the input and output components of the control device may be input components and output components on the device, such as a microphone, a keyboard, a handwriting tablet, a touch screen, a display, an audio player, etc. At the same time, the processor of the control device may be a CPU or GPU, etc. provided by the device, and the interface circuit of the control device may be an interface circuit between the information input component of the device and a processor such as a CPU or GPU.
[0314] Corresponding to the above-mentioned question-answering method based on psychological consultation, the embodiment of the present application also discloses an electronic device, see Figure 5 As shown, the electronic device includes:
[0315] Memory 200 and processor 210;
[0316] The memory 200 is connected to the processor 210 and is used to store programs;
[0317] The processor 210 is used to implement the question-and-answer method based on psychological consultation disclosed in any of the above embodiments by running the program stored in the memory 200.
[0318] Specifically, the electronic device may further include: a bus, a communication interface 220 , an input device 230 and an output device 240 .
[0319] The processor 210, the memory 200, the communication interface 220, the input device 230 and the output device 240 are connected to each other via a bus.
[0320] A bus may include a pathway that transfers information between components of a computer system.
[0321] The processor 210 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0322] The processor 210 may include a main processor, and may also include a baseband chip, a modem, and the like.
[0323] The memory 200 stores a program for executing the technical solution of the present application, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes computer operation instructions. More specifically, the memory 200 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.
[0324] The input device 230 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.
[0325] Output device 240 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.
[0326] The communication interface 220 may include any transceiver or the like to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.
[0327] The processor 210 executes the program stored in the memory 200 and calls other devices, which can be used to implement the various steps of the question-and-answer method based on psychological counseling provided in the above-mentioned embodiment of the present application.
[0328] In addition to the above methods and devices, the embodiments of the present application may also be a computer program product, which includes a computer program. When the computer program is executed by a processor, the question-and-answer method based on psychological counseling provided by any of the above embodiments of the present application may be executed. Optionally, the computer program may be stored in a readable storage medium or in the cloud of a computer device; the processor of the computer device reads the computer program from the readable storage medium or the cloud.
[0329] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0330] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK).
[0331] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes each step of the question-and-answer method based on psychological counseling provided in the above embodiment.
[0332] The computer readable storage medium may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0333] Specifically, the specific working contents of each part of the above-mentioned electronic device, computer program product and storage medium, as well as the specific processing contents when the computer program product or the computer program on the above-mentioned storage medium is executed by the processor, can all be found in the contents of the various embodiments of the above-mentioned question-and-answer method based on psychological counseling, and will not be repeated here.
[0334] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0335] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0336] The steps in the methods of each embodiment of the present application can be adjusted in order, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.
[0337] The modules and sub-modules in the devices and terminals in the various embodiments of the present application can be combined, divided and deleted according to actual needs.
[0338] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, such as multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0339] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0340] In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.
[0341] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0342] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0343] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including a..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0344] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A question-answering method based on psychological consultation, characterized in that: include: According to the first problem description statement of the consulting object, a second problem description statement associated with the first problem description statement is retrieved from a plurality of problem description statements stored in a case database; The case database stores the multiple problem description statements and the consulting planning solutions corresponding to the problem description statements; Generate a first consulting planning solution corresponding to the first problem description statement by learning the second problem description statement and the second consulting planning solution corresponding to the second problem description statement; A psychological intervention dialogue is generated with the consulting object according to the first consulting planning scheme.
2. The method according to claim 1, characterized in that Also includes: Conduct an inquiry dialogue with the consulting object, and extract a first problem description sentence of the consulting object based on the dialogue sentences generated during the inquiry dialogue.
3. The method according to claim 1, characterized in that The construction process of the case database includes: By analyzing the psychological consultation sentences obtained in advance, constructing problem description sentences with different degrees of perfection, and the consultation planning schemes corresponding to the problem description sentences with different degrees of perfection; The problem description statements with different degrees of perfection and the consulting planning solutions corresponding to the problem description statements with different degrees of perfection are stored as cases in the case database.
4. The method according to claim 3, characterized in that The method of analyzing the pre-acquired psychological consultation statements to construct problem description statements with different degrees of perfection, and the consultation planning schemes corresponding to the problem description statements with different degrees of perfection, includes: By analyzing the pre-acquired psychological consultation sentences, the problem description sentences and the consultation planning scheme therein are extracted; the problem description sentences include a basic problem description sentence generated according to a part of the content of the inquiry stage of the psychological consultation sentence, and a complete problem description sentence generated according to the complete content of the inquiry stage of the psychological consultation sentence, and the consultation planning scheme is generated according to the complete problem description sentence; Determining the difference between the basic problem description statement and the complete problem description statement; The consulting planning scheme is modified according to the differentiated content to generate a consulting planning scheme corresponding to the basic problem description statement.
5. The method according to claim 3, characterized in that: The method of analyzing the pre-acquired psychological consultation statements to construct problem description statements with different degrees of perfection, and the consultation planning schemes corresponding to the problem description statements with different degrees of perfection, includes: By analyzing the psychological consultation sentences obtained in advance, the problem description sentences and consultation planning schemes are extracted; Expanding the problem description statement to obtain an expanded problem description statement; The consulting plan is modified according to the expanded content in the expansion process to obtain a consulting plan corresponding to the expanded problem description statement.
6. The method according to claim 1, characterized in that The retrieving a second problem description statement associated with the first problem description statement from a plurality of problem description statements stored in a case database comprises: Calculating sentence similarity between a plurality of problem description sentences stored in the case database and the first problem description sentence; the sentence similarity includes a first similarity and / or a second similarity, the first similarity is determined based on similarities between the plurality of problem description sentences stored in the case database and the first problem description sentence in each problem dimension; the second similarity includes types and quantities of problem dimensions included in the plurality of problem description sentences stored in the case database and the first problem description sentence; According to the sentence similarity, a second problem description sentence associated with the first problem description sentence is determined.
7. The method according to claim 1, characterized in that The step of generating a first consulting planning solution corresponding to the first problem description statement by learning the second problem description statement and the second consulting planning solution corresponding to the second problem description statement comprises: Using the second problem description sentence as a sample and the second consultation planning scheme corresponding to the second problem description sentence as a label, performing few-sample learning on the psychological consultation model; The first problem description statement is input into the learned psychological counseling model so that the learned psychological counseling model generates a first counseling planning scheme corresponding to the first problem description statement.
8. The method according to claim 1, characterized in that The method further comprises: Acquiring feedback information from the consulting subject; the feedback information includes feedback from the consulting subject on the psychological intervention dialogue; An adjustment plan for the first consulting planning plan is determined based on the feedback information.
9. The method according to claim 8, characterized in that Determining an adjustment plan for the first consulting planning plan according to the feedback information includes: If the feedback information of the consulting object includes negative feedback, determining the adjustment plan of the first consulting planning method includes regenerating the first problem description statement, and re-determining the first consulting planning plan according to the regenerated first problem description statement; The negative feedback includes that the feedback from the consulting object exceeds the scope of the first consulting planning scheme, and / or the consulting object does not accept the logic of the first consulting planning scheme.
10. A question-answering device based on psychological consultation, characterized in that: include: A retrieval module, configured to retrieve, according to a first problem description statement of a consulting object, a second problem description statement associated with the first problem description statement from a plurality of problem description statements stored in a case database; The case database stores the multiple problem description statements and the consulting planning solutions corresponding to the problem description statements; A generating module, configured to generate a first consulting planning scheme corresponding to the first problem description statement by learning the second problem description statement and a second consulting planning scheme corresponding to the second problem description statement; A psychological intervention dialogue is generated with the consulting object according to the first consulting planning scheme.
11. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store programs; The processor is used to implement the method according to any one of claims 1 to 9 by running the program in the memory.
12. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.