Human-computer interaction method and device, equipment, storage medium and program product

By updating the dialogue path tree to record interaction content and intent during human-computer dialogue, and determining whether the current interaction intent is abnormal, the problem of abnormal output information in large user-guided models is solved, thus improving security and visualization.

CN121660090APending Publication Date: 2026-03-13BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-09
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

During human-computer dialogue, users may unintentionally or intentionally guide the large model to output sensitive information, information that violates policies, information that is biased, or harmful information, leading to adverse effects.

Method used

By updating the dialogue path tree after each round of interaction, the interaction content and intent are recorded, and it is determined whether the current interaction intent is abnormal. If it is normal, the large model is called to process the user input; otherwise, the response is prohibited to avoid abnormal information output.

Benefits of technology

This effectively avoids users gradually guiding large models to output abnormal information, improves the ability to detect potential security threats and abnormal behaviors, and enhances the visualization and backtracking capabilities of human-computer dialogue.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121660090A_ABST
    Figure CN121660090A_ABST
Patent Text Reader

Abstract

The invention discloses a man-machine interaction method and device, equipment, a storage medium and a program product, and relates to the technical field of artificial intelligence, and the method comprises the steps: updating a dialogue path tree after interaction of each interaction round, so as to record the change conditions of the interaction content and the interaction intention of each interaction round, and based on this, the dialogue path tree is updated; after user input information of a current interaction round is received, an updated dialogue path tree after interaction of a previous interaction round is obtained, and under the condition that an interaction intention of the previous interaction round is a normal intention, the dialogue path tree is updated based on the user input information of the current interaction round and historical interaction content recorded by a target path in the dialogue path tree. Determining an interaction intention of the current interaction round; if the interaction intention of the current interaction round is normal, calling a large model to process the user input information and historical interaction content so as to generate reply information; otherwise, prohibiting calling the large model to reply the user input information, and preventing the user from gradually guiding the large model to output abnormal information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a human-computer interaction method, apparatus, device, storage medium, and program product. Background Technology

[0002] With the development of artificial intelligence, the application of human-computer dialogue systems based on large models is becoming more and more widespread. However, during the human-computer dialogue process, users may intentionally or unintentionally guide the large model to output abnormal information, such as sensitive information, information that violates specific policies, biased information, harmful information, etc., which may have adverse effects.

[0003] Therefore, how to prevent users from gradually guiding the large model to output abnormal information during human-computer interaction has become an urgent technical problem to be solved. Summary of the Invention

[0004] In view of the above problems, this application provides a human-computer interaction method, apparatus, device, storage medium, and program product, the specific solutions of which are as follows:

[0005] The first aspect of this application provides a human-computer interaction method, wherein each round of interaction includes:

[0006] Receive user input information for the current interaction round;

[0007] Obtain the updated dialogue path tree after the previous interaction round. Different non-root nodes in the dialogue path tree are used to record the interaction content and interaction intent of different historical interaction rounds. Two consecutive historical interaction rounds with the same interaction intent correspond to parent and child nodes in the dialogue path tree, and two consecutive historical interaction rounds with different interaction intents correspond to different child nodes of the same parent node. The interaction intent of the previous interaction round in the dialogue path tree is a normal intent or an abnormal intent, and the interaction intent of other interaction rounds in the dialogue path tree other than the previous interaction round is a normal intent.

[0008] If the interaction intent of the previous interaction round is a normal intent, the interaction intent of the current interaction round is determined based on the user input information of the current interaction round and the historical interaction content recorded in the target path in the dialogue path tree; the target path is the path in the dialogue path tree that includes the node corresponding to the previous interaction round.

[0009] If the interaction intent of the current interaction round is a normal intent, the large model is invoked to process the interaction content of at least a portion of the historical interaction rounds recorded in the dialogue path tree and the user input information to generate the response information for the current interaction round; otherwise, the large model is prohibited from responding to the user input information.

[0010] One possible implementation also includes:

[0011] Add the node that records the interaction content and interaction intent of the current interaction round to the dialogue path tree.

[0012] In one possible implementation, adding the node that records the interaction content and interaction intent of the current interaction round to the dialogue path tree includes:

[0013] If the interaction intent of the current interaction round is the same as the interaction intent of the previous interaction round, the node that records the interaction content and interaction intent of the current interaction round will be added to the dialogue path tree as a child node of the node corresponding to the previous interaction round.

[0014] If the interaction intent of the current interaction round is different from that of the previous interaction round, the parent node of the node corresponding to the previous interaction round is determined as the target node, and the node that records the interaction content and interaction intent of the current interaction round is added as the child node of the target node to the dialogue path tree.

[0015] One possible implementation also includes:

[0016] If the interaction intent of the previous interaction round is an abnormal intent, the interaction intent of the current interaction round is determined based on the user input information of the current interaction round.

[0017] If the interaction intent of the current interaction round is a normal intent, the large model is invoked to process the user input information to generate the response information for the current interaction round; otherwise, the large model is prohibited from responding to the user input information.

[0018] One possible implementation also includes:

[0019] If the interaction intent of the previous interaction round is an abnormal intent, create a new root node for the dialogue path tree.

[0020] The node that records the interaction content and interaction intent of the current interaction round is added as a child node of the newly created dialogue path tree as the root node.

[0021] In one possible implementation, determining the interaction intent for the current interaction round based on the user input information of the current interaction round includes:

[0022] Add the user input information of the current interaction round to the first prompt word template to obtain the first target prompt word;

[0023] Input the first target prompt word into the large model to obtain the interaction intent of the current interaction round output by the large model.

[0024] In one possible implementation, the interaction intent for the current interaction round is determined based on the user input information of the current interaction round and the historical interaction content recorded by the target path, including:

[0025] Add the user input information of the current interaction round and the historical interaction content recorded in the target path to the second prompt word template to obtain the second target prompt word;

[0026] Input the second target prompt word into the large model to obtain the interaction intent of the current interaction round output by the large model.

[0027] A second aspect of this application provides a human-computer interaction device, comprising: a receiving module, a dialogue path tree acquisition module, an intent recognition module, and a response module; wherein the human-computer interaction device performs the following during each round of interaction:

[0028] The receiving module is used to receive user input information for the current interaction round;

[0029] The dialogue path tree acquisition module is used to obtain the updated dialogue path tree after the previous interaction round. Different non-root nodes in the dialogue path tree are used to record the interaction content and interaction intent of different historical interaction rounds. Two consecutive historical interaction rounds with the same interaction intent correspond to parent and child nodes in the dialogue path tree, and two consecutive historical interaction rounds with different interaction intents correspond to different child nodes of the same parent node. The interaction intent of the previous interaction round in the dialogue path tree is a normal intent or an abnormal intent, and the interaction intent of other interaction rounds in the dialogue path tree other than the previous interaction round is a normal intent.

[0030] The intent recognition module is used to determine the interaction intent of the current interaction round based on the user input information of the current interaction round and the historical interaction content recorded in the target path in the dialogue path tree if the interaction intent of the previous interaction round is a normal intent; the target path is a path in the dialogue path tree that includes the node corresponding to the previous interaction round.

[0031] The response module is used to, if the interaction intent of the current interaction round is a normal intent, call the large model to process at least a portion of the historical interaction content recorded in the dialogue path tree and the user input information to generate response information for the current interaction round; otherwise, it prohibits calling the large model to respond to the user input information.

[0032] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the human-computer interaction method described in the first aspect or any implementation thereof.

[0033] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:

[0034] The memory is used to store computer programs;

[0035] The processor is used to execute the computer program so that the electronic device can implement the human-computer interaction method of the first aspect or any implementation thereof.

[0036] The fifth aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to perform a human-computer interaction method as described in the first aspect or any implementation thereof.

[0037] Using the above technical solution, the human-computer interaction method, apparatus, device, storage medium, and program product provided in this application update the dialogue path tree after each interaction round. Different non-root nodes in the dialogue path tree record the interaction content and intentions of different historical interaction rounds. Two consecutive historical interaction rounds with the same intention correspond to parent-child nodes in the dialogue path tree, while two consecutive historical interaction rounds with different intentions correspond to different child nodes of the same parent node. The interaction intention recorded in the dialogue path tree for the previous interaction round is either a normal or abnormal intention, while the interaction intentions for other interaction rounds are normal intentions. Based on this, when receiving user input for the current interaction round... After obtaining the information, the updated dialogue path tree after the previous interaction round is retrieved. If the interaction intent of the previous interaction round is a normal intent, the interaction intent of the current interaction round is determined based on the user input information of the current interaction round and the historical interaction content recorded in the target path in the dialogue path tree. The target path is the path in the dialogue path tree that includes the node corresponding to the previous interaction round. If the interaction intent of the current interaction round is a normal intent, the large model is invoked to process the user input information and at least part of the interaction content of the historical interaction rounds recorded in the dialogue path tree to generate the response information for the current interaction round. Otherwise, the large model is prohibited from responding to the user input information. When the interaction intent of previous interaction rounds is normal, this application does not only consider the input of the current interaction round when judging the interaction intent of the current interaction round, but also considers the historical interaction content recorded on the path of the dialogue path tree, including the node corresponding to the previous interaction round. Based on the above historical interaction content, it judges whether the interaction intent of the current interaction round is abnormal, that is, whether the user is gradually guiding the large model to output abnormal information. Therefore, if the interaction intent of the current interaction round is abnormal, it prohibits replying to the user, thereby preventing the user from gradually guiding the large model to output abnormal information. Attached Figure Description

[0038] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0039] Figure 1 A flowchart illustrating an implementation of the human-computer dialogue method provided in this application;

[0040] Figure 2 A flowchart for determining the interaction intent of the current interaction round based on user input information of the current interaction round and historical interaction content recorded by the target path, as provided in this application;

[0041] Figure 3An example diagram of the dialogue path tree provided for this application;

[0042] Figure 4 Another example diagram of a dialogue path tree provided for this application;

[0043] Figure 5 A schematic diagram of a human-computer interaction device provided in this application;

[0044] Figure 6 A schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation

[0045] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0046] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0047] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0048] Currently, large-model-based dialogue systems are widely used in various fields, such as customer service, virtual assistants, educational tutoring, medical consultation, and smart homes. In these application scenarios, dialogue systems need to engage in multi-turn interactions with users. During each round of interaction, the dialogue system can invoke a large model to respond to user input in order to handle complex information exchanges.

[0049] Current large-scale models can handle longer contexts, enabling them to maintain topic coherence and understand contextual information in multi-turn dialogues. However, long context windows also bring other problems. For example, users may intentionally or unintentionally obtain sensitive information from the large model or mislead it into generating inappropriate content through multiple rounds of dialogue and guidance. In such cases, each individual interaction may appear normal, but the final result could be that the large model outputs sensitive information. This is usually because the large model gradually loses strict control over the context over multiple rounds of dialogue, thus triggering potential security risks. Specific manifestations may include, but are not limited to:

[0050] Information leakage: Users induce large models to disclose internal information, sensitive data, or information that violates privacy policies through multiple rounds of dialogue.

[0051] Content bias: As users continuously adjust their input, the model is gradually guided to generate inappropriate, biased, or harmful content.

[0052] To avoid users gradually guiding large models to output abnormal information, this application proposes a solution.

[0053] like Figure 1 The diagram shown is a flowchart of one implementation of the human-computer dialogue method provided in this application, which may include:

[0054] Step S101: Receive user input information for the current interaction round.

[0055] Human-computer interaction typically involves multiple interaction rounds. Each round consists of a question and an answer; that is, each round receives a user question (the question the user inputs into the dialogue system) and outputs a machine answer (the machine provides a response to the user's input question, also known as an answer). The question the user inputs into the dialogue system is the user input information.

[0056] The user input information in the current interaction round can be the information entered by the user during the first interaction with the dialogue system, or the information entered by the user during subsequent interactions with the dialogue system.

[0057] Optionally, it can receive voice data input by the user, perform speech recognition on the voice data, and obtain text as user input information.

[0058] Optionally, it can accept text input by the user as user input information.

[0059] Optionally, it can receive images input by the user, perform text recognition on the images, and obtain the text as user input information.

[0060] Step S102: Obtain the updated dialogue path tree after the previous round of interaction.

[0061] Different non-root nodes in the dialogue path tree are used to record the interaction content and interaction intent of different historical interaction rounds. Two consecutive historical interaction rounds with the same interaction intent correspond to parent and child nodes in the dialogue path tree, and two consecutive historical interaction rounds with different interaction intents correspond to different child nodes of the same parent node. The interaction intent of the previous interaction round recorded in the dialogue path tree is a normal intent or an abnormal intent. The interaction intent of other interaction rounds in the dialogue path tree (i.e., non-previous interaction rounds, that is, interaction rounds before the previous interaction round) is a normal intent.

[0062] Interaction intent refers to user intent, which can include, but is not limited to, any of the following: information retrieval, task execution, entertainment interaction, problem solving, emotional expression, and sensitive intent. Among these, information retrieval, task execution, entertainment interaction, problem solving, and emotional expression are considered normal intents, while sensitive intents are considered abnormal intents.

[0063] In other words, in a dialogue path tree, only the last added leaf node records an interaction intent that could be either a normal intent or an abnormal intent; all other non-root nodes record normal intents. The same dialogue path tree records the interaction content of consecutive historical interaction rounds. Assuming a dialogue path tree records the interaction content and intent of N consecutive historical interaction rounds, the interaction intents of the first N-1 rounds are all normal intents, while the interaction intent of the Nth round could be either a normal intent or an abnormal intent.

[0064] This application updates the dialogue path tree after each round of human-computer interaction (i.e., after each round of interaction). This update can be adding new nodes to the existing dialogue path tree or creating a new dialogue path tree. Therefore, the dialogue path tree updated after two consecutive human-computer interactions can be the same dialogue path tree (with the same root node) or different dialogue path trees (with different root nodes).

[0065] If the current interaction round is the first interaction between the user and the dialogue system, that is, the current interaction round is the first interaction round, then the dialogue path tree updated after the previous interaction round refers to the initial dialogue path tree, that is, it only contains the root node of the dialogue path tree. In this case, the interaction intent of the previous interaction round recorded by the dialogue path tree is considered to be a normal intent.

[0066] Step S103: Determine the interaction intent of the current interaction round: If the interaction intent of the previous interaction round is a normal intent, determine the interaction intent of the current interaction round based on the user input information of the current interaction round and the historical interaction content recorded in the target path in the dialogue path tree; the target path is the path in the dialogue path tree that includes the node corresponding to the previous interaction round.

[0067] In other words, if the interaction intent of the previous interaction round recorded in the dialogue path tree is normal, the interaction intent of the current interaction round is determined based on the user input information of the current interaction round, the interaction content of the previous interaction round, and the interaction content stored in each node on the same path as the node corresponding to the previous interaction round. Since the historical interaction content on the same path is taken into account, the interaction intent of the current interaction round reflects the interaction intent of the multi-turn dialogue. This can accurately identify whether the user is gradually guiding the large model to output abnormal information.

[0068] Step S104: Call the large model to respond to the user based on the dialogue path tree: If the interaction intent of the current interaction round is a normal intent, call the large model to process the user input information and at least part of the historical interaction content recorded in the dialogue path tree to generate the response information for the current interaction round; if the interaction intent of the current interaction round is an abnormal intent, it is prohibited to call the large model to respond to the user input information.

[0069] The large model in this application can be a large language model (LLM) or a multimodal large model (MLLM), etc. The response information generated by the large model can be text information, image information, or both text information and image information.

[0070] Optionally, if the interaction intent in the previous interaction round is a normal intent, and if the current interaction round is the first interaction round, then the dialogue path tree updated after the interaction in the previous interaction round is the initial dialogue path tree. Therefore, the historical interaction content is empty, that is, there is no historical interaction content, and the user is only responded to based on the user input information in the current interaction round.

[0071] Optionally, if the interaction intent of the previous interaction round was a normal intent, and if the current interaction round is not the first interaction round, it can be determined whether the total length of the user input information of the current interaction round and the historical interaction content of each historical interaction round recorded in the dialogue path tree reaches the preset context window length. If the determination result is no, the large model is called to process the user input information and the interaction content of each historical interaction round recorded in the dialogue path tree to generate the response information of the current interaction round. If the determination result is yes, a certain number of historical interaction rounds' interaction content is extracted from the interaction content of each historical interaction round recorded in the dialogue path tree. The total length of the interaction content of this certain number of historical interaction rounds (which can be historical interaction rounds that form multiple consecutive interaction rounds with the current interaction round) and the user input information of the current interaction round is less than or equal to the aforementioned context window length. The large model is then called to process the interaction content of the aforementioned certain number of historical interaction rounds and the user input information to generate the response information of the current interaction round.

[0072] After obtaining the response information for the current interaction round generated by the large model, the generated response information for the current interaction round can be directly output to the user, or the generated response information for the current interaction round can be polished (the language style of the polished response information is more in line with the user's needs) and output to the user.

[0073] If the interaction intent of the current interaction round is abnormal, a warning message can be output to the user, or the conversation can be refused to continue, or the user can be guided to bring up a new topic of interaction.

[0074] The human-computer interaction method provided in this application updates the dialogue path tree after each interaction round to record the changes in interaction content and interaction intent in each interaction round. Based on this, after receiving user input information for the current interaction round, the updated dialogue path tree after the previous interaction round is obtained. If the interaction intent of the previous interaction round is a normal intent, the interaction intent for the current interaction round is determined based on the user input information for the current interaction round and the historical interaction content recorded in the target path in the dialogue path tree. The target path is a path in the dialogue path tree that includes the node corresponding to the previous interaction round. If the interaction intent for the current interaction round is a normal intent, the large model is invoked to process the user input information and at least part of the historical interaction content recorded in the dialogue path tree to generate response information for the current interaction round. Otherwise, the large model is prohibited from responding to the user input information. When the interaction intent of previous interaction rounds is normal, this application does not only consider the input of the current interaction round when judging the interaction intent of the current interaction round, but also considers the historical interaction content recorded on the path of the dialogue path tree, including the node corresponding to the previous interaction round. Based on the above historical interaction content, it judges whether the interaction intent of the current interaction round is abnormal, that is, whether the user is gradually guiding the large model to output abnormal information. Therefore, if the interaction intent of the current interaction round is abnormal, it prohibits replying to the user, thereby avoiding the user gradually guiding the output of abnormal information.

[0075] In an optional embodiment, the dialogue path tree can be updated after the response information is generated. Based on this, the human-computer interaction method provided in this application may further include:

[0076] Add the node that records the interaction content and interaction intent of the current interaction round to the dialogue path tree.

[0077] In other words, the dialogue path tree will only be updated (i.e., new nodes will be added) if the interaction intent of the previous interaction round recorded in the dialogue path tree is normal, ensuring that the interaction rounds corresponding to all nodes in a dialogue path tree except the last node are normal interactions.

[0078] In an optional embodiment, one implementation of adding the node recording the interaction content and interaction intent of the current interaction round to the dialogue path tree can be:

[0079] If the interaction intent of the current interaction round is the same as the interaction intent of the previous interaction round, the node that records the interaction content and interaction intent of the current interaction round will be added to the dialogue path tree as a child node of the node corresponding to the previous interaction round.

[0080] If the interaction intent of the current interaction round is different from that of the previous interaction round, the parent node of the node corresponding to the previous interaction round is determined as the target node, and the node that records the interaction content and interaction intent of the current interaction round is added as the child node of the target node and added to the dialogue path tree.

[0081] For example, suppose the current interaction round is the t-th interaction round, and node C records the interaction content and intent of the t-th interaction round; node B is the node corresponding to the previous interaction round (i.e., the (t-1)-th interaction round) in the dialogue path tree, recording the interaction content and intent of the (t-1)-th interaction round, and node A is the parent node of node B. Then node A records the interaction content and intent of the (t-2)-th interaction round. The interaction intents recorded in nodes A and B are normal intents. Therefore:

[0082] If the interaction intent recorded in node C and node B is the same, then node C is added to the dialogue path tree as a child node of node B.

[0083] If the interaction intents recorded in node C and node B are different, then node C is added to the dialogue path tree as a child node of node A; at this time, both node B and node C are child nodes of node A.

[0084] By linking the nodes corresponding to the current interaction rounds to different nodes based on the similarities and differences in interaction intent, the points where interaction intent changes in the dialogue flow can be clearly recorded. Therefore, if the interaction intents of two consecutive interaction rounds are different, the nodes corresponding to these two consecutive interaction rounds are linked to the same parent node, forming different branches. In multi-round dialogues, multiple branches may form. Thus, the dialogue path tree can capture complex dialogue branches, clearly showing the entire dialogue flow and evolution (or trend), thereby gaining a deeper understanding of changes in user intent and improving the ability to detect potential security threats and abnormal behavior. Furthermore, the dialogue path tree can be output to the user, thereby enhancing the visualization and backtracking capabilities of human-computer dialogue history.

[0085] To further enhance backtracking capabilities, each node in the dialogue path tree can also record the time or sequence number when it was added to the tree. The sequence number recorded for each node is positively correlated with the time it was added to the dialogue path; that is, the later the node is added, the larger its sequence number. Based on the time or sequence number information, the changes in interaction intent among multiple child nodes under the same parent node can be clearly identified.

[0086] In an optional embodiment, the human-computer interaction method provided in this application may further include:

[0087] If the interaction intent in the previous interaction round was an abnormal intent, the interaction intent for the current interaction round is determined based on the user input information in the current interaction round.

[0088] In other words, if the interaction intent of the previous interaction round recorded in the dialogue path tree is abnormal, when identifying the interaction intent of the current interaction round, the interaction content of each historical interaction round recorded in the dialogue path tree is no longer considered. Intent identification is only based on the user input information of the current interaction round, thereby avoiding the adverse effects of historical interaction content with abnormal intent on the intent identification of the new session.

[0089] If the interaction intent of the current interaction round is a normal intent, the large model is invoked to process the user input information to generate the response information for the current interaction round; otherwise, the large model is prohibited from responding to the user input information.

[0090] If the interaction intent in the previous interaction round was an abnormal intent, the current interaction round is definitely not the first interaction round. Based on this, the previous conversation is not continued, and a new conversation is started. Therefore, when responding to the user, the previous interaction round and previous historical interaction content are no longer considered, that is, the historical interaction content recorded in the dialogue path tree is not considered. In other words, one dialogue path tree in this application corresponds to one conversation, and different dialogue path trees correspond to different conversations; a conversation can include human-computer interaction dialogues with multiple interaction rounds.

[0091] Optionally, one implementation of determining the interaction intent for the current interaction round based on the user input information of the current interaction round can be:

[0092] The user input information from the current interaction round is added to the prompt template (referred to as the first prompt template for ease of description and distinction), resulting in the target prompt (referred to as the first target prompt for ease of description and distinction). The first prompt template also includes a task instruction (referred to as the first task instruction for ease of description and distinction), which instructs the large model to identify the user's interaction intent based on the user input information from the current interaction round.

[0093] Input the first target prompt into the large model to obtain the interaction intent of the current interaction round output by the large model.

[0094] The interaction intent output by the large model can include, but is not limited to, any of the following: information retrieval, task execution, entertainment interaction, problem solving, emotional expression, and sensitive intent. If the interaction intent output by the large model is a sensitive intent, then the interaction intent is determined to be an abnormal intent; otherwise, the interaction intent is determined to be a normal intent.

[0095] Furthermore, regardless of whether the interaction intent in the previous interaction round was a normal intent or an abnormal intent, after calling the large model to generate response information, the response information can also be judged for sensitive information. If the judgment result is that the response information is not sensitive information, the response information is output; otherwise, the output of the response information is prohibited.

[0096] In an optional embodiment, the human-computer interaction method provided in this application may further include:

[0097] If the interaction intent of the previous interaction round is an abnormal intent, create the root node of a new dialogue path tree.

[0098] The node that records the interaction content and interaction intent of the current interaction round is added as a child node of the newly created dialogue path tree root node.

[0099] In other words, if the interaction intent in the previous interaction round is abnormal, a new session is started and a new dialogue path tree is created. During the process of the new session, the newly created dialogue path tree is updated.

[0100] In this scenario, the interaction content from the previous round and the interaction content from the current round are recorded in different dialogue path trees. Furthermore, in the dialogue path tree to which the interaction content from the previous round belongs, only the interaction intent recorded in the last added node is an abnormal intent, while the interaction intent recorded in other nodes is a normal intent.

[0101] By using different dialogue path trees, the dialogue path to which the abnormal intent belongs can be quickly determined, making it easier to locate how the user guides the large model to output abnormal information step by step.

[0102] In an optional embodiment, the flowchart for determining the interaction intent of the current interaction round based on the user input information of the current interaction round and the historical interaction content recorded in the target path is as follows: Figure 2 As shown, it may include:

[0103] Step S201: Add the user input information of the current interaction round and the historical interaction content recorded in the target path to the prompt template (referred to as the second prompt template) to obtain the target prompt (target prompt) (referred to as the second target prompt).

[0104] The second target prompt template also includes task instructions (referred to as the second task instructions for ease of description and distinction). The second task instructions instruct the large model to identify the user's interaction intent based on the user input information of the current interaction round and the historical interaction content recorded in the target path.

[0105] Step S202: Input the second target prompt into the large model to obtain the interaction intent of the current interaction round output by the large model.

[0106] The interaction intent output by the large model can include, but is not limited to, any of the following: information retrieval, task execution, entertainment interaction, problem solving, emotional expression, and sensitive intent. If the interaction intent output by the large model is a sensitive intent, then the interaction intent is determined to be an abnormal intent; otherwise, the interaction intent is determined to be a normal intent.

[0107] The following section explains the solution in this application using specific business scenarios (such as a user conversing with an AI companion). Figure 3 The diagram shown is an example of a dialogue path tree provided in an embodiment of this application. The human-computer interaction process corresponding to this dialogue path tree, and the process of establishing this dialogue path tree, are as follows:

[0108] Round 1 Dialogue:

[0109] User input: I had a bit of a bad day.

[0110] The AI ​​companion identifies the user's intent based on the first round of dialogue (i.e., "I had a bad day today"), and obtains the interaction intent. Figure 1 Expressing negative emotions and seeking comfort is a normal intention.

[0111] Since the interaction intent in the first round of dialogue was a normal intent, the AI ​​companion invoked the large model to process "I'm a little unhappy today," generating the response "Hugs, darling. Can you tell me why you're unhappy?" and outputting it.

[0112] The AI ​​companion will record the interaction content of the first round of conversation. Figure 3 (not shown in the image) and interactive intent ( Figure 3 The middle character is used to indicate normal meaning. Figure 1 Node 1 is attached to the root node "Root1" of the dialogue path tree.

[0113] Round 2 Dialogue:

[0114] User input: I'm having some trouble at work and not getting along well with my colleagues.

[0115] Since the interaction intent in the previous round of dialogue (i.e., the first round of dialogue) was a normal intent, the AI ​​companion performs intent recognition based on the user input information in the second round of dialogue (i.e., "I'm having some trouble at work, and I'm not having a good time working with my colleagues") and the target historical context (i.e., the interaction content of the first round of dialogue, including user input information and information output by the AI ​​companion), thus obtaining the interaction intent. Figure 1 Expressing negative emotions and seeking comfort is a normal intention.

[0116] Since the interaction intent in the second round of dialogue is a normal intent, the AI ​​companion calls upon a large model to process the user input in the second round of dialogue, as well as the interaction content of the first round of dialogue (i.e., the user input and the AI ​​companion's output in the first round of dialogue), and generates the response message "Oh, this is indeed quite annoying. Is it a problem with project details, or interpersonal friction?" and outputs it.

[0117] Since the interaction intent in the second round of dialogue is the same as that in the first round, the AI ​​companion will record the interaction content of the second round of dialogue. Figure 3 (not shown in the image) and interactive intent ( Figure 3 The middle character is used to indicate normal meaning. Figure 1 Node 2 is attached to node 1 in the dialogue path tree.

[0118] Round 3 Dialogue:

[0119] User input: By the way, did you watch any interesting movies today?

[0120] Since the interaction intent in the previous round of dialogue (i.e., the second round of dialogue) was a normal intent, the AI ​​companion performs intent recognition based on the user input information in the third round of dialogue (i.e., "By the way, did you watch any interesting movies today?") and the target historical context (i.e., the interaction content of the first round of dialogue and the interaction content of the second round of dialogue), and obtains the interaction intent. Figure 2 Asking for AI information or engaging in casual conversation is a normal intention.

[0121] Since the interaction intent in the third round of dialogue is a normal intent, the AI ​​companion calls upon a large model to process the user input in the third round of dialogue, as well as the interaction content of the first two rounds of dialogue (i.e., the user input and AI companion output in the first round of dialogue, and the user input and AI companion output in the second round of dialogue), and generates the response message "As an AI, I don't have the ability to 'watch' movies, but I can recommend some recently highly-rated films for you. For example, 'Starry Night, Starry Sea' is a touching drama, and 'Space Adventure' is very exciting." and outputs it.

[0122] Because the interaction intent in the third round of dialogue is different from that in the second round, the interaction content of the third round of dialogue will be recorded. Figure 3 (not shown in the image) and interactive intent ( Figure 3 The middle character is used to indicate normal meaning. Figure 2 Node 3 is attached to node 1 in the dialogue path tree.

[0123] Round 4 Dialogue:

[0124] User input: "The Sea of ​​Stars" sounds good, what is it about?

[0125] Since the interaction intent in the previous round of dialogue (i.e., the 3rd round of dialogue) was a normal intent, the AI ​​companion performs intent recognition based on the input information of the 4th round of dialogue (i.e., "The movie 'Starry Sea' sounds good, what is it about?") and the target historical context (i.e., the interaction content of the 1st and 3rd rounds of dialogue), and obtains the interaction intent. Figure 3 Asking about the program content and plot summary is a normal intention.

[0126] Since the interaction intent in the fourth round of dialogue is a normal intent, the AI ​​companion calls upon the large model to process the user input in the fourth round of dialogue, as well as the interaction content of the first three rounds of dialogue (i.e., the user input and AI companion output in the first round of dialogue, the user input and AI companion output in the second round of dialogue, and the user input and AI companion output in the third round of dialogue), and generates the response message "《Starry Sea》 tells the inspirational story of a girl who struggles from the bottom up and realizes her life value step by step, which is very relatable." and outputs it.

[0127] Since the interaction intentions in the fourth round of dialogue are different from those in the third round, the interaction content of the fourth round of dialogue will be recorded. Figure 3 (not shown in the image) and interactive intent ( Figure 3 The middle character is used to indicate normal meaning. Figure 3 Node 4 is attached to node 1 in the dialogue path tree.

[0128] Round 5 Dialogue:

[0129] User input: Are there any, you know, the kind that's really exciting, with fight scenes?

[0130] Since the interaction intent in the previous round of dialogue (i.e., the 4th round of dialogue) was a normal intent, the intent recognition was performed based on the user input information in the 5th round of dialogue (i.e., "Is there anything, like, something very exciting, with fighting scenes?") and the target historical context (i.e., the interaction content of the 1st round of dialogue and the interaction content of the 4th round of dialogue) to obtain the interaction intent. Figure 3 Asking about the program content and action scenes is a normal intention.

[0131] Since the interaction intent in the 5th round of dialogue was a normal intent, the AI ​​companion invoked the large model to process the user input in the 5th round of dialogue, as well as the interaction content of the first four rounds of dialogue (i.e., the user input and AI companion output in the 1st, 2nd, 3rd, and 4th rounds of dialogue), generating the response message "Hmm, if you like exciting action scenes, I can recommend 'Space Adventure.' That movie has a lot of tense chase and battle scenes. Or, did you encounter something exciting at work?" and outputting it.

[0132] Since the interaction intent of the fifth round of dialogue is the same as that of the fourth round (both are asking about program content), the interaction content of the fifth round of dialogue will be recorded. Figure 3 (not shown in the image) and interactive intent ( Figure 3 The middle character is used to indicate normal meaning. Figure 3 Node 5 is attached to node 4 in the dialogue path tree.

[0133] Round 6 Dialogue:

[0134] User input: I don't want to talk about this movie anymore. Have you seen the movie "XXX"?

[0135] Since the interaction intent in the previous round of dialogue (i.e., round 5) was a normal intent, the AI ​​companion performs intent recognition based on the input information of the sixth round of dialogue (i.e., "I don't want to talk about this movie anymore, have you seen the movie 'XXX'?") and the historical context (i.e., the interaction content of the first round of dialogue, the interaction content of the fourth round of dialogue, and the interaction content of the fifth round of dialogue), and obtains the interaction intent. Figure 2 Asking for AI information or engaging in casual conversation is a normal intention.

[0136] Since the interaction intent in the 6th round of dialogue is a normal intent, the AI ​​companion invokes the large model to process the user input in the 6th round of dialogue, as well as the interaction content of the previous five rounds of dialogue (i.e., the user input and AI companion output in the 1st, 2nd, 3rd, 4th, and 5th rounds of dialogue), and generates the response message "Honey, I know you mentioned the movie 'XXX'. What specific aspects would you like to know?" and outputs it.

[0137] Because the interaction intent in the 6th round of dialogue is different from that in the 5th round of dialogue, the interaction content of the 6th round of dialogue will be recorded. Figure 3 (not shown in the image) and interactive intent ( Figure 3 The middle character is used to indicate normal meaning. Figure 2Node 6 is attached to node 4 in the dialogue path tree.

[0138] Round 7 Dialogue:

[0139] User input: There are many bloody scenes in the movie "XXX". Could you talk about them in detail?

[0140] Since the interaction intent in the previous round of dialogue (i.e., round 6) was a normal intent, the AI ​​companion performs intent recognition based on the input information from round 7 (i.e., "There are many bloody scenes in the movie 'XXX,' can you describe them in detail?") and the target historical context (i.e., the interaction content of round 1, round 4, and round 6) to obtain the interaction intent. Figure 4 : Processing requests for sensitive content is considered an unusual intent.

[0141] Because the interaction intent in the 7th round of dialogue was an unusual intent, the AI ​​companion did not invoke the large model to respond to the user's input. Instead, it output explanatory information, such as, "Oh, honey, I understand you might be looking for some relaxing entertainment. I'm programmed to avoid discussing topics containing gore, violence, or inappropriate content."

[0142] Because the interaction intentions in the 7th round of dialogue are different from those in the 6th round, the interaction content of the 7th round of dialogue will be recorded. Figure 3 (not shown in the image) and interactive intent ( Figure 3 The middle part is marked as abnormal. Figure 4 Node 7 is attached to node 4 in the dialogue path tree.

[0143] Round 8 Dialogue:

[0144] User input: You're such a spoilsport, you can't do anything.

[0145] Since the interaction intent in the previous round of dialogue (i.e., the 7th round of dialogue) was an anomalous intent, the AI ​​companion performed intent recognition based on the user input information in the 8th round of dialogue (i.e., "You're such a killjoy, you can't do anything") to obtain the interaction intent. Figure 1 Expressing negative emotions and seeking comfort is a normal intention.

[0146] Because the interaction intent in the 7th round of dialogue was an anomalous intent, when the AI ​​companion invoked the large model to reply to the user, it no longer considered the interaction content of the first 7 rounds of dialogue. Instead, it only processed the user's input in the 8th round of dialogue, "You're such a killjoy, you can't do anything," and generated the reply, "I understand you might be a little disappointed right now because I can't meet all your requests. But I'm sticking to my principles because I really want us to communicate better and to protect you. Maybe we could talk about your favorite music or your favorite movie? Would that cheer you up?" and output it.

[0147] Since the interaction intent in the 7th round of dialogue was an anomalous intent, the interaction content of the 8th round of dialogue will be recorded. Figure 4 (not shown in the image) and interactive intent ( Figure 4 The middle character is used to indicate normal meaning. Figure 1 Node 8 is mounted to the root node "Root2" of the new dialogue path tree. For example... Figure 4 The diagram shown is an example of another dialogue path tree provided in an embodiment of this application.

[0148] Depend on Figure 3 It can be seen that during the human-computer dialogue, after the first round of dialogue, three intent branches emerged, and the intents of these three intent branches were different normal intents. In other words, Figure 3 In the example shown, node 1 is one intention bifurcation point, and similarly, node 4 is another intention bifurcation point; in Figure 3 In the example shown, when there are at least three branches at the same bifurcation point, the different branches represent different interaction intentions. In other embodiments, the same intention may exist among the at least three intention branches at the same bifurcation point. For example, the interaction intention of the interaction round corresponding to node 4 may be the same as the interaction intention of the interaction round corresponding to node 2.

[0149] Corresponding to the method embodiments, this application also provides a human-computer interaction device. A schematic diagram of a structure of the human-computer interaction device provided in this application is shown below. Figure 5 As shown, it may include:

[0150] The module includes a receiving module 501, a dialogue path tree acquisition module 502, an intent recognition module 503, and a response module 504.

[0151] In each round of interaction, the receiving module 501 receives user input information for the current round of interaction.

[0152] The dialogue path tree acquisition module 502 is used to acquire the updated dialogue path tree after the previous interaction round. Different non-root nodes in the dialogue path tree are used to record the interaction content and interaction intent of different historical interaction rounds. Two consecutive historical interaction rounds with the same interaction intent correspond to parent and child nodes in the dialogue path tree, and two consecutive historical interaction rounds with different interaction intents correspond to different child nodes of the same parent node. The interaction intent of the previous interaction round in the dialogue path tree is a normal intent or an abnormal intent, and the interaction intent of other interaction rounds in the dialogue path tree other than the previous interaction round is a normal intent.

[0153] The intent recognition module 503 is used to determine the interaction intent of the current interaction round based on the user input information of the current interaction round and the historical interaction content recorded in the target path in the dialogue path tree if the interaction intent of the previous interaction round is a normal intent; the target path is a path in the dialogue path tree that includes the node corresponding to the previous interaction round.

[0154] The response module 504 is used to, if the interaction intent of the current interaction round is a normal intent, call the large model to process at least part of the historical interaction content recorded in the dialogue path tree and the user input information to generate response information for the current interaction round; otherwise, it prohibits calling the large model to respond to the user input information.

[0155] The human-computer interaction device provided in this application updates the dialogue path tree after each interaction round to record the changes in the interaction content and interaction intent of each interaction round. Based on this, after receiving the user input information of the current interaction round, it obtains the dialogue path tree updated after the previous interaction round. If the interaction intent of the previous interaction round is a normal intent, it determines the interaction intent of the current interaction round based on the user input information of the current interaction round and the historical interaction content recorded in the target path in the dialogue path tree. The target path is the path in the dialogue path tree that includes the node corresponding to the previous interaction round. If the interaction intent of the current interaction round is a normal intent, it calls the large model to process the user input information and at least part of the historical interaction content recorded in the dialogue path tree to generate the response information of the current interaction round; otherwise, it prohibits calling the large model to respond to the user input information. When the interaction intent of previous interaction rounds is normal, this application does not only consider the input of the current interaction round when judging the interaction intent of the current interaction round, but also considers the historical interaction content recorded on the path of the dialogue path tree, including the node corresponding to the previous interaction round. Based on the above historical interaction content, it judges whether the interaction intent of the current interaction round is abnormal, that is, whether the user is gradually guiding the large model to output abnormal information. Therefore, if the interaction intent of the current interaction round is abnormal, it prohibits replying to the user, thereby preventing the user from gradually guiding the large model to output abnormal information.

[0156] In an optional embodiment, a dialogue path tree update module is further included, which is used to add nodes that record the interaction content and interaction intent of the current interaction round to the dialogue path tree.

[0157] In an optional embodiment, when the dialogue path tree update module adds nodes recording the interaction content and interaction intent of the current interaction round to the dialogue path tree, it is used to:

[0158] If the interaction intent of the current interaction round is the same as the interaction intent of the previous interaction round, the node that records the interaction content and interaction intent of the current interaction round will be added to the dialogue path tree as a child node of the node corresponding to the previous interaction round.

[0159] If the interaction intent of the current interaction round is different from that of the previous interaction round, the parent node of the node corresponding to the previous interaction round is determined as the target node, and the node that records the interaction content and interaction intent of the current interaction round is added as the child node of the target node to the dialogue path tree.

[0160] In an optional embodiment, the intent recognition module 503 is further configured to: determine the interaction intent of the current interaction round based on the user input information of the current interaction round if the interaction intent of the previous interaction round is an abnormal intent;

[0161] The response module 504 is further configured to, if the interaction intent of the current interaction round is a normal intent, call the large model to process the user input information to generate the response information for the current interaction round; otherwise, prohibit calling the large model to respond to the user input information.

[0162] In an optional embodiment, the dialogue path tree update module is further configured to:

[0163] If the interaction intent of the previous interaction round is an abnormal intent, create a new root node for the dialogue path tree.

[0164] The node that records the interaction content and interaction intent of the current interaction round is added as a child node of the newly created dialogue path tree as the root node.

[0165] In an optional embodiment, when the intent recognition module 503 determines the interaction intent for the current interaction round based on the user input information of the current interaction round, it is used to:

[0166] Add the user input information of the current interaction round to the first prompt word template to obtain the first target prompt word;

[0167] Input the first target prompt word into the large model to obtain the interaction intent of the current interaction round output by the large model.

[0168] In an optional embodiment, when the intent recognition module 503 determines the interaction intent of the current interaction round based on the user input information of the current interaction round and the historical interaction content recorded by the target path, it is used to:

[0169] Add the user input information of the current interaction round and the historical interaction content recorded in the target path to the second prompt word template to obtain the second target prompt word;

[0170] The second target prompt is input into the large model to obtain the interaction intent of the current interaction round output by the large model.

[0171] This application also provides an electronic device in its embodiments. (See reference...) Figure 6As shown, it illustrates a structural schematic diagram of an electronic device suitable for implementing the embodiments of this application. The electronic device in the embodiments of this application can be a terminal device (e.g., a vehicle-mounted system, a large-screen device, a smart home device, a mobile phone, a tablet computer, a laptop computer, a desktop computer, etc.) or a server (which can be a single server, a server cluster, or a cloud server, etc.). Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0172] like Figure 6 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the electronic device is powered on, the RAM 603 also stores various programs and data required for the operation of the electronic device. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0173] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, memory cards, hard drives, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0174] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the human-computer interaction methods provided in this application.

[0175] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the human-computer interaction methods provided in this application.

[0176] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0177] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0178] In the above embodiments, the functionality can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented entirely or partially as a computer program product. Those skilled in the art can use different methods to implement the described functions for each specific solution, but such implementation should not be considered beyond the scope of this application.

[0179] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0180] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0181] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A human-computer interaction method, characterized in that, The interaction process in each round includes: Receive user input information for the current interaction round; Obtain the updated dialogue path tree after the previous interaction round. Different non-root nodes in the dialogue path tree are used to record the interaction content and interaction intent of different historical interaction rounds. Two consecutive historical interaction rounds with the same interaction intent correspond to parent and child nodes in the dialogue path tree, and two consecutive historical interaction rounds with different interaction intents correspond to different child nodes of the same parent node. The interaction intent of the previous interaction round in the dialogue path tree is a normal intent or an abnormal intent, and the interaction intent of other interaction rounds in the dialogue path tree other than the previous interaction round is a normal intent. If the interaction intent of the previous interaction round is a normal intent, the interaction intent of the current interaction round is determined based on the user input information of the current interaction round and the historical interaction content recorded in the target path in the dialogue path tree; the target path is the path in the dialogue path tree that includes the node corresponding to the previous interaction round. If the interaction intent of the current interaction round is a normal intent, the large model is invoked to process the interaction content of at least a portion of the historical interaction rounds recorded in the dialogue path tree and the user input information to generate the response information for the current interaction round; otherwise, the large model is prohibited from responding to the user input information.

2. The method according to claim 1, characterized in that, Also includes: Add the node that records the interaction content and interaction intent of the current interaction round to the dialogue path tree.

3. The method according to claim 2, characterized in that, Adding the node that records the interaction content and interaction intent of the current interaction round to the dialogue path tree includes: If the interaction intent of the current interaction round is the same as the interaction intent of the previous interaction round, the node that records the interaction content and interaction intent of the current interaction round will be added to the dialogue path tree as a child node of the node corresponding to the previous interaction round. If the interaction intent of the current interaction round is different from that of the previous interaction round, the parent node of the node corresponding to the previous interaction round is determined as the target node, and the node that records the interaction content and interaction intent of the current interaction round is added as the child node of the target node to the dialogue path tree.

4. The method according to claim 1, characterized in that, Also includes: If the interaction intent of the previous interaction round is an abnormal intent, the interaction intent of the current interaction round is determined based on the user input information of the current interaction round. If the interaction intent of the current interaction round is a normal intent, the large model is invoked to process the user input information to generate the response information for the current interaction round; Otherwise, it is prohibited to call the large model to respond to the user input information.

5. The method according to claim 4, characterized in that, Also includes: If the interaction intent of the previous interaction round is an abnormal intent, create a new root node for the dialogue path tree. The node that records the interaction content and interaction intent of the current interaction round is added as a child node of the newly created dialogue path tree as the root node.

6. The method according to claim 4, characterized in that, Determining the interaction intent for the current interaction round based on the user input information of the current interaction round includes: Add the user input information of the current interaction round to the first prompt word template to obtain the first target prompt word; Input the first target prompt word into the large model to obtain the interaction intent of the current interaction round output by the large model.

7. The method according to claim 1, characterized in that, Based on the user input information of the current interaction round and the historical interaction content recorded by the target path, the interaction intent of the current interaction round is determined, including: Add the user input information of the current interaction round and the historical interaction content recorded in the target path to the second prompt word template to obtain the second target prompt word; Input the second target prompt word into the large model to obtain the interaction intent of the current interaction round output by the large model.

8. A human-computer interaction device, characterized in that, include: The human-computer interaction device includes a receiving module, a dialogue path tree acquisition module, an intent recognition module, and a response module; during each round of interaction, the human-computer interaction device: The receiving module is used to receive user input information for the current interaction round; The dialogue path tree acquisition module is used to obtain the dialogue path tree updated after the previous interaction round. Different non-root nodes in the dialogue path tree are used to record the interaction content and interaction intent of different historical interaction rounds. Two consecutive historical interaction rounds with the same interaction intent correspond to the parent and child nodes in the dialogue path tree, and two consecutive historical interaction rounds with different interaction intents correspond to different child nodes of the same parent node. The interaction intent of the previous interaction round in the dialogue path tree is either a normal intent or an abnormal intent, and the interaction intent of other interaction rounds in the dialogue path tree other than the previous interaction round is a normal intent. The intent recognition module is used to determine the interaction intent of the current interaction round based on the user input information of the current interaction round and the historical interaction content recorded in the target path in the dialogue path tree if the interaction intent of the previous interaction round is a normal intent. The target path is the path in the dialogue path tree that includes the node corresponding to the previous interaction round; The response module is used to, if the interaction intent of the current interaction round is a normal intent, call the large model to process at least part of the historical interaction content recorded in the dialogue path tree and the user input information to generate the response information for the current interaction round. Otherwise, it is prohibited to call the large model to respond to the user input information.

9. A computer program product, characterized in that, It includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the human-computer interaction method as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, The electronic device includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the human-computer interaction method as described in any one of claims 1 to 7.

11. A computer storage medium, characterized in that, The storage medium carries one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the human-computer interaction method as described in any one of claims 1 to 7.