Intelligent robot conversation interaction method, device, and computer equipment
By determining the session context identifier based on the conversation group identifier, user identifier and robot identifier in the intelligent robot system, the problem of intelligent robots maintaining independent dialogue contexts in multi-person dialogue groups is solved, and the accuracy and semantics of conversation information processing are improved. Analyze the effects.
Patent Information
- Application Number
- CN202011507312.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-18
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2040-12-18
AI Technical Summary
Existing intelligent robot conversation interaction methods cannot maintain independent conversation context information of different users in multi-person conversation groups, resulting in low accuracy of intelligent robot processing of conversation information, and it is easy to confuse different conversations and give incorrect responses. .
By receiving the session message sent by the user terminal in the session group, the corresponding session context identifier is determined based on the session group ID, user ID and robot ID carried in the session message, and is sent to the intelligent robot system for processing and return. Respond to messages to maintain independent conversation contexts between different users and intelligent robots.
It effectively improves the accuracy of intelligent robots in processing conversational information, avoids giving wrong responses due to confusing different conversations, and achieves more intelligent semantic analysis effects.
Smart Images

Figure CN112579754B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a conversation interaction method, device, computer equipment and storage medium for an intelligent robot. Background Art
[0002] With the development of computer technology and the advent of the 5G era, the emergence of the Internet has brought great convenience to modern life. More and more users can interact with various intelligent robots online by logging into different application platforms.
[0003] However, in the current intelligent robot conversation interaction mode, the server can only conduct individual conversations with the intelligent robot and maintain conversation context information based on the user dimension. It is unable to support maintaining independent conversation context information of different users in multiple multi-person conversation groups, making it impossible for the intelligent robot to perform accurate semantic analysis, which easily leads to low accuracy in the intelligent robot's processing of conversation information. Summary of the invention
[0004] Based on this, it is necessary to provide an interaction method, device, computer equipment and storage medium for an intelligent robot in a complex context, which can improve the accuracy of the intelligent robot in processing conversation information, in order to address the above technical problems.
[0005] A conversation interaction method for an intelligent robot, the method comprising:
[0006] Receiving a conversation message forwarded by a message system; the conversation message is a conversation message sent by a user terminal to a robot in a conversation group;
[0007] Determine a corresponding session context identifier according to the session group identifier, user identifier and robot identifier carried in the session message, and send the session message carrying the session context identifier to the intelligent robot system; the session context identifier has a mapping relationship with the multi-person session group identifier, user identifier and robot identifier information;
[0008] The intelligent robot system processes the session message carrying the session context identifier to obtain a corresponding response message, and returns the response message to the message system.
[0009] In one embodiment, before receiving the conversation message forwarded by the message system, the method further includes:
[0010] Obtain the server address where each intelligent robot is located, and store the server address in a local database;
[0011] The sending the conversation message carrying the conversation context identifier to the intelligent robot system includes:
[0012] Obtaining the robot identifier carried in the conversation message;
[0013] According to the robot identifier, query the corresponding server address from the local database;
[0014] The session message carrying the session context identifier is format converted and encrypted, and then sent to the server address.
[0015] In one of the embodiments, determining the corresponding session context identifier according to the session group identifier, the user identifier, and the robot identifier carried in the session message includes:
[0016] Obtaining the conversation group identifier, user identifier, and robot identifier information carried in the conversation message;
[0017] According to a preset rule, the identification variables of the three dimensions of the conversation group identification, the user identification and the robot identification are combined to obtain an updated variable identification;
[0018] The updated variable identifier is marked as the corresponding session context identifier.
[0019] In one embodiment, the method further comprises:
[0020] Setting an expiration time corresponding to the session context identifier, the expiration time being used to determine whether to update the session context identifier;
[0021] When it is detected that the session context identifier has expired, reacquiring the session message forwarded through the message system;
[0022] A new session context identifier is generated according to the identification information of multiple dimensions carried in the session message.
[0023] In one embodiment, the processing of the session message carrying the session context identifier by the intelligent robot system to obtain a corresponding response message includes:
[0024] Identifying the session context identifier carried by the session message through an intelligent robot system, and finding session context information corresponding to the session context identifier;
[0025] A semantic analysis is performed according to the session context information to obtain a corresponding response message.
[0026] In one embodiment, after returning the response message to the message system, the method further includes:
[0027] The response message is pushed to the conversation group corresponding to the conversation group identifier through the message system, and the corresponding conversation message is sent to the message recipient corresponding to the user identifier.
[0028] A conversation interaction device for an intelligent robot, the device comprising:
[0029] A receiving module, used for receiving a conversation message forwarded by a message system; the conversation message is a conversation message sent by a user terminal in a conversation group to a robot;
[0030] A sending module, configured to determine a corresponding session context identifier according to the session group identifier, user identifier and robot identifier carried in the session message, and send the session message carrying the session context identifier to the intelligent robot system; the session context identifier has a mapping relationship with the multi-person session group identifier, user identifier and robot identifier information;
[0031] A processing module is used to process the session message carrying the session context identifier through the intelligent robot system, obtain a corresponding response message, and return the response message to the message system.
[0032] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0033] Receiving a conversation message forwarded by a message system; the conversation message is a conversation message sent by a user terminal to a robot in a conversation group;
[0034] Determine a corresponding session context identifier according to the session group identifier, user identifier and robot identifier carried in the session message, and send the session message carrying the session context identifier to the intelligent robot system; the session context identifier has a mapping relationship with the multi-person session group identifier, user identifier and robot identifier information;
[0035] The intelligent robot system processes the session message carrying the session context identifier to obtain a corresponding response message, and returns the response message to the message system.
[0036] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0037] Receiving a conversation message forwarded by a message system; the conversation message is a conversation message sent by a user terminal to a robot in a conversation group;
[0038] Determine a corresponding session context identifier according to the session group identifier, user identifier and robot identifier carried in the session message, and send the session message carrying the session context identifier to the intelligent robot system; the session context identifier has a mapping relationship with the multi-person session group identifier, user identifier and robot identifier information;
[0039] The intelligent robot system processes the session message carrying the session context identifier to obtain a corresponding response message, and returns the response message to the message system.
[0040] A conversation interaction system, comprising:
[0041] A message system, used for receiving a conversation message; the conversation message is a conversation message sent by a user terminal to a robot in a conversation group;
[0042] The adaptation system is used to determine the corresponding session context identifier according to the session group identifier, user identifier and robot identifier carried in the session message, and send the session message carrying the session context identifier to the intelligent robot system; the session context identifier has a mapping relationship with the multi-person session group identifier, user identifier and robot identifier information;
[0043] The intelligent robot system is used to process the conversation message carrying the conversation context identifier, obtain a corresponding response message, and return the response message to the message system.
[0044] The conversation interaction method, device, computer equipment and storage medium of the above-mentioned intelligent robot receive a conversation message forwarded by a message system, and the conversation message is a conversation message sent by a user terminal to a robot in a conversation group. According to the conversation group identifier, user identifier and robot identifier carried in the conversation message, the corresponding conversation context identifier is determined, and the conversation message carrying the conversation context identifier is sent to the intelligent robot system. The conversation context identifier has a mapping relationship with the multi-person conversation group identifier, user identifier and robot identifier information. The conversation message carrying the conversation context identifier is processed by the intelligent robot system to obtain a corresponding response message, and the response message is returned to the message system. As a result, the third-party intelligent robot system only needs to identify the conversation context identifier to determine whether it is the same conversation context. Through the uniformly maintained context information, different users can maintain independent conversation contexts when they have conversations with different intelligent robots in different multi-person groups, so that the intelligent robot can perform more accurate semantic analysis for different conversation contexts, achieve a more intelligent effect, and avoid the intelligent robot from giving irrelevant answers due to confusion of different conversations, effectively improving the accuracy of the intelligent robot in processing conversation information. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is an application environment diagram of a conversation interaction method of an intelligent robot in one embodiment;
[0046] Figure 2 A flowchart of a conversation interaction method of an intelligent robot in one embodiment;
[0047] Figure 3A A flowchart of the steps of sending a session message carrying a session context identifier to an intelligent robot system in one embodiment;
[0048] Figure 3B A system architecture diagram of intelligent robot conversation interaction in one embodiment;
[0049] Figure 4 A schematic flow chart of a step of determining a corresponding session context identifier according to a session group identifier, a user identifier, and a robot identifier carried in a session message in one embodiment;
[0050] Figure 5 A schematic diagram of a flow chart of a step of generating a new session context identifier in one embodiment;
[0051] Fig. 6A A flowchart of the steps of processing a conversation message carrying a conversation context identifier by an intelligent robot system to obtain a corresponding reply message in one embodiment;
[0052] Figure 6B This is a schematic diagram of a display interface for conversation messages between a user and a robot in a conversation group in one embodiment;
[0053] Figure 7 is a structural block diagram of a conversation interaction device of an intelligent robot in one embodiment;
[0054] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] The intelligent robot conversation interaction method provided in this application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The server 104 receives the conversation message forwarded by the message system, and the conversation message is the conversation message sent by the user terminal 102 with the robot in the conversation group. The server 104 determines the corresponding conversation context identifier according to the conversation group identifier, user identifier and robot identifier carried in the conversation message, and the server 104 sends the conversation message carrying the conversation context identifier to the intelligent robot system. The conversation context identifier has a mapping relationship with the multi-person conversation group identifier, user identifier and robot identifier information. The server 104 processes the conversation message carrying the conversation context identifier through the intelligent robot system, obtains the corresponding response message, and returns the response message to the message system. Among them, the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0057] In one embodiment, Figure 2 As shown, a conversation interaction method of an intelligent robot is provided, and the method is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0058] Step 202: receiving a conversation message forwarded by a message system, where the conversation message is a conversation message sent by a user terminal to a robot in a conversation group.
[0059] The adaptation system, i.e., the adaptation server, can receive the conversation message forwarded by the message system. The conversation message is the conversation message sent by the user terminal to the robot in the conversation group. Among them, the message system refers to the server used to process different types of messages, which can be deployed locally or on other server platforms. The conversation group refers to a group with multi-person conversation function. For example, the current applications such as WeChat and Skype all have multi-person group conversation function. The message types that the conversation group can support include text, pictures, voice, video, geographic location, files, notifications, prompts, intelligent dialogue robots, custom messages, etc. At the same time, it provides offline messages, roaming messages, multi-terminal synchronization, cloud history records, and message push capabilities. The adaptation server refers to the adaptation system that adapts to the third-party intelligent robot system. The adaptation server is used to find the corresponding adapted intelligent robot system according to the message forwarded by the received message system, and forward the corresponding message to the third-party robot system. When interacting with the intelligent robot, that is, when the user evokes the intelligent robot, the corresponding conversation context is first created in the intelligent robot system, and the corresponding timeout time of the conversation context is updated and maintained; secondly, the information is sent to the intelligent robot system, and the ID of the conversation context needs to be attached in the request parameters. For example, a user can send a message @an intelligent robot that provides a certain service in a conversation group in a specific scenario. After the conversation message goes through a series of logical processing by the message system, the message system forwards the conversation message to the adaptation system (xt-robot) by calling the internal interface of the adaptation system (xt-robot).
[0060] Step 204, determine the corresponding session context identifier according to the session group identifier, user identifier and robot identifier carried in the session message, and send the session message carrying the session context identifier to the intelligent robot system. The session context identifier has a mapping relationship with the multi-person session group identifier, user identifier and robot identifier information.
[0061] After the adaptation system receives the conversation message forwarded by the message system, the adaptation system can determine the corresponding conversation context identifier according to the conversation group identifier, user identifier and robot identifier carried in the conversation message, and send the conversation message carrying the conversation context identifier to the intelligent robot system. The conversation context identifier has a mapping relationship with the multi-person conversation group identifier, user identifier and robot identifier information. Among them, the conversation group identifier is used to identify a unique conversation group, the user identifier is used to identify a unique user, and the robot identifier is used to identify a unique robot. The conversation context identifier is used to identify unique conversation context information. The purpose of establishing conversation context information is to have context information before and after the conversation during the conversation, so that when the intelligent robot answers the question, it can associate the previous conversation content to form a coherent conversation process. The mapping relationship means that the adaptation system can combine the three-dimensional ID variables of the conversation group identifier, user identifier and robot identifier carried in the conversation message to form a new variable, namely the conversation context identifier, and the new variable changes with the changes of the three-dimensional ID variables. For example, the three dimensional variables are userid_xxx, groupid_vvv, and robotid_bbb. The adaptation system can generate a corresponding new variable based on the above three dimensional variables, that is, the generated session context ID is userid_xxx-groupid_vvv-robotid_bbb. If any of the variables changes, a new session context ID will be generated. For example, if the group dimension groupid_vvv changes to groupid_VYY, the corresponding session context ID generated by the adaptation system is updated to userid_xxx-groupid_VYY-robotid_bbb.
[0062] Step 206: Process the conversation message carrying the conversation context identifier through the intelligent robot system to obtain a corresponding response message, and return the response message to the message system.
[0063] The adaptation system determines the corresponding session context identifier according to the session group identifier, user identifier and robot identifier carried in the session message, sends the session message carrying the session context identifier to the intelligent robot system, processes the session message carrying the session context identifier through the intelligent robot system, obtains the corresponding response message, and returns the response message to the message system. Among them, the intelligent robot system refers to a robot system that can perform semantic analysis for different dialogue contexts. For example, the robot can include intelligent robots with different functions deployed on different servers such as Xiaoyun and Cangqiong. Specifically, the adaptation system determines the corresponding session context identifier according to the session group identifier, user identifier and robot identifier carried in the session message, and forwards the session message to the third-party intelligent robot system after formatting and encrypting it, and obtains the corresponding response message after the third-party intelligent robot performs intelligent semantic analysis on the session message. After the adaptation system receives the response message returned by the intelligent robot, the adaptation system formats the response message, pushes the response message to the message system, displays the response message in the corresponding session group through the message system, and sends the corresponding session message to the corresponding message recipient.
[0064] In the traditional way of interacting with intelligent robots, conversations with intelligent robots and maintenance of conversation context information are carried out based on the user dimension. That is, each user can only have one conversation context information, and it is impossible to support the maintenance of independent conversation context information in multiple multi-person conversation groups. It is impossible for intelligent robots to accurately perform semantic analysis on conversation information in multi-person conversation groups. That is, users in different multi-person groups share the same conversation context information. When answering questions from the same user in different groups, the intelligent robot is associated with the same conversation context information, which can easily confuse different conversations and give irrelevant answers.
[0065] In this embodiment, a conversation message forwarded by a message system is received, and the conversation message is a conversation message sent by a user terminal to a robot in a conversation group. According to the conversation group identifier, user identifier and robot identifier carried in the conversation message, the corresponding conversation context identifier is determined, and the conversation message carrying the conversation context identifier is sent to the intelligent robot system. The conversation context identifier has a mapping relationship with the multi-person conversation group identifier, user identifier and robot identifier information. The conversation message carrying the conversation context identifier is processed by the intelligent robot system to obtain a corresponding reply message, and the reply message is returned to the message system. As a result, the third-party intelligent robot system only needs to identify the conversation context identifier to determine whether it is the same conversation context, without having to save the entire conversation context information, which simplifies the complexity of the third-party intelligent robot system. At the same time, by uniformly maintaining the context information, different users can maintain independent conversation contexts when they have conversations with different intelligent robots in different multi-person groups, so that the intelligent robot can perform more accurate semantic analysis for different conversation contexts, achieve a more intelligent effect, and avoid the intelligent robot from giving irrelevant replies due to confusion of different conversations, effectively improving the accuracy of the intelligent robot in processing conversation information.
[0066] In one embodiment, before receiving the conversation message forwarded by the message system, the method further includes the step of storing the server address in a local database, specifically including:
[0067] Get the server address where each intelligent robot is located and store the server address in the local database.
[0068] Before the adaptation system receives the conversation message forwarded by the message system, the adaptation system can store the server addresses corresponding to different robot systems in the local database. Specifically, the adaptation system can obtain the server address of each intelligent robot and store the server address in the local database. That is, the server addresses corresponding to the intelligent robots providing different services are all written in the database corresponding to the adaptation system, and the adaptation system can support querying the server address according to the robot identification, that is, the robot ID. As a result, by adding an adaptation system between the message system and the third-party robot system, and the adaptation system uniformly maintains the server address corresponding to the third-party robot system, it is possible to support querying the corresponding server address according to the robot identification, thereby simplifying the complexity of the third-party intelligent robot system. In particular, when it is necessary to connect to multiple third-party intelligent robot systems, there is no need for each intelligent robot system to maintain the corresponding dialogue context information for each user, which reduces the workload and is conducive to the integration of multiple intelligent robot systems.
[0069] In one embodiment, if Figure 3AAs shown, the step of sending a conversation message carrying a conversation context identifier to an intelligent robot system includes:
[0070] Step 302: Obtain the robot identifier carried in the conversation message.
[0071] Step 304: query the corresponding server address from the local database according to the robot identifier.
[0072] Step 306: Convert and encrypt the session message carrying the session context identifier and then send it to the server address.
[0073] After the adaptation system receives the conversation message forwarded by the message system, the adaptation system can determine the corresponding conversation context identifier according to the conversation group identifier, user identifier and robot identifier carried in the conversation message, and send the conversation message carrying the conversation context identifier to the intelligent robot system. Figure 3B The figure shows the system architecture diagram of intelligent robot conversation interaction. The adaptation system obtains the robot identifier carried in the conversation message based on the received conversation message. Furthermore, the adaptation system can query the corresponding server address from the local database based on the robot identifier, and format-convert and encrypt the conversation message carrying the conversation context identifier, and then send it to the corresponding server address obtained by the query. Among them, the adaptation system can format-convert and encrypt the received conversation information according to the preset protocol and then forward it to the third-party robot system. For example, the message format message protocol can be as follows: HTTP HEADER is as follows:
[0074]
[0075]
[0076] HTTP BODY is as follows:
[0077]
[0078] Among them, sign represents the signature value, and sessionId represents the session context ID. The adaptation system can convert the format of the received session information and encrypt it in a variety of ways according to the preset protocol. For example, when calculating the sign signature value, the adaptation system can use the summary information in the parameters and the robot's appSecret (i.e., the application key) as the signature string, use the HmacSHA256 algorithm to calculate the signature, and then perform Base64encode, that is, use the Base64 encode function to encode, to obtain the final signature value. As a result, it is possible to support querying the corresponding server address according to the robot identification, that is, it is possible to forward the session message to the server where the robot is located for processing according to the corresponding configuration information of the intelligent robot (the server address where the robot service is located), thereby simplifying the complexity of the third-party intelligent robot system. In particular, when it is necessary to connect to multiple third-party intelligent robot systems, there is no need for each intelligent robot system to maintain the corresponding dialogue context information for each user, which reduces the workload and is conducive to the integration of multiple intelligent robot systems.
[0079] In one embodiment, Figure 4 As shown, the step of determining the corresponding session context identifier according to the session group identifier, user identifier and robot identifier carried in the session message includes:
[0080] Step 402: Acquire the conversation group identifier, user identifier, and robot identifier information carried in the conversation message.
[0081] Step 404: According to a preset rule, the identification variables of the three dimensions of the conversation group identification, the user identification and the robot identification are combined to obtain an updated variable identification.
[0082] Step 406: Mark the updated variable identifier as the corresponding session context identifier.
[0083] After the adaptation system receives the conversation message forwarded by the message system, the adaptation system can determine the corresponding conversation context identifier according to the conversation group identifier, user identifier and robot identifier carried in the conversation message. Specifically, the adaptation system can obtain the conversation group identifier, user identifier and robot identifier information carried in the conversation message. According to the preset rules, that is, according to the generation rules of the conversation context identifier, the adaptation system combines the identification variables of the three dimensions of conversation group identifier, user identifier and robot identifier to obtain the updated variable identifier, and marks the updated variable identifier as the corresponding conversation context identifier. For example, the conversation group identifier, user identifier and robot identifier are userid_xxx, groupid_vvv, and robotid_bbb respectively. Then the adaptation system can generate a corresponding new variable according to the above three dimensional variables, that is, the ID of the generated conversation context is userid_xxx-groupid_vvv-robotid_bbb. If any of the variables changes, a new session context ID will be generated. For example, if the group dimension groupid_vvv changes to groupid_VYY, the corresponding session context ID generated by the adaptation system is updated to userid_xxx-groupid_VYY-robotid_bbb. That is, the session context information corresponding to the user is uniformly maintained in the adaptation system. When conversing with a third-party intelligent robot, the adaptation system only needs to send the session information to the third-party intelligent robot system and attach the conversation context ID in the request parameters. The third-party intelligent robot system only needs to identify the conversation context ID to determine whether it is the same conversation context. Compared with the traditional method, the session context ID has only one dimension, namely the user ID dimension. For example, if the user ID is userid_xxx, the session context ID is also userid_xxx. Even if you are conversing with robots in different groups, the session context ID is still userid_xxx. In this embodiment, an adaptation system that adapts to the third-party intelligent robot system is added between the message system of the multi-person conversation group and the intelligent robot system, and the adaptation system is used to maintain the corresponding conversation context with three dimensions of information (multi-person conversation group ID, user ID and robot ID). When different users have conversations with different intelligent robots in different multi-person groups, independent conversation contexts can be maintained, so that the intelligent robot can perform more accurate semantic analysis for different conversation contexts, achieve a more intelligent effect, avoid the intelligent robot from giving irrelevant answers due to confusion between different conversations, and effectively improve the accuracy of the intelligent robot in processing conversation information.
[0084] In one embodiment, Figure 5 As shown, the steps of generating a new session context identifier include:
[0085] Step 502: Set an expiration time corresponding to the session context identifier. The expiration time is used to determine whether to update the session context identifier.
[0086] Step 504: when it is detected that the session context identifier is invalid, reacquire the session message forwarded by the message system.
[0087] Step 506: Generate a new session context identifier according to the identification information of multiple dimensions carried in the session message.
[0088] After the adaptation system receives the conversation message forwarded by the message system, the adaptation system can generate a unique conversation context identifier according to the current user ID, the current conversation group ID and the current intelligent robot ID, and save the expiration time corresponding to the conversation context identifier. Specifically, the adaptation system can pre-set the expiration time corresponding to the conversation context identifier, and the expiration time is used to determine whether to update the conversation context identifier. When the adaptation system detects that the conversation context identifier has expired, it re-acquires the conversation message forwarded by the message system, and generates a new conversation context identifier according to the identification information of multiple dimensions carried in the conversation message. For example, user 1 sent a message to robot A at 8:00 am, and then did not continue the conversation until 19:00 pm, when user 1 sent another message to robot A. Because the adaptation system set the expiration time corresponding to the conversation context, when user 1 sent the message at 19:00 pm, the conversation context of the previously sent message had expired. Therefore, the adaptation system will generate a corresponding new conversation context identifier according to the conversation group identifier, user identifier and robot identifier carried by the conversation message received at 19:00. Therefore, by setting the expiration time corresponding to the conversation context, the problem of too long time interval between the user and the robot can be solved, achieving a more intelligent effect and bringing convenience to the user.
[0089] In one embodiment, Fig. 6A As shown, the step of processing the conversation message carrying the conversation context identifier by the intelligent robot system to obtain the corresponding response message includes:
[0090] Step 602: The intelligent robot system identifies the session context identifier carried in the session message, and searches for session context information corresponding to the session context identifier.
[0091] Step 604: perform semantic analysis based on the session context information to obtain a corresponding response message.
[0092] The adaptation system sends the conversation message carrying the conversation context identifier to the intelligent robot system, and the intelligent robot system processes the conversation message carrying the conversation context identifier to obtain the corresponding response message. Specifically, the intelligent robot system can directly identify the conversation context identifier carried by the conversation message and find the conversation context information corresponding to the conversation context identifier. The intelligent robot system performs semantic analysis based on the conversation context information to obtain the corresponding response message, and returns the response message to the adaptation system. As a result, the third-party intelligent robot system only needs to identify the conversation context ID to determine whether it is the same conversation context, without having to save the entire conversation context information, which simplifies the complexity of the third-party intelligent robot system. Especially in the case of needing to connect to multiple third-party intelligent robot systems at the same time, it can avoid some unpredictable errors caused by different third-party robot systems having different standards for conversation context, so that each third-party intelligent robot can perform more accurate semantic analysis for different conversation contexts, achieve a more intelligent effect, and avoid the intelligent robot from giving irrelevant answers due to confusion of different conversations, thereby effectively improving the accuracy of the intelligent robot in processing conversation information.
[0093] In one embodiment, after returning the response message to the message system, the method further includes the step of sending a corresponding conversation message to the message recipient corresponding to the user identifier, specifically including:
[0094] The reply message is pushed to the conversation group corresponding to the conversation group identifier through the message system, and the corresponding conversation message is sent to the message recipient corresponding to the user identifier.
[0095] The intelligent robot system processes the conversation message that carries the conversation context identifier to obtain the corresponding response message. After the adaptation system returns the response message to the message system, the message system sends the corresponding conversation message to the message recipient corresponding to the user identifier. Specifically, after the adaptation system forwards the response message returned by the robot system to the message system, the message system can push the response message to the conversation group corresponding to the conversation group identifier, and send the corresponding conversation message to the message recipient corresponding to the user identifier. For example, after the adaptation system receives the response message from the intelligent robot, it organizes the message format and sends it to the message system. The message system finally pushes the response message of the intelligent robot to the corresponding multi-person group conversation, and @the corresponding message recipient. Figure 6BAs shown in the figure, the intelligent robot's reply message adopts the @receive method (with the previous conversation message attached). This method can well distinguish the independent conversation context information of each user in a multi-person conversation group. As a result, the robot's reply message can clearly show which message it is replying to and which user ID it is replying to, such as Figure 6B The figure shows a schematic diagram of the display interface of the conversation messages between users and robots in a conversation group. The display is clearer. At the same time, the adaptation system saves all conversation context information to the database and provides a function to query based on the conversation ID, which brings convenience to users.
[0096] It should be understood that although Figure 1 The steps in the flowchart of -6 are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 -At least part of the steps in 6 may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0097] In one embodiment, Figure 7 As shown, a conversation interaction device of an intelligent robot is provided, including: a receiving module 702, a sending module 704 and a processing module 706, wherein:
[0098] The receiving module 702 is used to receive a conversation message forwarded by a message system, where the conversation message is a conversation message sent by a user terminal to a robot in a conversation group.
[0099] The sending module 704 is used to determine the corresponding session context identifier according to the session group identifier, user identifier and robot identifier carried in the session message, and send the session message carrying the session context identifier to the intelligent robot system. The session context identifier has a mapping relationship with the multi-person session group identifier, user identifier and robot identifier information.
[0100] The processing module 706 is used to process the conversation message carrying the conversation context identifier through the intelligent robot system, obtain the corresponding response message, and return the response message to the message system.
[0101] In one embodiment, the device further includes: an acquisition module and a query module.
[0102] The acquisition module is used to obtain the server address where each intelligent robot is located, store the server address in the local database, and obtain the robot identifier carried in the session message. The query module is used to query the corresponding server address from the local database according to the robot identifier. The sending module is used to convert the format of the session message carrying the session context identifier, encrypt it, and send it to the server address.
[0103] In one embodiment, the device further includes: a combining module and a marking module.
[0104] The acquisition module is also used to acquire the conversation group identifier, user identifier and robot identifier information carried in the conversation message. The combination module is used to combine the identifier variables of the three dimensions of conversation group identifier, user identifier and robot identifier according to a preset rule to obtain an updated variable identifier. The marking module is used to mark the updated variable identifier as the corresponding conversation context identifier.
[0105] In one embodiment, the device further includes: a setting module and a detection module.
[0106] The setting module is used to set the expiration time corresponding to the session context identifier, and the expiration time is used to determine whether to update the session context identifier. The detection module is used to re-acquire the session message forwarded by the message system when it is detected that the session context identifier has expired, and generate a new session context identifier based on the identification information of multiple dimensions carried in the session message.
[0107] In one embodiment, the device further includes: a search module and an analysis module.
[0108] The search module is used to identify the session context identifier carried by the session message through the intelligent robot system, and find the session context information corresponding to the session context identifier. The analysis module is used to perform semantic analysis based on the session context information to obtain the corresponding response message.
[0109] In one embodiment, the sending module is further used to push the reply message to the conversation group corresponding to the conversation group identifier through the message system, and send the corresponding conversation message to the message recipient corresponding to the user identifier.
[0110] For the specific definition of the conversational interaction device of the intelligent robot, please refer to the definition of the conversational interaction method of the intelligent robot above, which will not be repeated here. Each module in the conversational interaction device of the above-mentioned intelligent robot can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0111] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the conversation interaction data of the intelligent robot. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a conversation interaction method of an intelligent robot is implemented.
[0112] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0113] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned method embodiments when executing the computer program.
[0114] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0115] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0116] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A conversation interaction method of an intelligent robot, the method comprising: Receiving a conversation message forwarded through a messaging system; The conversation message is a conversation message sent by the user terminal to the robot in the conversation group; Acquire the conversation group identifier, user identifier and robot identifier information carried in the conversation message; combine the identifier variables of the three dimensions of the conversation group identifier, the user identifier and the robot identifier according to a preset rule to obtain an updated variable identifier; mark the updated variable identifier as a corresponding conversation context identifier, and send the conversation message carrying the conversation context identifier to the intelligent robot system; The session context identifier has a mapping relationship with the session group identifier, the user identifier and the robot identifier information; the session context identifier is used to identify unique session context information, and the session context identifier changes with changes in the three dimensions of the session group identifier, the user identifier and the robot identifier; Setting an expiration time corresponding to the session context identifier, the expiration time being used to determine whether to update the session context identifier; when it is detected that the session context identifier has expired, reacquiring the session message forwarded through the message system; Generate a new session context identifier according to the identification information of multiple dimensions carried in the session message; The intelligent robot system processes the session message carrying the session context identifier or the session message carrying the new session context identifier to obtain a corresponding response message, formats the response message, and returns the formatted response message to the message system, so that the response message is displayed in the conversation group through the message system.
2. The method according to claim 1, characterized in that Before receiving the conversation message forwarded by the message system, the method further includes: Obtain the server address where each intelligent robot is located, and store the server address in a local database; The sending the conversation message carrying the conversation context identifier to the intelligent robot system includes: Obtaining the robot identifier carried in the conversation message; According to the robot identifier, query the corresponding server address from the local database; The session message carrying the session context identifier is format converted and encrypted, and then sent to the server address.
3. The method according to claim 1, characterized in that The processing of the session message carrying the session context identifier or the session message carrying the new session context identifier by the intelligent robot system to obtain a corresponding response message includes: Identifying the session context identifier carried by the session message through an intelligent robot system, and finding session context information corresponding to the session context identifier; A semantic analysis is performed according to the session context information to obtain a corresponding response message.
4. The method according to claim 1, characterized in that: After returning the response message to the message system, the method further includes: The response message is pushed to the conversation group corresponding to the conversation group identifier through the message system, and the corresponding conversation message is sent to the message recipient corresponding to the user identifier.
5. A conversation interaction system, characterized in that: include: A message system, used for receiving a conversation message; the conversation message is a conversation message sent by a user terminal to a robot in a conversation group; An adaptation system, used to obtain the conversation group identifier, user identifier and robot identifier information carried in the conversation message; According to a preset rule, the identification variables of the three dimensions of the conversation group identification, the user identification and the robot identification are combined to obtain an updated variable identification; the updated variable identification is marked as a corresponding conversation context identification, and the conversation message carrying the conversation context identification is sent to the intelligent robot system; The session context identifier has a mapping relationship with the session group identifier, the user identifier and the robot identifier information; the session context identifier is used to identify unique session context information, and the session context identifier changes with changes in the three dimensions of the session group identifier, the user identifier and the robot identifier; an expiration time corresponding to the session context identifier is set, and the expiration time is used to determine whether to update the session context identifier; when it is detected that the session context identifier has expired, reacquire the session message forwarded through the message system; Generate a new session context identifier according to the identification information of multiple dimensions carried in the session message; an intelligent robot system, configured to process the session message carrying the session context identifier or the session message carrying the new session context identifier, obtain a corresponding response message, and return the response message to the adaptation system; The adaptation system is further used to format the response message and return the formatted response message to the message system, so that the response message can be displayed in the conversation group through the message system.
6. A conversation interaction device for an intelligent robot, characterized in that: The device comprises: A receiving module, used for receiving a conversation message forwarded by a message system; the conversation message is a conversation message sent by a user terminal in a conversation group to a robot; A sending module, used to obtain the conversation group identifier, user identifier and robot identifier information carried in the conversation message; according to a preset rule, combine the identifier variables of the three dimensions of the conversation group identifier, the user identifier and the robot identifier to obtain an updated variable identifier; mark the updated variable identifier as a corresponding conversation context identifier, and send the conversation message carrying the conversation context identifier to the intelligent robot system; the conversation context identifier has a mapping relationship with the conversation group identifier, the user identifier and the robot identifier information; the conversation context identifier is used to identify unique conversation context information, and the conversation context identifier changes with the changes of the three dimensions of the conversation group identifier, the user identifier and the robot identifier; A setting module, used to set an expiration time corresponding to the session context identifier, wherein the expiration time is used to determine whether to update the session context identifier; A detection module, configured to reacquire the session message forwarded by the message system when detecting that the session context identifier has expired; and generate a new session context identifier according to the identification information of multiple dimensions carried in the session message; a processing module, configured to process the conversation message carrying the conversation context identifier or the conversation message carrying the new conversation context identifier through the intelligent robot system, obtain a corresponding response message, format the response message, and return the formatted response message to the message system, so that the response message can be displayed in the conversation group through the message system.
7. The conversation interaction device of the intelligent robot according to claim 6, characterized in that: The device also includes: A search module, configured to identify the session context identifier carried by the session message through an intelligent robot system, and search for session context information corresponding to the session context identifier; The analysis module is used to perform semantic analysis according to the session context information to obtain a corresponding response message.
8. The conversation interaction device of the intelligent robot according to claim 6, characterized in that: The sending module is further used to push the response message to the conversation group corresponding to the conversation group identifier through the message system, and send the corresponding conversation message to the message recipient corresponding to the user identifier.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
