Interaction processing method and device, electronic equipment and computer readable storage medium
By obtaining user input and target session mode, determining the target user content, and using a large language model to generate reply content, it solves the problem that artificial intelligence can hardly respond flexibly to different interactive scenarios, and achieves efficient response content to meet user needs.
Patent Information
- Application Number
- CN202411894547.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-08
AI Technical Summary
Artificial intelligence is difficult to flexibly deal with interactive scenarios of different complexity, which makes it difficult for the reply content to meet the actual needs of users.
By obtaining the current round of user content input by the user and the target session mode configured for the content, the target user content is determined, and the preset large language model is used to generate reply content based on the target session mode and the target user content.
It realizes flexible response to interactive scenarios with different complexities, so that the reply content output through the large language model can greatly meet the actual needs of users.
Smart Images

Figure CN119782478A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an interactive processing method, device, electronic device and computer-readable storage medium. Background Art
[0002] The understanding and generation capabilities based on the Large Language Model (LLM) have been greatly improved. The LLM has been widely used in the field of human-computer interaction. For example, with the development of artificial intelligence, users can obtain responses to their questions through artificial intelligence.
[0003] However, in related technologies, it is difficult for artificial intelligence to flexibly respond to multiple interaction scenarios of varying degrees of complexity, resulting in the response content provided by artificial intelligence being difficult to meet the actual needs of users. Summary of the invention
[0004] The present application provides an interaction processing method, device, electronic device and computer-readable storage medium, aiming to solve the problem of insufficient flexibility of artificial intelligence in responding to different interaction scenarios.
[0005] To achieve the above objectives:
[0006] In a first aspect, an embodiment of the present application provides an interaction processing method, the method comprising:
[0007] Get the current round of user content input by the user;
[0008] Acquire a target session mode configured for the current round of user content, wherein the target session mode is one of a first session mode and a second session mode;
[0009] Determining target user content according to the target session mode, wherein the target user content is at least one round of user content of a current session corresponding to the current round of user content;
[0010] Through a preset large language model, based on the target conversation mode and the target user content, the reply content of the current conversation is obtained and output.
[0011] In one implementation, when the target session mode is the first session mode, the step of determining target user content according to the target session mode includes:
[0012] Acquire the historical user content set of the current session, and determine whether the current round of user content belongs to the historical user content set of the current session;
[0013] If the current round of user content belongs to the historical user content set, obtaining a first preset condition, and determining whether the historical user content set satisfies the first preset condition;
[0014] If the historical user content set meets the first preset condition, the historical user content set is determined as the target user content.
[0015] In one embodiment, after the step of determining whether the historical user content set meets the first preset condition, the method further includes:
[0016] If the first preset condition is not met, obtaining and outputting first feedback content through the large language model based on the first conversation mode and the historical user content set;
[0017] Acquiring a next round of user content input by the user in response to the first feedback content;
[0018] The next round of user content is determined as the historical user content of the historical user content set, and the step of determining whether the historical user set meets the first preset condition is repeatedly performed.
[0019] In one embodiment, after the step of determining whether the current round of user content belongs to the historical user content set of the current session, the method further includes:
[0020] If the current round of user content does not belong to the historical user content set, the current round of user content is determined as the historical user content of the historical user content set, and the step of determining whether the historical user set meets the first preset condition is repeated.
[0021] In one embodiment, the step of obtaining and outputting the reply content of the current conversation by using a preset large language model based on the target conversation strategy and the target user content includes:
[0022] Obtaining second feedback content based on the first conversation mode and the target user content through the large language model;
[0023] The second feedback content is determined as the reply content and outputted.
[0024] In one implementation, when the target conversation mode is the second conversation mode, the step of determining the target user content according to the target conversation mode includes:
[0025] According to the second conversation mode, the current round of user content is determined as the target user content.
[0026] In one embodiment, the step of obtaining and outputting the reply content of the current conversation based on the target conversation mode and the target user content by using a preset large language model includes:
[0027] Obtaining a plurality of first query contents based on the second conversation mode and the target user content through the large language model, and outputting the plurality of first query contents to the user;
[0028] Determining whether a target query content is obtained, wherein the target query content is one selected by the user from among the plurality of first query contents;
[0029] If the target query content is obtained, obtaining third feedback content based on the target query content through the large language model;
[0030] The third feedback content is determined as the reply content and outputted.
[0031] In one embodiment, after the step of determining whether the target query content is acquired, the method further includes:
[0032] If the target inquiry content is not obtained, obtaining a pre-stored fourth feedback content;
[0033] The fourth feedback content is determined as the reply content and outputted.
[0034] In one embodiment, the step of determining whether the target query content is obtained includes:
[0035] Acquire a target time period, wherein the starting time point of the target time period is the time point when the plurality of first inquiry contents are provided, and the duration of the target time period is a preset duration;
[0036] Determining whether the pending content obtained based on the user operation is obtained within the target time period;
[0037] If the pending content is obtained within the target time period, a plurality of the first query contents are obtained, and it is determined whether the pending content is one of the plurality of the first query contents;
[0038] If the pending content is one of the plurality of first query contents, the pending content is determined as the target query content.
[0039] In a second aspect, an embodiment of the present application provides an interactive processing device, including:
[0040] A first acquisition module is configured to acquire the current round of user content input by the user;
[0041] A second acquisition module is configured to acquire a target session mode configured for the current round of user content;
[0042] a target user content determination module, configured to determine target user content according to the target conversation mode;
[0043] The reply execution module is configured to obtain the reply content of the current conversation and execute the output based on the target conversation mode and the target user content through a preset large language model.
[0044] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing a computer program, wherein when the processor runs the computer program, the steps of the above method are implemented.
[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0046] In the interactive processing method, interactive processing device, electronic device and computer-readable storage medium provided in the embodiments of the present application, the method includes: obtaining the current round of user content input by the user and the target conversation mode configured for the current round of user content, the target conversation mode being one of the first conversation mode and the second conversation mode, determining the target user content according to the target conversation mode, and obtaining and outputting the reply content of the current conversation based on the target conversation mode and the target user content through the preset large language model. By obtaining the target conversation mode configured for the current round of user content from the first conversation mode and the second conversation mode, the complexity of the human-computer interaction scene when the user inputs the current round of user content can be identified according to the target conversation mode, thereby achieving the purpose of flexibly responding to human-computer interaction scenes of different complexities, so that the reply content output by the large language model can largely meet the actual needs of the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A flowchart of an interactive processing method provided in the first embodiment of the present application;
[0048] Figure 2 A flowchart of an interactive processing method provided in the second embodiment of the present application;
[0049] Figure 3 for Figure 2 A schematic diagram of a specific application scenario of the interactive processing method shown;
[0050] Figure 4 for Figure 2A schematic diagram of another specific application scenario of the interactive processing method shown;
[0051] Figure 5 A flowchart of an interactive processing method provided in the third embodiment of the present application;
[0052] Figure 6 A flowchart of an interactive processing method provided in a fourth embodiment of the present application;
[0053] Figure 7 for Figure 5 and / or Figure 6 A schematic diagram of a specific application scenario of the interactive processing method shown;
[0054] Figure 8 for Figure 5 and / or Figure 6 A schematic diagram of another specific application scenario of the interactive processing method shown;
[0055] Fig. 9 for Figure 5 and / or Figure 6 A schematic diagram of another specific application scenario of the interaction processing method shown;
[0056] Fig.10 A schematic diagram of a problem node configuration interface of an interactive processing method provided in an embodiment of the present application;
[0057] Fig.11 A block diagram of an interactive processing device provided in an embodiment of the present application;
[0058] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0060] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.
[0061] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this article, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination". Furthermore, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising" and "including" indicate the presence of the described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the presence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Thus, “A, B, or C” or “A, B and / or C” means “any of the following: A; B; C; A and B; A and C; B and C; A, B, and C.” An exception to this definition will occur only when a combination of elements, functions, steps, or operations are inherently mutually exclusive in some manner.
[0062] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0063] It should be noted that, in this article, step codes such as S101, S102, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute S102 first and then S101, etc., but these should all be within the scope of protection of this application.
[0064] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0065] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0066] The following is an explanation of the terms that may be involved in this application, as follows:
[0067] Large Language Model (LLM) refers to a large deep learning model based on massive data and computing resources, which is used for natural language processing tasks such as language generation, text classification, machine translation, etc. It is an artificial intelligence (AI) model. In practical applications, a large language model can be, for example, Chat GPT (Chat Generative Pre-trained Transformer), which is trained by a deep learning algorithm and can learn from a large amount of text data to generate natural language responses that humans can understand.
[0068] See also Figure 1 , Figure 1An interactive processing method provided in an embodiment of the present application can be executed by an interactive processing device provided in an embodiment of the present application. The interactive processing device can be implemented in software and / or hardware and is specifically configured in an electronic device with a certain data computing capability. The electronic device can be a client device or a server device. The client device is, for example, a mobile phone, a tablet computer, a vehicle terminal, and a desktop computer. In any embodiment of the present application, the execution subject of the method is taken as an example of a client device.
[0069] like Figure 1 As shown, the interaction processing method 100 provided in this embodiment includes step S12, step S14, step S16 and step S18:
[0070] Step S12, obtaining the current round of user content input by the user.
[0071] Among them, "user content" can be generated by the client device in response to the user's editing input operation on the interactive interface. The carrier form of "user content" can be text, audio, video, etc., which is not limited in this application. "Current round of user content" is user content for which the client device has not yet output feedback content (described later) or output reply content (described later) on the interactive interface.
[0072] Step S14, obtaining a target session mode configured for the current round of user content.
[0073] The target conversation mode is one of the first conversation mode and the second conversation mode, and the first conversation mode and the second conversation mode are two different conversation modes that are preset. Based on the difference between the first conversation mode and the second conversation mode, for the current round of user content, the reply content obtained according to the first conversation mode and the reply content obtained according to the second conversation mode in subsequent steps may be different.
[0074] Exemplarily, the target conversation mode can be determined by the user selecting it in the interactive interface before inputting the current round of user content. Exemplarily, the target conversation mode can also be determined by the client device identifying and parsing the current round of user content and selecting it from the first conversation mode and the second conversation mode according to the parsing result.
[0075] Step S16, determining target user content according to the target conversation mode.
[0076] The target user content is at least one round of user content in the current session corresponding to the current round of user content. In other words, the target user content is related to the user content in the current session.
[0077] According to the complexity of the conversation scene of human-computer interaction, the conversation can be divided into complex conversation and simple conversation. It is worth mentioning that in any embodiment provided in the present application, if any conversation is a simple conversation, then the user content contained in this conversation has only one round. In any embodiment provided in the present application, if any conversation is a complex conversation, then the user content contained in this conversation has at least one round. In this step, if the current conversation is not a complex conversation, it is a simple conversation, and if it is not a simple conversation, it is a complex conversation.
[0078] It is worth mentioning that, before step S16, the interaction processing method provided in this embodiment further includes: step S15 ( Figure 1 (not shown in the figure), obtain the user parameters corresponding to the current round of user content, and verify the user parameters based on the preset verification conditions.
[0079] In step S15, the user parameters include at least one of a user identity parameter and a user authority parameter. Specifically, the user identity parameter is a unique identifiable identifier of a user that can be identified by the client device, and the user authority parameter is a preset interaction authority range corresponding to the user identity parameter. Therefore, "verifying the user parameters based on the preset verification conditions" is specifically one of the following three:
[0080] The first method is to determine whether the user identity parameter of the current round of user content belongs to the preset user identity parameter set. If so, the verification condition is met and then step S16 is executed. If not, the verification condition is not met and the current session is terminated directly.
[0081] The second method is to determine whether the user permission parameter of the current round of user content belongs to the preset user permission parameter set. If so, the verification condition is met and then step S16 is executed. If not, the verification condition is not met and the current session is terminated directly.
[0082] The third method is to determine whether the user permission parameter of the current round of user content belongs to the preset identity parameter set and whether the user permission parameter of the current round of user content belongs to the preset user permission parameter set. If both belong to the preset identity parameter set, the verification condition is met, and then step S16 is executed. If the user permission parameter does not belong to the preset identity parameter set or the user permission parameter does not belong to the preset user permission parameter set, the verification condition is not met, and the current session is directly terminated.
[0083] Step S18, using a preset large language model, based on the target conversation mode and the target user content, obtains and outputs the reply content of the current conversation.
[0084] In each session, the "reply content" is the last round of content output by the client device. In other words, once the client device outputs the reply content in a session, it indicates that all interactive tasks in the session have been completed and the session ends.
[0085] Specifically, first key information is parsed from target user content according to the target conversation mode, and the first key information is input into the large language model, which processes the first key information to generate reply content for all user content in the current conversation.
[0086] In the method provided in this embodiment, by obtaining the target conversation mode configured for the current round of user content from the first conversation mode and the second conversation mode, the complexity of the human-computer interaction scenario corresponding to the current round of user content can be determined according to the target conversation mode, thereby achieving the purpose of flexibly responding to human-computer interaction scenarios of different complexities, so that the reply content obtained and output through the large language model can largely meet the actual needs of users.
[0087] Specifically, when the target session mode is the first session mode, Figure 2 As shown, step S16 includes:
[0088] Step S1161, obtaining a historical user content set of the current session.
[0089] The "historical user content set" is all the user content entered by the user before the user enters the current round of user content for the current session. In other words, the "historical user content set" is the collection of the user content from the first round of user content to the previous round of user content before the current round of user content in the current session.
[0090] Furthermore, the historical user content set is a set of second key information of the first round of user content to the previous round of user content before the current round of user content in the current session. Specifically, for each session, after obtaining each round of user content, the client device will parse each round of user content to obtain the second key information and store the second key information.
[0091] Step S1162: determine whether the current round of user content belongs to the historical user content set of the current session.
[0092] For example, if the current round of user content is the nth round of user content in the current session, when n is an integer greater than 1, then the historical user content set is the set of the first round of user content to the n-1th round of user content in the current session. Among them, when n is 1, it means that the current round of user content is the first round of user content in the current session, then, in this case, the historical user content set is an empty set.
[0093] Specifically, if the second key information parsed by the client device based on the current round of user content is the same as at least one second key information of the previous round of user content from the first round of user content to the current round of user content, then the current round of user content is directly determined as historical user content, that is, it is determined that the current round of user content belongs to the historical user content set of the current session.
[0094] On the contrary, if the second key information parsed by the client device based on the current round of user content is different from any second key information of the previous round of user content from the first round of user content to the current round of user content, then the current round of user content is directly determined as non-historical user content, that is, it is determined that the current round of user content does not belong to the historical user content set of the current session.
[0095] For further information, please refer to Figure 2 If the judgment result obtained based on step S1612 is that the current round of user content belongs to the historical user content set, the following steps are performed in sequence:
[0096] Step S1613, obtaining a first preset condition. The first preset condition can be set in combination with an actual application scenario of human-computer interaction. The first preset condition will be different if the actual application scenario is different.
[0097] Step S1614: determine whether the historical user content set meets a first preset condition.
[0098] In step S1614, it is necessary to determine whether the sum of all historical user content in the historical user content set matches the first preset condition. If it does not completely match, it indicates that the historical user content set does not meet the first preset condition. Otherwise, it indicates that the historical user content set meets the first preset condition.
[0099] For further information, please refer to Figure 2 If the judgment result obtained based on step S1614 is that the historical user content set meets the first preset condition, step S1615 is executed to determine the historical user content set as the target user content.
[0100] Based on this step S1615, when the historical user content set meets the first preset condition, all user content in the historical user content set is determined as target user content.
[0101] Specifically, all the second key information in the historical user content set is determined as the first key information of the target user content, so that step S18 is subsequently performed to obtain the reply content of the current session.
[0102] In this embodiment, based on steps S1611 to S1615, when it is determined that the target conversation mode is the first conversation mode and the current round of user content belongs to a historical user content set and the historical user content set satisfies a first preset condition, the client device will not generate and output any content related to any round of user content in the current conversation through the large language model before outputting the reply content of the current conversation.
[0103] Further, in another embodiment provided in this application, please continue to refer to Figure 2 If the judgment result obtained based on step S1614 is that the historical user content set does not meet the first preset condition, then after step S1614, the method 100 further includes steps S1616, S1617 and S1618:
[0104] Step S1616: Obtain and output first feedback content through a large language model based on the first conversation mode and a historical user content set.
[0105] That is, when it is determined that the target conversation mode is the first conversation mode and the current round of user content belongs to the historical content set, but the historical content set does not meet the first preset condition, the client device must generate first feedback content for the historical user content set through the large language model before outputting the reply content.
[0106] Step S1617: obtaining the next round of user content input by the user in response to the first feedback content.
[0107] The next round of user content is user content generated by the user performing editing input operations on the interactive interface and received by the client device after the client device outputs the first feedback content on the interactive interface.
[0108] Step S1618: determine the next round of user content as the historical user content in the historical user content set. After step S1618, execute step S1614.
[0109] It is worth mentioning that after the client device executes step S1618, the historical user content set includes at least the first round of user content of the current session to the next round of user content of the current round of user content, that is, based on the completion of step S1618, the client device obtains an updated historical user content set. Therefore, after step S1618, step S1614 is repeatedly executed to determine whether the updated historical user content set meets the first preset condition. If the updated historical user content set meets the first preset condition, step S1615 is executed again. If the updated historical content set still does not meet the first preset condition, step S1616, step S1617 and step S1618 are executed in sequence, and this cycle is repeated until the historical user content set updated m times meets the first preset condition.
[0110] Further, in another embodiment provided in this application, please continue to refer to Figure 2 If the judgment result obtained based on step S1612 is that the current round of user content does not belong to the historical content set, the method 100 further includes: step S1619, determining the current round of user content as the historical user content of the historical user content set. And after step S1167, step S1614 is repeatedly executed.
[0111] That is, based on this step S1619, when it is determined that the target session mode is the first session mode and the current round of user content does not belong to the historical content set, the client device determines the current round of user content as the historical user content of the historical user content set to update the historical user content set. Moreover, after executing step S1619, the client device also repeats step S1614 based on the updated historical user content set to determine whether the historical user content set with the first round of user content to the current round of user content of the current session meets the first preset condition, if so, execute step S1615, if not, execute step S1616.
[0112] For further information, please refer to Figure 2 , when the target session policy is the first session policy, step S18 specifically includes step S1811 and step S1812:
[0113] Step S1811, obtaining second feedback content through a large language model based on the first conversation mode and target user content.
[0114] Specifically, first key information corresponding to the first conversation mode is parsed from the target user content according to the first conversation mode, and the first key information corresponding to the first conversation mode is input into the large language model, which processes the first key information corresponding to the first conversation mode to generate second feedback content.
[0115] Step S1182: determine the second feedback content as reply content and output it.
[0116] Specifically, the second feedback content obtained based on step S1181 is determined as the reply content for all user content in the current session. After the client device outputs the reply content, it indicates that the human-computer interaction task of the current session has been completed, and the task of the current session has ended. If the user inputs user content through the interactive interface after the client device outputs the reply content, the user content input by the user is the first round of user content of the next session of the current session.
[0117] In the case where the target session mode is the first session mode, based on the same inventive concept as the aforementioned embodiment, the aforementioned embodiment is described in detail below through a specific application scenario.
[0118] See also Figure 3 , the current round of user content input by the user in the interactive interface of the client device is "I am 30 years old and 180cm tall", and before the user inputs the current round of user content, the client device is configured with the first session mode.
[0119] If Figure 3 As shown in (a), in step S12, the current round of user content obtained is "I am 30 years old and 180cm tall." The target conversation mode obtained in step S14 is the first conversation mode.
[0120] Then, step S1611 is executed to obtain the historical user content set of the current session. Figure 3 As shown in (a), if the current round of user content is the second round of user content in the current session, at this time, the historical user content set only includes the first round of user content “hello”.
[0121] In step S1612, the client device determines whether "I am 30 years old and 180cm tall" belongs to the historical user content set "Hello" of the current session. The client device needs to determine whether the current user content "I am 30 years old and 180cm tall" matches the historical user content set "Hello".
[0122] Since "I am 30 years old and 180cm tall" does not match "Hello", the current round of user content does not belong to the historical user content set. In this way, the client device executes step S1619 to determine the current round of user content "I am 30 years old and 180cm tall" as the historical content of the historical user content set, so that the historical user content set after one update includes "Hello" and "I am 30 years old and 180cm tall".
[0123] After executing step S1619, execute step S1614 to determine whether the historical user content set after an update meets the first preset condition. Specifically, in this embodiment, the first preset condition is that the historical user content set has height information, age information and weight information. Since "I am 30 years old and 180cm tall" in the historical user content set updated once includes height information and age information but does not include weight information, the historical user content set after an update does not meet the first preset condition. In this way, after executing step S1614, the client device must also execute step S1616 in sequence to obtain the first feedback content "Please provide your weight" and output it to the interactive interface, such as Figure 3 As shown in (b) in .
[0124] Then, if Figure 3 As shown in (c) in the figure, the user inputs the next round of user content "I weigh 60 kg" of the current round of user content "I am 30 years old and 180 cm tall" to the client device through the interactive interface in response to the first feedback content "Please provide your weight", and the client device executes step S1617 to obtain the next round of user content "I weigh 60 kg". Subsequently, the client device executes step S1618 to determine the next round of user content "I weigh 60 kg" as the historical user content of the historical user content set, completing the secondary update of the historical user content set.
[0125] After step S1618 is completed, step S1614 is repeatedly executed to determine whether the secondarily updated historical user content set meets the first preset condition. Since "I am 30 years old and 180cm tall" in the secondarily updated historical user content set includes height information and age information, and "I weigh 60kg" includes weight information, the secondarily updated historical user content set meets the first preset condition. In this way, after the client device repeatedly executes step S1614, step S1615 is executed to determine the secondarily updated historical user content set as the target user content.
[0126] Therefore, after step S1615, step S1811 is executed, and the first key information "30 years old", "180 cm" and "60 kg" are extracted from the target user content based on the first conversation mode, and the first key information "30 years old", "180 cm" and "60 kg" are input into the large language model, and the second feedback content "Age: 30 years old, height: 180 cm, weight: 60 kg" is generated by the large language model.
[0127] Then, step S1182 is executed to determine the second feedback content "age: 30 years old, height: 180cm, weight: 60kg" as the reply content and output it to the interactive interface. Figure 3As shown in (d), the reply content displayed by the client device is “age: 30 years old, height: 180 cm, weight: 60 kg.” After the client device outputs the reply content, the interactive task of the current session ends.
[0128] See also Figure 4 , the current round of user content input by the user in the interactive interface of the client device is "I am 30 years old, 180cm tall, and 60kg", and before the user inputs the current round of user content, the client device is configured with the first session mode.
[0129] If Figure 4 As shown in (a), in step S12, the current user content obtained is "I am 30 years old, 180cm tall, and 60kg." The target conversation mode obtained in step S14 is the first conversation mode.
[0130] Then, step S1611 is executed to obtain the historical user content set of the current session. Figure 4 As shown in (a), if the current round of user content is the second round of user content in the current session, at this time, the historical user content set only includes the first round of user content “hello”.
[0131] In step S1612, the client device determines whether "I am 30 years old, 180 cm tall, and 60 kg" belongs to the historical user content set "Hello" of the current session. The client device needs to determine whether the current user content "I am 30 years old, 180 cm tall, and 60 kg" matches the historical user content set "Hello".
[0132] Since "I am 30 years old, 180 cm tall, 60 kg" does not match "Hello", the current round of user content does not belong to the historical user content set. In this way, the client device executes step S1619 to determine the current round of user content "I am 30 years old, 180 cm tall, 60 kg" as the historical content of the historical user content set, so that the historical user content set after one update includes "Hello" and "I am 30 years old, 180 cm tall, 60 kg".
[0133] After executing step S1619, step S1614 is executed to determine whether the historical user content set after one update meets the first preset condition. Specifically, in this embodiment, the first preset condition is that the historical user content set has height information, age information, and weight information. Since "I am 30 years old, 180 cm tall, and 60 kg" in the historical user content set after one update includes height information, age information, and weight information, the historical user content set after one update meets the first preset condition. In this way, after executing step S1614, the client device executes step S1615 to determine the historical user content set including the first round user content "Hello" and the current round user content "I am 30 years old, 180 cm tall, and 60 kg" as the target user content.
[0134] Therefore, after step S1615, steps S1811 and S1812 are executed in sequence, and the second feedback content "age: 30 years old, height: 180cm, weight: 60kg" is determined as the reply content and output to the interactive interface. Figure 4 As shown in (b), the reply content displayed by the client device is “age: 30 years old, height: 180 cm, weight: 60 kg”. After the client device outputs the reply content, the interactive task of the current session ends.
[0135] like Figure 5 As shown, in another embodiment provided by the present application, when the target session mode is the second session mode, step S16 includes:
[0136] Step S1261: According to the second conversation mode, the current round of user content is determined as target user content.
[0137] It is worth mentioning that in the second conversation mode, one round of user content corresponds to one conversation, the current round of user content corresponds to the current conversation, the previous round of user content of the current round of user content corresponds to the previous conversation of the current conversation, and the next round of user content of the current round of user content corresponds to the next conversation of the current conversation. That is, in the second conversation mode, each conversation includes only one round of user content.
[0138] Furthermore, if the target session mode is the second session mode, please continue to refer to Figure 5 , step S18 specifically includes:
[0139] Step S1821: obtaining a plurality of first query contents through a large language model based on the second conversation mode and the target user content, and outputting the plurality of first query contents to the user.
[0140] Specifically, according to the second conversation mode, the first key information corresponding to the second conversation mode is parsed from the current round of user content, and the first key information corresponding to the second conversation mode is input into the large language model, and the large language model generates multiple first query contents for the current round of user content (that is, all user contents in the current conversation), and provides multiple first query contents to the user in the interactive interface.
[0141] Step S1822, determining whether the target query content is obtained.
[0142] The target query content is one of the multiple first query contents selected by the user. That is, the client device needs to determine whether the user has selected the multiple first query contents after outputting the multiple first query contents.
[0143] In this step S1822, the user does not need to manually input a new round of user content in the interactive interface for at least one of the multiple first query contents. Instead, the client device outputs multiple first query contents in the interactive interface for the user to select.
[0144] Specifically, Figure 6 As shown, Figure 6 and Figure 5 The difference is that step S1822 specifically includes:
[0145] Step S18221, obtain the target time period.
[0146] The starting time point of the target time period is the time point when the client device provides the plurality of first inquiry contents, and the duration of the target time period is a preset duration.
[0147] Step S18222, determining whether pending content based on user operations is obtained within the target time period.
[0148] If the pending content is obtained within the target time period, step S18223 is executed in sequence to obtain multiple first query contents. Step S18224 is to determine whether the pending content is one of the multiple first query contents.
[0149] Since the pending content may be generated based on the user's selection of multiple first inquiry contents, and the pending content may also be generated based on the user editing and inputting new content in the interactive interface, it is necessary to determine whether the pending content is one of the multiple first inquiry contents. If the pending content is not one of the multiple first inquiry contents, then the target inquiry content is not obtained within the target time period.
[0150] Please continue reading Figure 6After step S18224, if the pending content is one of the multiple first query contents, step S18225 is executed to determine the pending content as the target query content. In this way, the actual intention of the user is determined by determining the target query selected by the user, so that the reply content corresponding to the target query content is determined as a reasonable answer to the actual intention of the user, so that the reply content output by the large language model can largely meet the actual needs of the user.
[0151] Furthermore, if the target query content is obtained, such as Figure 5 as well as Figure 6 As shown, after step S1822 (step S18225), step S1823 and step S1824 are executed in sequence:
[0152] In step S1823, third feedback content is obtained based on the target query content through the large language model.
[0153] In this step, the third feedback content is the feedback content generated by the large language model for the target query content after the target query content is input into the large language model. Since the key field information carried in the multiple first query contents is different, different feedback contents will be obtained by inputting different first query contents into the large language model.
[0154] Among them, step S1824 determines the third feedback content as reply content and outputs it.
[0155] Specifically, the third feedback content obtained in step S1823 is output to the interactive interface. It is worth mentioning that after the client device completes step S1824, the human-computer interaction task of the current session is completed. After the time point of outputting the third feedback content, if the user inputs user content again in the interactive interface, then the re-input user content is the first round of user content of the next session of the current session.
[0156] Accordingly, if Figure 5 As shown, if the target query content is not obtained, after step S1822, steps S1825 and S1826 are executed successively:
[0157] Wherein, in step S1825, the pre-stored fourth feedback content is obtained.
[0158] Among them, step S1286 determines the fourth feedback content as reply content and outputs it.
[0159] The fourth feedback content indicates that the user is prompted that the target query content is not effectively selected. After the client device outputs the reply content as the fourth feedback content, the human-computer interaction process of the current session is completed. After the fourth feedback content is output, if the user inputs user content again in the interaction interface, then the re-input user content is the first round of user content of the next session of the current session.
[0160] Accordingly, if Figure 6 As shown, if the judgment result of step S18222 is that the pending content is not obtained within the target time period, indicating that the target inquiry content is not obtained, then, after step S18222, steps S1825 and S1826 are executed in sequence to determine the fourth feedback content as the reply content and output it.
[0161] Specifically, failure to obtain pending content within the target period means that the user does not perform a selection operation or an input operation within the target period. In other words, if the user performs a selection operation or an input operation after the target period, and thus the client device receives the pending content, even if the pending content is one of the multiple first query contents, the pending content will not be determined as the target query content.
[0162] Please continue reading Figure 6 If the judgment result of step S18224 is that the pending content is not one of the multiple first inquiry contents, it indicates that the target inquiry content has not been obtained. Then, after step S18224, steps S1825 and S1826 are executed in sequence to determine the fourth feedback content as the reply content and output it.
[0163] In the method 100 provided in this embodiment, based on step S1825 and step S1826, a default reply mechanism is set for the human-computer interaction process in the second conversation mode to handle the situation where the user fails to effectively select the target query content. In other words, the method 100 provides a robust error handling mechanism to output a preset feedback content (i.e., the fourth feedback content) to the user when the content input by the user does not meet the corresponding preset conditions, and the output of this preset feedback content does not need to call the large language model to achieve, so that for the situation where the user fails to effectively select the target query content, it can save computing resources, so that when processing a large number of user requests, the client device can improve the computing efficiency and reduce the interactive feedback delay.
[0164] In the case where the target session mode is the second session mode, based on the same inventive concept as the above embodiment, the above embodiment is described in detail below through a specific application scenario.
[0165] See also Figure 7, the user enters the current round of user content "My device is broken" in the interactive interface of the client device, and before the user enters the current round of user content, the client device is configured with the second session mode.
[0166] Then, the current round user content obtained in step S12 is "My device is broken" and the target session mode obtained in step S14 is the second session mode.
[0167] After step S12 and step S14 are both executed, step S1621 is executed to determine the current round of user content "My device is broken" as the target user content according to the second session mode.
[0168] After step S1621 is completed, step S1821 is executed to obtain multiple first query contents through the large language model based on the second conversation mode and the current round of user content "My device is broken" and output the multiple first query contents on the interactive interface to provide the user with multiple first query contents. Specifically, Figure 7 As shown in (a), six first inquiry contents are output for the current round of user content "My equipment is broken": "A. Excavator repair report", "B. Truck crane repair report", "C. Pump truck repair report", "D. Paver repair report", "E. Road roller repair report" and "F. Compactor repair report".
[0169] After step S1821, step S1822 is executed to determine whether the target query content is obtained. In the target period, the user selects "A. Excavator repair" from the six first query contents in the display interface of the client device. Figure 7 As shown in (a), in the interactive interface, in response to the user's selection operation, the arrow-shaped cursor circles the first inquiry content "A. Excavator repair report", then the client device obtains the target inquiry content as "A. Excavator repair report".
[0170] After step S1822, step S1823 is executed, and the third feedback content "For excavator repair, please contact 400-3200" is obtained through the large language model based on the target query content "A. Excavator repair".
[0171] After step S1823, step S1824 is executed to determine the third feedback content "Please contact 400-3200 for excavator repair" as the reply content "Please contact 400-3200 for excavator repair" and output it. Figure 7 As shown in (b), the client device outputs the reply content "Please contact 400-3200 for excavator repair" in the interactive interface and ends the current session.
[0172] In another specific embodiment, Figure 8As shown in (b), within the target time period, the user inputs "milling machine repair report" in the display interface of the client. Since "milling machine repair report" does not belong to any of the six first inquiry contents mentioned above, "milling machine repair report" is not the target inquiry content. After step S1822, step S1825 is executed to obtain the pre-stored fourth feedback content "The content you entered is invalid, please re-enter it."
[0173] After step S1825 is completed, step S1826 is executed to determine the fourth feedback content "The content you entered is invalid, please re-enter" as the reply content and output it. Figure 8 As shown in (b), the interactive interface of the client device outputs a reply content "The content you entered is invalid, please re-enter", and ends the current session.
[0174] In another specific embodiment, Fig. 9 As shown in (b), within the target time period, the user did not select any of the six first inquiry contents in the interactive interface, and the user did not input any new contents in the interactive interface, then after step S1822, steps S1825 and S1826 are executed successively. Specifically, the interactive interface of the client device outputs the reply content "The content you entered is invalid, please re-enter", and ends the current session.
[0175] Accordingly, before executing any of the above embodiments, the problem node configuration may be performed on the client device. Specifically, the operation interface for configuring the problem node is as follows: Fig.10 shown.
[0176] In the area labeled "Model", a drop-down list may be used to select a large language model listed, thereby determining the "configured large language model" in step S14.
[0177] In the "Context" area, different question contents can be configured according to the specific application scenarios of the human-computer interaction scenario. Figure 3 As shown in (a), the specific application scenario configured for the first round of user content "Hello" is to collect the user's basic employment information, so the question content is specifically configured as "Please enter your height, age and weight".
[0178] In the "Please select the answer type" area, two types are configured: "Direct answer" and "Option answer". Specifically, "Direct answer" is the first conversation mode of the aforementioned embodiment, and "Option answer" is the second conversation mode of the aforementioned embodiment.
[0179] In the "Set fields to be extracted from user answers" area, configure the extraction of key information from user content (user answers), such as age, gender, height, weight, etc.
[0180] In the "Time Count" area, configure the specific duration of the target time period in the above embodiment. For example, Fig.10 If the "time count" is "30S", it means Figure 6 The illustrated step S18222 specifically determines whether the pending content based on the user operation is obtained within 30 seconds.
[0181] In this way, based on Fig.11 The question node configuration shown can design feedback content and reply content according to the application scenarios and user needs. And through the two types of answers, "direct answer" and "option answer", the question node can respond flexibly according to different situations, so that the client device can handle human-computer interaction dialogues of different complexity.
[0182] In a second aspect of the present application, based on the same inventive concept as the above-mentioned embodiment, the embodiment of the present application further provides an interactive processing device, such as Fig.11 As shown, the interaction processing device 200 includes a first acquisition module 201 , a second acquisition module 202 , a target user content determination module 203 and a reply execution module 204 .
[0183] The first acquisition module 201 is configured to acquire the current round of user content input by the user.
[0184] The second acquisition module 202 is configured to acquire a target session mode configured for the current round of user content. The target session mode is one of a first session mode and a second session mode, and the first session mode and the second session mode are different.
[0185] The target user content determination module 203 is configured to determine the target user content according to the target session mode. The target user content is at least one round of user content of the current session corresponding to the current round of user content.
[0186] The reply execution module 204 is configured to obtain the reply content of the current conversation and execute the output based on the target conversation mode and the target user content through a preset large language model.
[0187] For the specific definition of the parasitic resistance information processing device, please refer to the definition of the parasitic resistance information processing method above, which will not be repeated here. Each module in the above-mentioned parasitic resistance information processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0188] In a third aspect of the present application, based on the same inventive concept as the above-mentioned embodiment, the present application further provides an electronic device, such as Fig.12 As shown, the device 300 includes: a processor 310 and a memory 311 storing a computer program; wherein, Fig.12 The processor 310 shown in the figure is not used to indicate that the number of the processor 310 is one, but is only used to indicate the positional relationship of the processor 310 relative to other devices. In actual applications, the number of the processor 310 may be one or more; similarly, Fig.12 The memory 311 shown in the figure has the same meaning, that is, it is only used to refer to the position relationship of the memory 311 relative to other devices. In practical applications, the number of memories 311 can be one or more. When the processor 310 runs the computer program, the method applied to the above device is implemented.
[0189] The device may also include: at least one network interface 312. The various components in the device are coupled together via a bus system 313. It is understood that the bus system 313 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 313 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig.12 Various buses are labeled as bus system 313.
[0190] The memory 311 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. The nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory may be a disk memory or a tape memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAM bus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 311 described in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
[0191] The memory 311 in the embodiment of the present application is used to store various types of data to support the operation of the device. Examples of these data include: any computer program for operating on the device, such as an operating system and an application; contact data; phone book data; messages; pictures; videos, etc. Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and handle hardware-based tasks. The application program may include various applications, such as a media player (Media Player), a browser (Browser), etc., for implementing various application services. Here, the program for implementing the embodiment method of the present application may be included in the application program.
[0192] In the fourth aspect of the present application, based on the same inventive concept as the aforementioned embodiment, the present application further provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and the computer-readable storage medium may be a magnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM) or the like; or it may be various devices including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc. When the computer program stored in the computer-readable storage medium is executed by the processor, the above method is implemented. For the specific steps implemented when the computer program is executed by the processor, please refer to Figure 1 , Figure 2 , Figure 5 or Figure 6 The description of the illustrated embodiment will not be repeated here.
[0193] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0194] In this document, the terms "comprises," "comprising," or any other variations thereof, are intended to cover a non-exclusive inclusion of elements other than those listed and may also include additional elements not expressly listed.
[0195] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. An interactive processing method, characterized in that: The method comprises: Get the current round of user content input by the user; Acquire a target session mode configured for the current round of user content, wherein the target session mode is one of a first session mode and a second session mode; Determining target user content according to the target session mode, wherein the target user content is at least one round of user content of a current session corresponding to the current round of user content; Through a preset large language model, based on the target conversation mode and the target user content, the reply content of the current conversation is obtained and output.
2. The method according to claim 1, characterized in that In a case where the target session mode is the first session mode, the step of determining target user content according to the target session mode includes: Acquire the historical user content set of the current session, and determine whether the current round of user content belongs to the historical user content set of the current session; If the current round of user content belongs to the historical user content set, obtaining a first preset condition, and determining whether the historical user content set satisfies the first preset condition; If the historical user content set meets the first preset condition, the historical user content set is determined as the target user content.
3. The method according to claim 2, characterized in that After the step of determining whether the historical user content set meets the first preset condition, the method further includes: If the first preset condition is not met, obtaining and outputting first feedback content through the large language model based on the first conversation mode and the historical user content set; Acquiring a next round of user content input by the user in response to the first feedback content; The next round of user content is determined as the historical user content of the historical user content set, and the step of determining whether the historical user set meets the first preset condition is repeatedly performed.
4. The method according to claim 2, characterized in that: After the step of determining whether the current round of user content belongs to the historical user content set of the current session, the method further includes: If the current round of user content does not belong to the historical user content set, the current round of user content is determined as the historical user content of the historical user content set, and the step of determining whether the historical user set meets the first preset condition is repeated.
5. The method according to any one of claims 2 to 4, characterized in that: The step of obtaining and outputting the reply content of the current conversation by using the preset large language model based on the target conversation strategy and the target user content includes: Obtaining second feedback content based on the first conversation mode and the target user content through the large language model; The second feedback content is determined as the reply content and outputted.
6. The method according to claim 1, characterized in that In a case where the target session mode is the second session mode, the step of determining target user content according to the target session mode includes: According to the second conversation mode, the current round of user content is determined as the target user content.
7. The method according to claim 6, characterized in that The step of obtaining and outputting the reply content of the current conversation by using a preset large language model based on the target conversation mode and the target user content includes: Obtaining a plurality of first query contents based on the second conversation mode and the target user content through the large language model, and outputting the plurality of first query contents to the user; Determining whether a target query content is obtained, wherein the target query content is one selected by the user from among the plurality of first query contents; If the target query content is obtained, obtaining third feedback content based on the target query content through the large language model; The third feedback content is determined as the reply content and outputted.
8. The method according to claim 7, characterized in that After the step of determining whether the target query content is obtained, the method further includes: If the target inquiry content is not obtained, obtaining a pre-stored fourth feedback content; The fourth feedback content is determined as the reply content and outputted.
9. The method according to claim 7, characterized in that: The step of determining whether the target query content is obtained comprises: Acquire a target time period, wherein the starting time point of the target time period is the time point when the plurality of first inquiry contents are provided, and the duration of the target time period is a preset duration; Determining whether the pending content obtained based on the user operation is obtained within the target time period; If the pending content is obtained within the target time period, a plurality of the first query contents are obtained, and it is determined whether the pending content is one of the plurality of the first query contents; If the pending content is one of the plurality of first query contents, the pending content is determined as the target query content.
10. An interactive processing device, characterized in that: include: A first acquisition module is configured to acquire the current round of user content input by the user; A second acquisition module is configured to acquire a target session mode configured for the current round of user content; a target user content determination module, configured to determine target user content according to the target conversation mode; The reply execution module is configured to obtain the reply content of the current conversation and execute the output based on the target conversation mode and the target user content through a preset large language model.
11. An electronic device, characterized in that: include: A processor and a memory storing a computer program, wherein when the processor runs the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Cited By
Interaction method and device applied to robot
CN121884798A