A robot chat management method, device and medium

By constructing and optimizing the context information parameter list, it simulates the law of human forgetting, solves the problem of computer memory interfering with context analysis, improves the intelligence and communication efficiency of the robot chat system, and achieves more natural human-machine dialogue.

CN114661882BActive Publication Date: 2024-09-13INSPUR GENERSOFT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210327187.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2024-09-13
Estimated Expiration
2042-03-30

AI Technical Summary

Technical Problem

Natural language understanding technology based on deep machine learning is difficult to achieve contextual responses in human natural language habits, and the computer's memory ability causes historical memory to interfere with current context analysis, resulting in unexpected judgments.

Method used

By obtaining user chat information, analyzing information related to target intentions, constructing short-term and long-term context information parameter lists, setting weights and optimizing according to human forgetting rules, a response context is generated that responds to user chat information.

Benefits of technology

The robot chat system is optimized, simulating the rules of human memory and forgetting, giving priority to chat context judgments that are consistent with recent conversation background information, improving the robot's intelligence level and communication efficiency, and creating a more natural human-machine dialogue effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114661882B
    Figure CN114661882B
Patent Text Reader

Abstract

The present invention proposes a robot chat management method, including: obtaining user chat information, analyzing information related to target intent in the user chat information; constructing multiple parameter lists according to information related to target intent, user chat information and information of the user; generating a context in response to the user chat information based on multiple parameter lists. The robot chat management method provided by the present invention can effectively optimize the robot chat system based on the human forgetting law, and realize the weight sorting of the current chat session background information by the machine by simulating the human memory forgetting law, so as to give priority to making chat context judgments that are consistent with the recent session background information, forming a natural communication effect closer to the dialogue between people, and improving the robot's intelligence level and communication efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer machine learning, and in particular to a robot chat management method, device and medium. Background Art

[0002] At present, natural language understanding technology based on deep machine learning can already achieve semantic understanding of a single question. In order to achieve a response that is more in line with human natural language habits, it is necessary to combine the context of the current conversation to obtain richer information to determine which of the multiple possible answers is more in line with the current context. On the other hand, because the memory capacity of computer software is different from that of the human brain, most situations will be permanently recorded. Too much historical memory interferes with the analysis and understanding of the current context, forming unexpected judgments. Summary of the invention

[0003] To solve the above problems, the present invention proposes a robot chat management method, comprising:

[0004] Obtaining user chat information, and analyzing information related to the target intention in the user chat information;

[0005] Constructing a plurality of parameter lists according to the information related to the target intent, the user chat information, and the user information;

[0006] A response context is generated based on the multiple parameter lists to respond to the user chat message.

[0007] In some embodiments of the present invention, constructing multiple parameter lists according to the information related to the target intent, the user chat information, and the user information includes:

[0008] Analyzing the information related to the target intention based on natural language processing, and extracting information parameters from the information;

[0009] Establishing a short-term context information parameter list and a background information parameter list based on the information parameters; and

[0010] A target intent list is constructed using the information parameters and the short-term context information parameter list.

[0011] In some embodiments of the invention, the method further comprises:

[0012] Recording the appearance time of the information parameters in the short-term context information parameter list, setting a weight for each information parameter, and setting a change rate of the weight over time;

[0013] In response to the presence of a corresponding information parameter in the user chat information, the weight of the information parameter in the short-term context information parameter list is updated.

[0014] In some embodiments of the invention, the method further comprises:

[0015] Establish a long-term context information parameter list, merge the short-term context information parameter list into the long-term context information parameter list at the end of each user chat, and increase the reference count of the repeated information parameter by 1;

[0016] In response to the change in the reference count of the information parameter, the change rate of the weight of the information parameter is simultaneously modified.

[0017] In some embodiments of the invention, the method further comprises:

[0018] Determining whether a reference count of an information parameter in the long-term context information parameter list is greater than a predetermined value;

[0019] In response to a reference count of an information parameter in the long-term context information parameter list being greater than a predetermined value, the information parameter is added to the background information parameter list and marked.

[0020] In some embodiments of the invention, the method further comprises:

[0021] classifying the information parameters, and adding classification information of the information parameters to the plurality of parameter lists;

[0022] A response context for responding to the user chat message is generated according to the classification information of the message parameters.

[0023] In some embodiments of the invention, the method further comprises:

[0024] Analyzing classification information of the information parameters in the plurality of parameter lists, and associating information parameters of the same classification;

[0025] In response to any one of the information parameters belonging to the same classification association relationship appearing in the new chat information, the weights of all the information parameters belonging to the same classification association relationship in the multiple parameter lists are updated.

[0026] In some embodiments of the present invention, generating a response context in response to the user chat information based on the multiple parameter lists includes:

[0027] Generate multiple context information based on the information parameters in the target intent list, and modify the target intent based on the user's subsequent chat information.

[0028] Another aspect of the present invention further provides a computer device, comprising:

[0029] at least one processor; and

[0030] A memory, wherein the memory stores computer instructions that can be executed on the processor, and when the instructions are executed by the processor, the steps of the method described in any one of the above-mentioned embodiments are implemented.

[0031] Another aspect of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the methods described in the above-mentioned embodiments are implemented.

[0032] Through the robot chat management method provided by the present invention, the robot chat system based on the human forgetting law can be effectively optimized. By simulating the human memory forgetting law, the machine can weight the background information of the current chat session, thereby giving priority to making chat context judgments that are consistent with the recent session background information, forming a natural communication effect that is closer to the conversation between people, and improving the intelligence level and communication efficiency of the robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0034] Figure 1 A flowchart of an embodiment of a robot chat management method provided by an embodiment of the present invention;

[0035] Figure 2 A structural diagram of a computer device provided by an embodiment of the present invention;

[0036] Figure 3 A schematic diagram of the structure of a readable storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0037] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0038] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. The subsequent embodiments will not explain this one by one.

[0039] like Figure 1As shown, the present invention proposes a robot chat management method, comprising:

[0040] Step S1, obtaining user chat information, and analyzing information related to the target intention in the user chat information;

[0041] Step S2: construct multiple parameter lists according to the information related to the target intention, the user chat information and the user information;

[0042] Step S3: generating a response context in response to the user chat information based on the multiple parameter lists.

[0043] In an embodiment of the present invention, in step S1, based on the form of establishing a chat with the user, the chat content text sent by the user is obtained, and the chat content is analyzed by a natural language processing model to analyze the chat content to obtain information that can represent the purpose and intention that the user wants to express. In most cases, this information is the keywords in the chat content text given by the user during the chat process.

[0044] In some embodiments of the present invention, the intention information that can represent the purpose that the user wants to express may not be in the chat content text given by the user. For example, some chat content with metaphorical nature and the user's emotional state obtained by analyzing the user's chat content are not the chat content given by the user during the chat process. Therefore, the information that can represent the purpose and intention that the user wants to express is not limited to the chat content given by the user during the chat process.

[0045] In step S2, the information obtained by analyzing the above steps and representing the intention of the purpose that the user wants to express is saved, and multiple parameter lists are established as the "memory" of the chat robot based on the information of the intention of the purpose that the user wants to express obtained by analyzing the natural language processing model as needed.

[0046] In step S3, based on the corresponding information in the multiple parameter lists as the "memory" of the chat robot established in step S2, a response context for responding to the user's chat content is generated through a natural language model.

[0047] In some embodiments of the present invention, constructing multiple parameter lists according to the information related to the target intent, the user chat information, and the user information includes:

[0048] Analyzing the information related to the target intention based on natural language processing, and extracting information parameters from the information;

[0049] Establishing a short-term context information parameter list and a background information parameter list based on the information parameters; and

[0050] A target intent list is constructed using the information parameters and the short-term context information parameter list.

[0051] In this embodiment, the above information related to the target intent is further analyzed by the corresponding natural language model to obtain corresponding information parameters. The information parameters may be corresponding keywords in the user chat context, just as different chat environments or topics have different keywords. Information parameters refer to one or more keywords that can replace the chat topic and the user's purpose. As mentioned above, some keywords may not be the text output by the user in the chat, but the classification or label generated by the natural language model for the user's current state, emotion or purpose according to the content of the user's chat context.

[0052] Specifically, a short-term context information parameter list is established based on the information parameters obtained from the analysis. The short-term context information parameter list is a list used to record the main content of the current conversation between the robot and the user. It is created when the conversation begins and all information parameters about the conversation during the current conversation are saved in the short-term context parameter list.

[0053] In addition, the information parameters obtained through analysis and / or the information parameters in the short-term context information parameter list are added to the background information parameter list. The background information parameter list is a collection of information parameters related to the user. The information parameters in the background information parameter list may not be in the current chat content, that is, they are not the topics discussed in the current chat content. It is a list collection of information parameters that are permanently saved for different users. Specifically, it includes parameter information closely related to the user identity, such as name, gender, age, phone number, email address, and common address.

[0054] In particular, in some other embodiments, information parameters that appear frequently in the short-term context information parameter list are also added to the background information parameter list to specially mark the user's cognitive or knowledge background.

[0055] Furthermore, a target intent list is constructed based on the information parameters obtained from the analysis. The target intent list is the key to directly generating the conversation content of the robot's reply to the user. That is, the information parameters of the target intent list are input into the natural language model, and the natural language model outputs the corresponding words to reply to the user.

[0056] In some embodiments of the invention, the method further comprises:

[0057] Recording the appearance time of the information parameters in the short-term context information parameter list, setting a weight for each information parameter, and setting a change rate of the weight over time;

[0058] In response to the presence of a corresponding information parameter in the user chat information, the weight of the information parameter in the short-term context information parameter list is updated.

[0059] In this embodiment, the short-term context information parameter list is empty in the initial state, or when the user initiates a corresponding conversation. The analyzed information parameters are added to the short-term context information parameter list only after the user's conversation content is analyzed. When adding information parameters to the short-term context list, it is also necessary to attach a weight to the information parameters to be added to the short-term context list. The weight is a robot simulation indicating the memory strength of the information parameter in the user's memory.

[0060] Furthermore, if the user mentions the same sentences or words again during the chat, the weights of these sentences or words in the short-term context list will be updated.

[0061] It should be noted that the robot chat management method proposed in the present invention will also perform an abstract analysis on the user's chat content through a natural language processing model to generate corresponding information parameters that do not exist in the chat content. For example, if the time when the user initiates the chat or the chat content involves diet-related content, such as mentioning a variety of dish names or food names, or if it is meal time according to the human schedule, and the user does not propose clear words such as ordering meals, then diet-related information parameters such as ordering meals will be generated; or if the user is very negative in the chat content, and the chat content involves purchasing dangerous drugs or asking about suicidal tendencies, then a corresponding negative state and a label with suicidal tendencies will be generated. When the robot generates a response context, it should generate corresponding enlightening words or, in serious cases, perform corresponding protective measures according to the user's contact information, address, and the contact information of the user's relatives and friends in the background information parameter list, such as sending information to the user's relatives and friends to tell them that the user's current state of mind is more dangerous. If necessary, an alarm will be issued based on the user's address.

[0062] In some embodiments of the invention, the method further comprises:

[0063] Establish a long-term context information parameter list, merge the short-term context information parameter list into the long-term context information parameter list at the end of each user chat, and increase the reference count of the repeated information parameter by 1;

[0064] In response to the change in the reference count of the information parameter, the change rate of the weight of the information parameter is simultaneously modified.

[0065] In this embodiment, the robot chat management method proposed by the present invention also creates a long-term context information parameter list for storing the user's cognitive scope or cognitive level. Specifically, at the end of each session with the user, the data in the short-term context information parameter list is merged into the long-term context information parameter list. For information parameters that already exist in the long-term context information parameter list, a reference count is added to the information parameter. When the information parameter exists in both the long-term and short-term context information parameter lists, the reference count of the information parameter in the long-term context information parameter list is increased by 1.

[0066] In addition, the present invention also optimizes the rate of change of the weight of the information parameter, and adjusts the rate of change of the weight of the information parameter by the reference count of the corresponding information parameter. The rate of change of the weight refers to the change of the corresponding information in the user's long-term memory. For example, watermelon, these words with seasonal changes or periodic changes are also deeply remembered in certain scenes in life. If it is summer, watermelon will be strengthened in people's memory as watermelon is more common in reality. But in winter, the memory of watermelon or the memory of its taste will disappear for most people. Therefore, when the weight becomes 0 or is lower than a certain value, we assume that the user cannot remember it. For example, in winter, if it is not seeing watermelon or being prompted by others or the environment, it is impossible for most people to think of watermelon.

[0067] In order to better fit people's thinking habits, the change of the reference count of the corresponding information parameter in the long-term context information parameter list is transformed or converted to the weight change rate of the corresponding information parameter. When the reference count increases or the value of the reference count is very high, the weight change rate of the information parameter is at a lower level. That is, users tend to forget the meaning of the information parameter.

[0068] In some embodiments of the present invention, the weight change rate of the information parameter will change with the value of the weight change rate itself. Assuming that the weight change rate of watermelon is 0.1 and the weight value is 1, and assuming that there is no reminder of watermelon, every day, the weight value of watermelon is equal to the current value minus the product of the weight change rate and the current value, that is, 1-0.1*1=0.9. If we follow the linear change thinking, it will take 10 days for the user to have forgotten about watermelon (will not actively mention it). However, in some embodiments of the present invention, linear change is not adopted. Instead, when the weight value is lower than a certain value, the weight change rate is increased. For example, when the weight of watermelon is 0.5, its weight change rate is 0.15.

[0069] In some embodiments of the invention, the method further comprises:

[0070] Determining whether a reference count of an information parameter in the long-term context information parameter list is greater than a predetermined value;

[0071] In response to a reference count of an information parameter in the long-term context information parameter list being greater than a predetermined value, the information parameter is added to the background information parameter list and marked.

[0072] In this embodiment, the reference count of the information parameter in the long-term context information parameter list is judged, and if the reference count value of a certain information parameter reaches a preset threshold, the information parameter is added to the background information parameter list. At the same time, the information parameter added to the background information parameter list is marked in the background information parameter list to distinguish it from the background information parameter originally set to represent the user background information.

[0073] In some embodiments of the invention, the method further comprises:

[0074] classifying the information parameters, and adding classification information of the information parameters to the plurality of parameter lists;

[0075] A response context for responding to the user chat message is generated according to the classification information of the message parameters.

[0076] In this embodiment, the information parameters in the above-mentioned multiple parameter lists: short-term context parameter list, long-term context parameter list, background information parameter list, and target intent information list are further classified, and the classification information is added to the corresponding information parameters in the above-mentioned multiple parameter lists.

[0077] In addition, classification can be multi-dimensional, such as classification based on the field or purpose represented by the information parameter. This classification method is a classification method that distinguishes the topics or fields of the chat dialogue. For example, if most of the information parameters in the chat context are related to food, then the classification of some information parameters in the current chat is "food". If tourist attractions appear in the chat context, the classification of the information parameters extracted or analyzed based on the chat context is "tourism". This classification is based on the field of the information parameter.

[0078] Furthermore, the classification can also be safety-oriented. For example, when some dangerous words appear in the chat context, or the potential intention of the chat context content implies danger, for example, when the user outputs the content asking how to deal with animal cuticles or dissolve bones effectively, and these problems may involve corresponding personal safety issues, the corresponding information parameters in the chat context of the current user are classified as "dangerous" from a safety perspective. When the robot generates a corresponding response through a natural language model, it chooses not to respond or provide a corresponding method answer, and does not perform the corresponding auxiliary operation, which means assisting in the purchase of corresponding reagents.

[0079] In addition, the classification can also be based on the user's personal cognition or personal privacy. When classifying personal cognition or personal privacy, the scope of this classification will be set in advance, that is, the content related to the corresponding information parameters will be marked as personal cognition or personal privacy classification.

[0080] Furthermore, for information parameters classified as personal privacy, the chat context involving personal privacy will not be used to train the natural language model. This is because most chat robots have learning capabilities and will learn the corresponding reply methods from the user's chat information. For example, a company's intelligent robot model learned to curse during a public network test. Therefore, the robot chat management method proposed in the present invention will not use the information parameters classified as involving personal privacy as the training content of the natural language model. And when generating the corresponding reply content involving privacy, it will also follow the content learned from the relevant topics of other users to reply.

[0081] In addition, corresponding to the security classification of the information parameters, a corresponding response mechanism is selectively generated according to the user's role information. If the person talking to the robot is a policeman or other security personnel, then the user conversation involves security, and the natural language model will be allowed to generate corresponding response content based on the above information parameters to reply to the user.

[0082] In some embodiments of the present invention, the classification of information parameters also includes classification according to different industry fields and professional levels, or classification based on personal cognitive levels, and the user can choose whether to disclose the classified information parameters to the public.

[0083] In some embodiments of the invention, the method further comprises:

[0084] Analyzing classification information of the information parameters in the plurality of parameter lists, and associating information parameters of the same classification;

[0085] In response to any one of the information parameters belonging to the same classification association relationship appearing in the new chat information, the weights of all the information parameters belonging to the same classification association relationship in the multiple parameter lists are updated.

[0086] In this embodiment, when the corresponding information parameters are analyzed from the user chat content, if there are other parameters with the same classification under the information parameter classification in the chat process or in the chat content within a period of time, then when the weight of the information parameter is updated, the weights of other information parameters of the same classification are also updated at the same time.

[0087] In some embodiments of the present invention, the update of the weight change rate of the information parameter is different from the update of the weights of other information parameters related to the information parameter. The updated value of the weight of the information parameter is greater than the updated value of the weight of the information parameter of the same category related to it.

[0088] In some embodiments of the present invention, generating a response context in response to the user chat information based on the multiple parameter lists includes:

[0089] Generate multiple context information based on the information parameters in the target intent list, and modify the target intent based on the user's subsequent chat information.

[0090] In this embodiment, the information parameters in the target intent list also have weights, and the weights can be inherited by the information parameters in the long-term context parameter list or the short-term context parameter list. That is, when the information parameters to achieve the target intent are insufficient and it is necessary to supplement the information parameters from the short-term context parameter list or the long-term context parameter list, the weights of the corresponding information parameters in the short-term context parameter list or the long-term context parameter list will be inherited at the same time.

[0091] The information parameters in the target intent list are the key to directly generating the reply to the user's chat content or performing the corresponding operation. Therefore, when the information parameters in the target intent list can generate multiple response contexts, the multiple response contexts are generated according to the weight sorting of the information parameters in the target intent list, and the response context generated by the information parameter with the highest weight is sent to the user. At the same time, the correctness of the sent response context is determined based on the user's reply content in the subsequent chat content.

[0092] In some embodiments of the present invention, when a corresponding response context is generated by multiple information parameters, the weights of the multiple information parameters are added as a comprehensive weight value, and the generated response context with the highest comprehensive weight value is sent to the user or a corresponding operation is performed.

[0093] like Figure 2 As shown, another aspect of the present invention further provides a computer device, comprising:

[0094] at least one processor 21; and

[0095] The memory 22 stores computer instructions 23 executable on the processor, and the instructions 23, when executed by the processor, implement the steps of any one of the methods described in the above-mentioned embodiments.

[0096] like Figure 3As shown, another aspect of the present invention further provides a computer-readable storage medium 401, wherein the computer-readable storage medium 401 stores a computer program 402, and when the computer program 402 is executed by a processor, the steps of any one of the methods described in the above-mentioned embodiments are implemented.

[0097] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.

[0098] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.

[0099] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0100] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0101] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the embodiments of the present invention as described above, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.

Claims

1. A robot chat management method, characterized in that: include: Obtaining user chat information, and analyzing information related to the target intention in the user chat information; Constructing multiple parameter lists according to the information related to the target intention, the user chat information and the user information, saving and analyzing the information that can represent the intention of the purpose that the user wants to express, and establishing multiple parameter lists according to the information of the intention of the purpose that the user wants to express by analyzing the natural language processing model as needed, the steps include: analyzing the information related to the target intention based on natural language processing, and extracting information parameters in the information; Establishing a short-term context information parameter list and a background information parameter list based on the information parameters; and Building a target intention list through the information parameters and the short-term context information parameter list; Recording the appearance time of the information parameters in the short-term context information parameter list, setting a weight for each information parameter, and setting a change rate of the weight over time; In response to the presence of a corresponding information parameter in the user chat information, updating the weight of the information parameter in the short-term context information parameter list; Establish a long-term context information parameter list, merge the short-term context information parameter list into the long-term context information parameter list at the end of each user chat, and increase the reference count of the repeated information parameter by 1; In response to a change in a reference count of the information parameter, simultaneously modifying a rate of change of a weight of the information parameter; Determining whether a reference count of an information parameter in the long-term context information parameter list is greater than a predetermined value; In response to a reference count of an information parameter in the long-term context information parameter list being greater than a predetermined value, adding the information parameter to the context information parameter list and marking the information parameter; Classifying the information parameters, and adding the classification information of the information parameters to the plurality of parameter lists, and not using the classified information parameters involving personal privacy as training content of the natural language model; and when generating corresponding reply content involving privacy, the reply will also be based on the content not learned from the relevant topics of other users; Generating a response context for responding to the user chat message according to the classification information of the message parameters; Analyzing classification information of the information parameters in the plurality of parameter lists, and associating information parameters of the same classification; In response to any one of the information parameters belonging to the same classification association relationship appearing in the new chat information, updating the weights of all the information parameters belonging to the same classification association relationship in the plurality of parameter lists; A response context is generated based on the multiple parameter lists in response to the user's chat information, multiple context information is generated according to the information parameters in the target intent list, and the target intent is modified according to the user's subsequent chat information.

2. A computer device, characterized in that: include: at least one processor; as well as A memory storing computer instructions executable on the processor, wherein the instructions implement the steps of the method according to claim 1 when executed by the processor.

3. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 1 are implemented.