Conversation method and device and related equipment

By performing emotion recognition and optimization processing on instant messages through the server, the risks of inappropriate content and emotions in instant messaging systems are resolved, and harmonious communication between users is achieved.

CN120910207APending Publication Date: 2025-11-07CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202511031078.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

In instant messaging systems, users risk sending inappropriate content and/or messages with inappropriate emotions, which can cause distress to the recipient.

Method used

The server performs emotion recognition on real-time information, identifies inappropriate emotions, optimizes the information by reducing its emotional level, and then sends the optimized information.

Benefits of technology

It reduces the risk of inappropriate content and emotions in instant messaging and promotes harmonious communication among users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910207A_ABST
    Figure CN120910207A_ABST
Patent Text Reader

Abstract

The invention provides a dialogue method and device and related equipment, and particularly relates to the technical field of artificial intelligence, the method is applied to a server, and the method comprises the steps: carrying out the emotion recognition of first information under the condition of receiving the first information sent by a first client to a second client, and obtaining a first emotion recognition result; and under the condition that the emotion level corresponding to the first information is the target emotion level, optimizing the first information to obtain second information, and sending the second information to a second client, the semantics of the second information being matched with the semantics of the first information, and the emotion level corresponding to the first information being lower than the emotion level corresponding to the first information. According to the invention, the risk that the instant information contains improper content and / or improper emotion information can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a dialogue method, device and related equipment. BACKGROUND

[0002] Currently, when using an instant messaging system, a user can send low-quality or undesirable dialogue information, and when the initiating user regrets it, the receiving user has already read the information, which will cause unnecessary trouble to the initiating user.

[0003] That is, when instant communication between users is carried out based on the prior art, the risk of sending information containing inappropriate content and / or inappropriate emotion is relatively large. SUMMARY

[0004] The purpose of the present application is to provide a dialogue method, device and related equipment, which solves the technical problem that the risk of sending information containing inappropriate content and / or inappropriate emotion is large when instant communication between users is carried out based on the prior art.

[0005] In a first aspect, the present application provides a dialogue method applied to a server, comprising:

[0006] In the case where first information sent by a first client is received, performing emotion recognition on the first information to obtain a first emotion recognition result, wherein the first information is instant information sent by the first client to a second client;

[0007] In the case where the first emotion recognition result represents that an emotion level corresponding to the first information is a target emotion level, optimizing the first information to obtain second information, and sending the second information to the second client, wherein the semantics of the second information match the semantics of the first information, and the emotion level corresponding to the second information is lower than the emotion level corresponding to the first information.

[0008] In a second aspect, the present application also provides a dialogue device applied to a server, comprising:

[0009] An emotion recognition module, configured to, in the case where first information sent by a first client is received, perform emotion recognition on the first information to obtain a first emotion recognition result, wherein the first information is instant information sent by the first client to a second client;

[0010] The information optimization module is used to optimize the first information to obtain second information when the emotion level corresponding to the first information is the target emotion level, and send the second information to the second client. The semantics of the second information match the semantics of the first information, and the emotion level corresponding to the second information is lower than the emotion level corresponding to the first information.

[0011] Thirdly, the present invention provides an electronic device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, performs the steps of the method described in the first aspect.

[0012] Fourthly, the present invention provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0013] Fifthly, the present invention provides a computer program product including computer instructions that, when executed by a processor, implement the steps of the method described in the first aspect.

[0014] In this invention, emotion recognition is performed on instant messages sent from a first client to a second client. When the emotion recognition result indicates that the emotion level corresponding to the first message is the target emotion level, that is, when the emotion recognition result indicates that the first message exhibits a relatively obvious negative tendency, the first message is optimized into a second message before being sent to the second client. In order to achieve a certain extent, the inappropriate content and / or inappropriate emotions contained in the instant message are shielded by optimizing the instant message when it is identified that the instant message contains inappropriate content and / or inappropriate emotions. This can reduce the risk of instant messages containing inappropriate content and / or inappropriate emotions when users conduct instant communication. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating a dialogue method provided in an embodiment of the present invention;

[0016] Figure 2 This is a flowchart illustrating a method for intelligent message recognition and enhancement in an instant messaging scenario provided by an embodiment of the present invention.

[0017] Figure 3 This is a flowchart illustrating a content recognition module provided in an embodiment of the present invention;

[0018] Figure 4 This is a flowchart illustrating a calming and soothing module provided in an embodiment of the present invention.

[0019] Figure 5 is a structural schematic diagram of a dialogue device provided by the present application;

[0020] Figure 6 is a structural schematic diagram of an electronic device provided by the present application. DETAILED DESCRIPTION

[0021] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0022] The present application provides a dialogue method, applied to a server, such as Figure 1 As shown in the figure, the dialogue method comprises:

[0023] Step 101, in the case of receiving first information sent by a first client, performing emotion recognition on the first information to obtain a first emotion recognition result.

[0024] The first information is instant information sent by the first client to a second client.

[0025] In the present application, the server is specifically a service end corresponding to an instant message system, and the service end comprises an access layer, a logic layer and a storage layer connected in sequence, wherein the access layer is responsible for long connection management, and mainly communicates with the client accessing the instant message system in real time through a communication protocol (such as WebSocket or TCP protocol); the logic layer is used for processing message routing, anti-spam filtering, blacklist checking and other businesses; and the storage layer is used for storing the message content sent by the client by using a distributed database cluster.

[0026] For example, the process of sending instant messages from one client to another client is as follows: the access layer receives the instant messages sent by the one client, and forwards the instant messages to the logic layer, stores the instant messages in the storage layer after processing by the logic layer, and triggers a push service to push the instant messages to the other client. In the present application, the instant messages can also be referred to as instant information.

[0027] It should be understood that the dialogue method described in the present application is specifically applied to the logic layer of the server.

[0028] The first client and the second client can be understood as any two different clients accessing the instant messaging system, wherein the first client is specifically a client acting as an information sender among the any two different clients, and correspondingly, the second client is specifically a client acting as an information receiver among the any two different clients.

[0029] The first emotion recognition result is used to represent an emotion level corresponding to the first information.

[0030] In the present application, three emotion levels are defined, in descending order, as a first emotion level, a target emotion level, and a second emotion level, wherein the higher the emotion level is, the greater the risk of containing inappropriate content and / or inappropriate emotional information in the corresponding instant information is, and vice versa, the lower the emotion level is, the smaller the risk of containing inappropriate content and / or inappropriate emotional information in the corresponding instant information is.

[0031] For example, the inappropriate content can include sensitive words, such as words related to physical attacks and the like. The inappropriate emotion can include negative emotions that affect the normal progress of the conversation, such as anger, contempt, jealousy, and the like.

[0032] Exemplarily, a large language model can be applied to perform emotion recognition on the first information to obtain the first emotion recognition result, or a pre-trained emotion recognition model can be applied to perform emotion recognition on the first information to obtain the first emotion recognition result, wherein the emotion recognition model is a model constructed based on a deep neural network, and training samples used in the training process of the emotion recognition model at least include sample information and sample labels representing emotion levels corresponding to the sample information.

[0033] In step 102, if the first emotion recognition result represents that the emotion level corresponding to the first information is the target emotion level, the first information is optimized to obtain second information, and the second information is sent to the second client.

[0034] The semantic of the second information matches the semantic of the first information, and the emotion level corresponding to the second information is lower than the emotion level corresponding to the first information.

[0035] The case that the first emotion recognition result represents that the emotion level corresponding to the first information is the target emotion level can be understood as the case that the first information shows a relatively obvious negative emotion or a tendency of antagonistic emotion (there is a risk of hindering harmonious communication between users).

[0036] The semantic of the second information matches the semantic of the first information can be understood as that the semantic of the second information is the same as the semantic of the first information, or the similarity between the semantic of the second information and the semantic of the first information is greater than a set threshold.

[0037] The process of optimizing the first information can be understood as a process of reserving the semantic of the first information, shielding sensitive words possibly included in the first information, and rewriting the first information using more appropriate words.

[0038] For example, when the first information is "I think that scheme A is completely infeasible, and the general practice of X is just nonsense!", the second information after the optimization of the first information can be "I have some doubts about the feasibility of scheme A, and I also express concern about the general practice of X. Perhaps we can try to consider other options."

[0039] In the present application, the instant information sent by the first client to the second client is subjected to emotion recognition, and when the first emotion recognition result represents that the emotion level corresponding to the first information is a target emotion level, that is, when the first emotion recognition result represents that the first information shows a more obvious negative tendency, the first information is optimized to be second information before being sent to the second client. When the instant information contains inappropriate content and / or inappropriate emotion is recognized, the inappropriate content and / or inappropriate emotion contained in the instant information is shielded to a certain extent by optimizing the instant information, which can reduce the risk of instant information containing inappropriate content and / or inappropriate emotion when instant communication is performed between users.

[0040] In an embodiment, after the emotion of the first information is recognized to obtain the first emotion recognition result, the method further comprises:

[0041] When the first emotion recognition result represents that the emotion level corresponding to the first information is a second emotion level, the first information is sent to the second client, wherein the second emotion level is lower than the target emotion level.

[0042] In this embodiment, when the first emotion recognition result represents that the emotion level corresponding to the first information is a second emotion level, it can be considered that the risk of the first information containing inappropriate content and / or inappropriate emotion information is extremely small. In this case, the first information is directly sent to the second client by skipping the appeasement process and the information optimization process, which can save the additional overhead brought by generating appeasement information or performing information optimization operation, and reduce the transmission delay of the first information sent from the first client to the second client.

[0043] In an embodiment, after the first information is subjected to the emotion recognition to obtain the first emotion recognition result, the method further comprises:

[0044] In a case where the first emotion recognition result represents that an emotion level corresponding to the first information is a first emotion level, generating soothing information, and sending the soothing information to the first client, wherein the first emotion level is higher than the target emotion level;

[0045] receiving third information sent by the first client, and subjecting the third information to emotion recognition to obtain a second emotion recognition result, wherein the third information is instant information sent by the first client to a second client;

[0046] In a case where the second emotion recognition result represents that an emotion level corresponding to the third information is the target emotion level, optimizing the third information to obtain fourth information, and sending the fourth information to the second client, wherein a semantic of the fourth information matches a semantic of the third information, and an emotion level corresponding to the fourth information is lower than an emotion level corresponding to the third information.

[0047] In a case where the first emotion recognition result represents that an emotion level corresponding to the first information is a first emotion level, the first client corresponding user's current emotion is very bad, and the communication between the first client corresponding user and the second client corresponding user cannot continue. In this case, by providing soothing information, the negative emotion of the first client corresponding user due to the past communication content is calmed down as much as possible, and the first client corresponding user is helped to quickly adjust his / her own emotion so as to continue the communication with the second client corresponding user.

[0048] The soothing information is used to relieve the inappropriate emotion of the first client corresponding user, and provide suggestions to the first client corresponding user which are helpful for the conversation.

[0049] For example, the soothing information can be: "Your feelings are important, and I understand that you may feel uneasy at this moment. We can slow down the pace and focus on the problem you want to solve most", or "Some emotions in the conversation may be triggered, which is normal. Please remember that our goal is to find the best solution through communication. You can share your most concerned points to facilitate the effective progress of the conversation", and the like.

[0050] In this embodiment, the first client is sent the appeasement information, guiding the first client corresponding user to calm down before information expression, at this time, the new instant information (i.e. the third information) sent by the first client is received again, and the new instant information is identified again, in the case that the second emotion identification result represents that the emotion level corresponding to the third information is the target emotion level, the third information is optimized to obtain the fourth information, and the fourth information is sent to the second client to further reduce the risk of the user sending instant information containing inappropriate content and / or inappropriate emotion after appeasement.

[0051] It should be noted that, in the case that the second emotion identification result represents that the emotion level corresponding to the third information is the first emotion level, new appeasement information can be generated and sent to the first client to complete the re-appeasement of the user corresponding to the first client; or, in the case that the second emotion identification result represents that the emotion level corresponding to the third information is the first emotion level, the message sent by the first client can be temporarily frozen (paused, or only received and cached, without forwarding / emotion identification and other processing of the message), and warning information associated with the first client is sent to other clients, the warning information including: prompt information indicating that the emotion of the user corresponding to the first client is not good or unstable, and suggestion information for emotion appeasement of the user corresponding to the first client.

[0052] And in the case that the second emotion identification result represents that the emotion level corresponding to the third information is the second emotion level, the third information can be directly sent to the second client.

[0053] In one embodiment, in the case that the first emotion identification result represents that the emotion level corresponding to the first information is the first emotion level, the appeasement information is generated and sent to the first client, including:

[0054] In the case that the first emotion identification result represents that the emotion level corresponding to the first information is the first emotion level, information is generated based on a large language model with auxiliary information as model input to obtain the appeasement information, and the appeasement information is sent to the first client, wherein the auxiliary information includes at least one of the following:

[0055] Interaction information, the interaction information including context information of information interaction between the first client and the second client;

[0056] User portrait information of the user corresponding to the first client;

[0057] User portrait information of the user corresponding to the second client;

[0058] user relationship information, the user relationship information including an association relationship between a user corresponding to the first client and a user corresponding to the second client when the first client and the second client interact with each other.

[0059] The interaction information can include a set of information that the first client and the second client have interacted with in a historical time period of a set time length (such as 10 minutes, half an hour, etc.) before the current time.

[0060] The user portrait information can include the gender of the corresponding user, the age of the corresponding user, the occupation of the corresponding user, and the preferred conversation style (such as serious, relaxed, professional, etc.) of the corresponding user.

[0061] The expected conversation effect can be obtained based on the user relationship information, that is, different conversation tones and communication skills are used according to different user relationship information. For example, if the object is a couple, the user can set the expected answer style to be more considerate and warm; and for conversations in the workplace, a more formal and professional communication method can be used. The association relationship can include a couple relationship, a friend relationship, a superior-subordinate relationship in the workplace, a business relationship between party A and party B, etc.

[0062] In this embodiment, the large language model is used to generate information in combination with auxiliary information, which can improve the soothing effect of the generated soothing information, and better help the user corresponding to the first client to eliminate conflicts, relieve negative emotions, and promote the development of harmonious conversations.

[0063] It should be noted that in the application, the large language model can further combine Prompt prompt word engineering in the process of generating soothing information to generate more effective soothing information.

[0064] In one embodiment, when the first information is voice information, the emotion recognition of the first information to obtain the first emotion recognition result includes:

[0065] converting the first information into text information and performing text emotion recognition on the text information to obtain a text emotion recognition result; and performing voice emotion recognition on the first information to obtain a voice emotion recognition result;

[0066] fusing the text emotion recognition result and the voice emotion recognition result to obtain the first emotion recognition result.

[0067] In this embodiment, for the case that the first information is voice information, in addition to performing text emotion recognition on the text information converted from the first information to obtain a text emotion recognition result, voice emotion recognition is also performed on the first information to obtain a voice emotion recognition result, and the two are fused to obtain the first emotion recognition result, so as to avoid the problem of information loss that may be caused in the process of converting voice into text, and to guarantee the accuracy and reliability of the obtained first emotion recognition result.

[0068] In the application, the first information can be converted into text information through automatic speech recognition (ASR).

[0069] In this embodiment, for the case that the first information is voice information, in addition to performing text emotion recognition on the text information converted from the first information to obtain a text emotion recognition result, voice emotion recognition is also performed on the first information to obtain a voice emotion recognition result, and the two are fused to obtain the first emotion recognition result, so as to avoid the problem of information loss that may be caused in the process of converting voice into text, and to guarantee the accuracy and reliability of the obtained first emotion recognition result.

[0070] In one example, when the text emotion recognition result and the voice emotion recognition result are both used to indicate the emotion level corresponding to the first information, if the emotion level indicated by the text emotion recognition result and the emotion level indicated by the voice emotion recognition result are different, the process of fusing the text emotion recognition result and the voice emotion recognition result to obtain the first emotion recognition result can be understood as follows: generating the first emotion recognition result according to the higher emotion level of the different emotion levels indicated by the two.

[0071] If the emotion level indicated by the text emotion recognition result and the emotion level indicated by the voice emotion recognition result are the same, the process of fusing the text emotion recognition result and the voice emotion recognition result to obtain the first emotion recognition result can be understood as follows: generating the first emotion recognition result according to the emotion level indicated by the two.

[0072] In another example, when the text emotion recognition result includes a first inappropriate vocabulary set, a first inappropriate emotion set, a first emotion intensity value, and the speech emotion recognition result includes a second inappropriate vocabulary set, a second inappropriate emotion set, a second emotion intensity value, the process of fusing the text emotion recognition result and the speech emotion recognition result to obtain the first emotion recognition result can be understood as: taking the union of the first inappropriate vocabulary set and the second inappropriate vocabulary set to obtain a comprehensive inappropriate vocabulary set; taking the union of the first inappropriate emotion set and the second inappropriate emotion set to obtain a comprehensive inappropriate emotion set; performing weighted calculation on the first emotion intensity value and the second emotion intensity value (the weight coefficient of the second emotion intensity value is greater than the weight coefficient of the first emotion intensity value) to obtain a comprehensive emotion intensity value, and performing emotion level analysis in combination with the comprehensive emotion intensity value, the comprehensive inappropriate vocabulary set, and the comprehensive inappropriate emotion set to obtain the first emotion recognition result, wherein the emotion intensity value is used to represent the intensity of the negative emotion exhibited by the first information, the higher the emotion intensity value, the higher the intensity of the negative emotion, and if there is no negative emotion, the emotion intensity value is 0.

[0073] In one embodiment, the step of sending the second information to the second client comprises:

[0074] sending the first information and the second information to the first client;

[0075] In the case of receiving a first sending instruction sent by the first client, the second information is sent to the second client.

[0076] In this embodiment, by sending the first information and the second information to the first client for adaptive selection by the user corresponding to the first client, more selection space and flexibility are given to the user corresponding to the first client, so that the user can compare the difference between the first information before and after optimization, and in the case of receiving a first sending instruction sent by the first client, the second information optimized is sent to the second client.

[0077] It should be understood that after the first information and the second information are sent to the first client, in the case of receiving a second sending instruction sent by the first client, the first information is sent to the second client to support the user's demand for sending the original information (i.e., the first information).

[0078] In one embodiment, the method further comprises:

[0079] receive fifth information and information optimization instruction sent by the first client, the fifth information is instant information sent by the first client to the second client, the information optimization instruction is used to instruct to optimize the fifth information, and the information optimization instruction comprises at least one of the following: an emotional level corresponding to the optimized fifth information, a dialogue scene corresponding to the optimized fifth information, and a data format corresponding to the optimized fifth information; the dialogue scene comprises a work dialogue scene, a teacher-student dialogue scene, and a family dialogue scene.

[0080] According to the information optimization instruction, the fifth information is optimized to obtain sixth information, and the sixth information is sent to the second client.

[0081] It should be noted that the fifth information and the information optimization instruction can be understood as different parts in a data packet sent by the first client to the server, wherein the fifth information can be understood as a data body part in the data packet, and the information optimization instruction can be understood as a user demand part in the data packet.

[0082] According to the information optimization instruction, the fifth information is optimized to obtain sixth information, and the sixth information is sent to the second client.

[0083] In this embodiment, based on the above process setting, the foregoing emotion recognition process is skipped, and the information optimization instruction provided by the user is directly used to carry out targeted optimization on the instant information to be sent to the second client, so that the matching degree between the optimized sixth information and the optimization effect expected by the user corresponding to the first client is improved, and the development of more friendly and efficient dialogue content is promoted.

[0084] For the convenience of understanding, the following example is given:

[0085] Referring to Figure 2 , Figure 2 is a flowchart of an implementation method of message intelligent recognition and enhancement in an instant messaging scenario provided by the application, Figure 2 In the flowchart, user A can be understood as the user corresponding to the first client, user B can be understood as the user corresponding to the second client, and the logical layer of the server comprises a content recognition module, a calm module and a dialogue skill optimization module. If the intelligent assistance intervention is started, the content recognition module, the calm module and the dialogue skill optimization module are enabled; if the intelligent assistance intervention is not started, the content recognition module, the calm module and the dialogue skill optimization module are prohibited.

[0086] In the flowchart, the content recognition module comprises an emotion recognition module and a dialogue scene recognition module. Figure 3As shown, the content recognition module is specifically configured to analyze and recognize the content sent by the user (i.e. Figure 3 the aforementioned first information) using AI technology (such as text content recognition technology including a large language model (LLM), automatic speech recognition technology (ASR), etc.).

[0087] When the user input is a text message, the text message can be feature extracted and classified by combining the understanding ability and deep learning ability of the large language model (LLM), so as to recognize the emotional state of the user sending the text message. When the user input is voice information, on the one hand, the voice is converted into text through automatic speech recognition technology (ASR), and then recognized by the large language model (i.e. the aforementioned process of obtaining the text emotion recognition result); on the other hand, in order to avoid information loss in the language conversion process, a voice-based content recognition model is used (i.e. the aforementioned process of obtaining the voice emotion recognition result), and finally the results representing the emotional state of the user sending the voice information are output in an integrated manner to further improve the recognition accuracy (i.e. the aforementioned process of fusing the text emotion recognition result and the voice emotion recognition result).

[0088] According to the recognition result of the content recognition module, it is determined whether the user sending the message (i.e. the user corresponding to the first client) needs to be calmed down. If the high voltage line is triggered due to the recognition of bad behavior or negative emotion (which can be understood as the emotional level corresponding to the first information being the first emotional level), the user needs to be psychologically comforted by AI, and the user is guided to express after being calm.

[0089] As shown in Figure 4 The calming module is specifically configured to collect relevant information (which can be understood as the aforementioned auxiliary information) and use a prompt word engineering to generate a calming technique (which can be understood as the aforementioned calming information) that meets the situation by using a large language model (LLM), so as to help the user effectively cope with complex or sensitive conversations through the calming technique. The relevant information includes: conversation context (which can be understood as the aforementioned interaction information), user basic information (which can be understood as the user portrait information of the user corresponding to the first client), opposite party basic information (which can be understood as the user portrait information of the user corresponding to the second client and the aforementioned user relationship information), and expected conversation effect (which can be obtained according to the aforementioned user relationship information). Using the content understanding technology of LLM, some beneficial suggestions are recommended to help eliminate conflicts, relieve tension and achieve good communication effect.

[0090] Conversation context: refers to the question and answer content between the current user and the opposite party. By analyzing the context, LLM can better understand the situation of the conversation, and then develop appropriate calming strategies.

[0091] User base information: including gender, age, occupation, etc. These information helps to provide the background data of the user for the LLM, so as to generate more personalized, user demand-oriented conversation style and soothing words.

[0092] Opponent base information: including the relationship between the opponent and the user (supervisor and subordinate, lovers, husband and wife, customer and other social relationships). The understanding of such information is crucial for the LLM to accurately judge the communication tone needed in the conversation, because different relationships may require different communication ways.

[0093] Expected conversation effect: different conversation tone and communication skills are adopted according to different objects. For example, if the object is a lover, the user can set the expected answer style to be more considerate and warm; while for the conversation in the workplace, it may be more formal and professional.

[0094] The above content is input into the large model, and Prompt prompt words are added to help the large language model (LLM) understand, based on the powerful text generation ability of LLM, the large language model will generate soothing words that meet the requirements, and provide them to the user, and the user selects the words to optimize and guides the other party to reorganize the language to answer.

[0095] The words optimization module is used to collect relevant information and cooperate with Prompt prompt words to use the large language model (LLM) to generate optimized words that meet the situation (which can be understood as the second information mentioned above).

[0096] The relevant information also includes the conversation context, user base information, opponent base information, etc., and the output is the expected conversation effect. For specific content, please refer to the description of the soothing calm module mentioned above, which will not be repeated here.

[0097] The optimized words will be pushed to the user (i.e. the first client corresponding to the user) so that the user can quickly and conveniently make a choice, and the intelligent outbound scenario will be directly converted into a language stream and returned to the user.

[0098] Since the above recommendation process not only considers the context and actual needs of the conversation, but also analyzes the user's preferences and goals intelligently, it ensures that the recommended results are more in line with the user's expectations and needs. The optimized results usually have higher accuracy, smoother expression and more effective emotional regulation, so as to improve the user's communication skills and improve the effectiveness of intelligent outbound feedback.

[0099] At the same time, in order to give the user more space for choice and flexibility, the results before optimization (i.e. the first information) will also be retained in the instant messaging scenario, in case the user is not completely satisfied with the optimized suggestions or wants to refer to the original content.

[0100] Based on the above settings, the bad language content in the user chat conversation can be identified in advance, and the chat user is reminded and guided; and the language content in the chat conversation is optimized in real time, the enhanced message is generated, and the chat user is provided with more optimal message content.

[0101] It should be understood that the scheme described in the present application can be applied to office, instant messaging software of PC, Android, iOS and the like.

[0102] Referring to Figure 5 , Figure 5 The device 500 provided by the embodiment of the present application is applied to a server, and the device 500 comprises:

[0103] The emotion recognition module 501 is configured to, in a case where the first information sent by the first client is received, perform emotion recognition on the first information to obtain a first emotion recognition result, wherein the first information is instant information sent by the first client to a second client.

[0104] The information optimization module 502 is configured to, in a case where the first emotion recognition result represents that an emotion level corresponding to the first information is a target emotion level, optimize the first information to obtain second information, and send the second information to the second client, wherein a semantic of the second information matches a semantic of the first information, and an emotion level corresponding to the second information is lower than an emotion level corresponding to the first information.

[0105] In an embodiment, the device 500 further comprises:

[0106] The appeasing module is configured to, in a case where the first emotion recognition result represents that the emotion level corresponding to the first information is a first emotion level, generate appeasing information, and send the appeasing information to the first client, wherein the first emotion level is higher than the target emotion level.

[0107] The emotion recognition module 501 is further configured to receive third information sent by the first client, and perform emotion recognition on the third information to obtain a second emotion recognition result, wherein the third information is instant information sent by the first client to a second client.

[0108] The information optimization module 502 is further configured to, in a case where the second emotion recognition result represents that an emotion level corresponding to the third information is the target emotion level, optimize the third information to obtain fourth information, and send the fourth information to the second client, wherein a semantic of the fourth information matches a semantic of the third information, and an emotion level corresponding to the fourth information is lower than an emotion level corresponding to the third information.

[0109] In one embodiment, the pacification module is specifically used for:

[0110] In a case where the first emotion recognition result represents that the emotion level corresponding to the first information is a first emotion level, generating information based on a large language model with auxiliary information as model input to obtain the pacification information, and sending the pacification information to the first client, wherein the auxiliary information includes at least one of the following:

[0111] Interaction information, the interaction information including context information of information interaction between the first client and the second client;

[0112] User portrait information of a user corresponding to the first client;

[0113] User portrait information of a user corresponding to the second client;

[0114] User relationship information, the user relationship information including an association relationship between a user corresponding to the first client and a user corresponding to the second client when information interaction is performed between the first client and the second client.

[0115] In one embodiment, the emotion recognition module 501 is specifically used for:

[0116] Converting the first information into text information, performing text emotion recognition on the text information to obtain a text emotion recognition result, and performing voice emotion recognition on the first information to obtain a voice emotion recognition result;

[0117] Fusing the text emotion recognition result and the voice emotion recognition result to obtain the first emotion recognition result.

[0118] In one embodiment, the information optimization module 502 is specifically used for:

[0119] Sending the first information and the second information to the first client;

[0120] In a case where a first sending instruction sent by the first client is received, sending the second information to the second client.

[0121] In one embodiment, the device 500 further includes a proactive optimization module, which is specifically used for:

[0122] receive fifth information and information optimization instruction sent by the first client, the fifth information is instant information sent by the first client to the second client, the information optimization instruction is used for instructing optimization of the fifth information, and the information optimization instruction comprises at least one of the following: an emotion level corresponding to the optimized fifth information, a dialogue scene corresponding to the optimized fifth information, and a data format corresponding to the optimized fifth information; the dialogue scene comprises a work dialogue scene, a teacher-student dialogue scene, and a family dialogue scene.

[0123] According to the information optimization instruction, the fifth information is optimized to obtain sixth information, and the sixth information is sent to the second client.

[0124] In one embodiment, the information optimization module 502 is further configured to:

[0125] In a case where the first emotion recognition result represents that the emotion level corresponding to the first information is a second emotion level, the first information is sent to the second client, wherein the second emotion level is lower than the target emotion level.

[0126] The dialogue device 500 provided by the application corresponds to each process of each embodiment of the dialogue method described above, and has the same technical effects, and thus will not be described here.

[0127] The application further provides an electronic device, referring to Figure 6 , Figure 6 is a structural schematic diagram of an electronic device provided by the application, and the electronic device comprises a memory 601, a processor 602, and a program or instruction stored in the memory 601 and running on the memory 601, the program or instruction is executed by the processor 602 and can realize Figure 1 any step in the corresponding dialogue method embodiment and achieve the same beneficial effects, and thus will not be described here.

[0128] The processor 602 can be a CPU, an ASIC, an FPGA, or a GPU.

[0129] Those skilled in the art can understand that all or part of the steps of the dialogue method embodiments described above can be completed by program instruction related hardware, and the program can be stored in a readable medium.

[0130] The application further provides a readable storage medium, and the readable storage medium stores a computer program, and the computer program is executed by a processor and can realize the dialogue method embodiments described above. Figure 1Any step in the corresponding method embodiments of the dialogue method, and can achieve the same technical effects, to avoid repetition, hereinafter not described. The storage medium, such as read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.

[0131] The terms "first", "second", etc. in the present application are used to distinguish similar objects, and do not necessarily be used to describe a particular order or sequence. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices. In addition, "and / or" is used in the present application to represent at least one of the connected objects, for example, A and / or B and / or C, which represents 7 cases including A alone, B alone, C alone, A and B both exist, B and C both exist, A and C both exist, and A, B and C all exist.

[0132] It should be noted that in this paper, the term "including", "containing" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the sentence "including a…" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0133] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of software products, which are stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and include a plurality of instructions for making a terminal (which can be a mobile phone, computer, server, air conditioner, or second terminal device, etc.) execute the method of each embodiment of the present application.

[0134] The embodiments of the present application are described above with reference to the accompanying drawings, but the present application is not limited to the above-described specific embodiments, and the above-described specific embodiments are merely illustrative, but not restrictive, and a person of ordinary skill in the art can make many forms under the inspiration of the present application without departing from the purpose of the present application and the scope protected by the claims, and all belong to the protection of the present application.

Claims

1. A conversation method applied to a server, characterized by, The method comprises: In the case where the first information sent by the first client is received, the first information is subjected to emotion recognition to obtain a first emotion recognition result, wherein the first information is instant information sent by the first client to a second client; In the case where the first emotion recognition result represents that the emotion level corresponding to the first information is a target emotion level, the first information is optimized to obtain second information, and the second information is sent to the second client, wherein the semantics of the second information match the semantics of the first information, and the emotion level corresponding to the second information is lower than the emotion level corresponding to the first information.

2. The method of claim 1, wherein, After the first information is subjected to emotion recognition to obtain a first emotion recognition result, the method further comprises: In the case where the first emotion recognition result represents that the emotion level corresponding to the first information is a first emotion level, soothing information is generated, and the soothing information is sent to the first client, wherein the first emotion level is higher than the target emotion level; Third information sent by the first client is received, and the third information is subjected to emotion recognition to obtain a second emotion recognition result, wherein the third information is instant information sent by the first client to a second client; In the case where the second emotion recognition result represents that the emotion level corresponding to the third information is the target emotion level, the third information is optimized to obtain fourth information, and the fourth information is sent to the second client, wherein the semantics of the fourth information match the semantics of the third information, and the emotion level corresponding to the fourth information is lower than the emotion level corresponding to the third information.

3. The method of claim 2, wherein, In the case where the first emotion recognition result represents that the emotion level corresponding to the first information is a first emotion level, the soothing information is generated, and the soothing information is sent to the first client, comprising: In the case where the first emotion recognition result represents that the emotion level corresponding to the first information is a first emotion level, based on a large language model, information generation is performed with auxiliary information as model input to obtain the soothing information, and the soothing information is sent to the first client, wherein the auxiliary information comprises at least one of the following: Interaction information, the interaction information comprising context information of information interaction between the first client and a second client; User portrait information of a user corresponding to the first client; User portrait information of a user corresponding to the second client; User relationship information, the user relationship information comprising an association relationship between a user corresponding to the first client and a user corresponding to the second client when information interaction is performed between the first client and the second client.

4. The method of claim 1, wherein, In the case where the first information is voice information, the first information is subjected to emotion recognition to obtain a first emotion recognition result, comprising: The first information is converted into text information, and the text information is subjected to text emotion recognition to obtain a text emotion recognition result; and the first information is subjected to voice emotion recognition to obtain a voice emotion recognition result; The text emotion recognition result and the voice emotion recognition result are fused to obtain the first emotion recognition result.

5. The method of claim 1, wherein, The step of sending the second information to the second client comprises: sending the first information and the second information to the first client; In a case where a first sending instruction sent by the first client is received, the second information is sent to the second client.

6. The method of claim 1, wherein, The method further comprises: receiving fifth information and information optimization instructions sent by the first client, the fifth information being instant information sent by the first client to the second client, the information optimization instructions being used to instruct optimization of the fifth information, and the information optimization instructions comprising at least one of an emotion level corresponding to the optimized fifth information, a dialogue scene corresponding to the optimized fifth information, and a data format corresponding to the optimized fifth information; the dialogue scene comprising a work dialogue scene, a teacher-student dialogue scene, and a family dialogue scene; optimizing the fifth information according to the information optimization instructions to obtain sixth information, and sending the sixth information to the second client.

7. The method of claim 1, wherein, After the first information is subjected to emotion recognition to obtain the first emotion recognition result, the method further comprises: In a case where the first emotion recognition result represents that an emotion level corresponding to the first information is a second emotion level, the first information is sent to the second client, wherein the second emotion level is lower than the target emotion level.

8. A dialog apparatus applied to a server, characterized by comprising: The device comprises: an emotion recognition module configured to, in a case where first information sent by a first client is received, subject the first information to emotion recognition to obtain a first emotion recognition result, wherein the first information is instant information sent by the first client to a second client; an information optimization module configured to, in a case where the first emotion recognition result represents that an emotion level corresponding to the first information is a target emotion level, optimize the first information to obtain second information, and send the second information to the second client, wherein a semantic of the second information matches a semantic of the first information, and an emotion level corresponding to the second information is lower than an emotion level corresponding to the first information.

9. An electronic device, comprising: comprise: a processor, a memory, and a program stored on the memory and executable on the processor, the program being executed by the processor to implement the steps of the dialogue method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium, and the computer program is executed by the processor to implement the steps of the dialogue method according to any one of claims 1 to 7.

11. A computer program product, characterised in that, The computer program comprises computer instructions, and the computer instructions are executed by the processor to implement the steps of the dialogue method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Message management method based on condition judgment

    CN112084792A

  • User emotion recognition and reply method, system and device and storage medium

    CN113676600A

  • Dialogue processing method and device based on emotion recognition, terminal and storage medium

    CN115101053A

  • Method and device for pacifying emotion of user and medium

    CN115840807A

  • Message processing method and device, electronic equipment, medium and program product

    CN118740780A