Session method and device, equipment, storage medium and product

By generating session results by acquiring the historical reasoning information of the target agent, the problem of user retelling after session interruption is solved, thus improving interaction efficiency and accuracy.

CN121283989APending Publication Date: 2026-01-06BEIJING QIHOOD TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511384931.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

In cases of unstable network connection or sudden server load, users need to repeat the submitted session content after the session is interrupted, resulting in low interaction efficiency and information omission or distortion.

Method used

Session results are generated by acquiring and utilizing the target agent's historical reasoning information, including input/output information and tool call information, to avoid users from repeatedly entering information.

Benefits of technology

It improves the user interaction experience, avoids users having to repeat input after the session is interrupted, and improves interaction efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121283989A_ABST
    Figure CN121283989A_ABST
Patent Text Reader

Abstract

The invention discloses a session method and device, equipment, a storage medium and a product, and relates to the technical field of data processing, and the session method comprises the steps: obtaining stored historical reasoning information of a target agent based on a session continuing instruction in response to the session continuing instruction of a user, the historical reasoning information comprises input and output information and / or tool calling information of the target agent in a session task execution process; and generating a session result based on the historical reasoning information. Since the session result is generated according to the stored historical reasoning information of the target agent, compared with the existing mode that the user needs to retell the submitted session content under the condition of session interruption, the mode of the application can avoid repeated input of the user and improve the user interaction experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to session methods, apparatus, devices, storage media and products. Background Technology

[0002] Real-time interactive applications based on network connectivity have become a core means for users to obtain information and solve problems. Among them, human-computer dialogue systems (such as online intelligent customer service, virtual assistants, and instant messaging robots) are typical applications that have been widely penetrated into e-commerce, government services, financial services, education and training, and healthcare. These systems achieve instant responses to user questions through two-way communication between the client and the cloud server, significantly optimizing user experience while improving service efficiency and reducing labor costs. Although network infrastructure has been continuously optimized, objective factors such as physical link fluctuations (e.g., wireless signal interference, uneven base station load), sudden server load surges (e.g., peak-hour traffic spikes), and cross-regional data transmission (e.g., network latency in cross-border services) may force the termination of a user's current session. In such cases, users often need to manually repeat the complete or partial dialogue content they have submitted (e.g., restating the problem background, repeating existing supplementary explanations, or even re-entering complete business process information), which not only wastes time and reduces interaction efficiency but may also lead to information omissions or inaccurate statements due to memory bias, thus affecting the accuracy of problem solving. Therefore, how to avoid the need for users to repeat the submitted dialogue content after the session is interrupted has become an urgent technical problem to be solved. Summary of the Invention

[0003] The main purpose of this application is to provide a conversation method, apparatus, device, storage medium and product, which aims to solve the technical problem that users need to repeat the conversation content after the conversation is interrupted, resulting in a poor user experience.

[0004] To achieve the above objectives, this application proposes a session method, which includes:

[0005] In response to the user's instruction to continue the session, the stored historical reasoning information of the target agent is obtained based on the instruction to continue the session. The historical reasoning information includes the input and output information and / or tool call information of the target agent during the execution of the session task.

[0006] The session results are generated based on the historical reasoning information.

[0007] Optionally, before the step of obtaining the stored historical reasoning information of the target agent based on the user's continuation session instruction, the method further includes:

[0008] The input information of the target intelligent agent is generated based on the user's conversation information, and the input information includes intelligent prompt words generated based on the conversation information;

[0009] Obtain the output information fed back by the target intelligent agent based on the input information;

[0010] The input and output information is determined based on the input information and the output information, and the input and output information is stored.

[0011] Optionally, after the step of obtaining the output information fed back by the target intelligent agent based on the input information, the method further includes:

[0012] If the output information is a tool invocation request, the corresponding target tool is invoked based on the tool invocation request;

[0013] Obtain the tool call information fed back by the target tool based on the tool call request, and store the tool call information.

[0014] Optionally, the step of storing the input / output information includes:

[0015] If the input / output information is not the first input / output information, retrieve historical dialogue information;

[0016] Key information is extracted from the historical dialogue information and the input / output information to obtain key information extraction results;

[0017] Store the extracted key information results.

[0018] Optionally, the step of generating a session result based on the historical reasoning information includes:

[0019] The conversation reasoning process is determined based on the historical reasoning information;

[0020] If the conversation reasoning process meets the preset reasoning termination condition, a conversation result is generated based on the output information of the target agent in the historical reasoning information.

[0021] Optionally, after the step of determining the conversation reasoning process based on the historical reasoning information, the method further includes:

[0022] If the preset reasoning termination condition is not met during the conversation reasoning process, a target intelligent prompt word is generated based on the historical reasoning information;

[0023] The target intelligent prompt is input into the target intelligent agent so that the target intelligent agent generates a conversation result based on the target intelligent prompt.

[0024] Optionally, after the step of generating the session result based on the historical reasoning information, the method further includes:

[0025] In response to the user's optimization command, the target to be optimized is determined based on the optimization command;

[0026] Based on the historical reasoning information, determine the original agent input information corresponding to the target to be optimized;

[0027] The original intelligent agent input information is optimized based on the optimization instructions to obtain the target intelligent agent input information;

[0028] The target agent responds to the optimization instructions based on the input information from the target agent.

[0029] Optionally, the step of optimizing the original agent input information based on the optimization instructions to obtain the target agent input information includes:

[0030] The optimization prompt words are determined based on the optimization instructions;

[0031] The original agent input information is adjusted based on the optimized prompt words to obtain the target agent input information.

[0032] Optionally, the session results include the generated images;

[0033] Following the step of generating the session result based on the historical reasoning information, the method further includes:

[0034] If a defect is detected in the image, the generation process information of the image is determined based on the historical reasoning information;

[0035] The input information in the generation process is adjusted based on the defect information of the image, and the target agent regenerates the image based on the adjusted input information.

[0036] Optionally, after the step of generating the session result based on the historical reasoning information, the method further includes:

[0037] If no further conversation with the user is received within a preset time period, the stored historical reasoning information is deleted.

[0038] Furthermore, to achieve the above objectives, this application also proposes a conversation device, the conversation device comprising:

[0039] The response module is used to respond to the user's instruction to continue the session, and to obtain the stored historical reasoning information of the target agent based on the instruction to continue the session. The historical reasoning information includes the input and output information and / or tool call information of the target agent during the execution of the session task.

[0040] The session result generation module is used to generate session results based on the historical reasoning information.

[0041] Optionally, the response module is further configured to generate input information for the target agent based on the user's conversation information, the input information including intelligent prompts generated based on the conversation information;

[0042] Obtain the output information fed back by the target intelligent agent based on the input information;

[0043] The input and output information is determined based on the input information and the output information, and the input and output information is stored.

[0044] Optionally, the response module is further configured to invoke the corresponding target tool based on the tool invocation request when the output information is a tool invocation request;

[0045] Obtain the tool call information fed back by the target tool based on the tool call request, and store the tool call information.

[0046] Optionally, the response module is further configured to obtain historical dialogue information if the input / output information is not the first input / output information;

[0047] Key information is extracted from the historical dialogue information and the input / output information to obtain key information extraction results;

[0048] Store the extracted key information results.

[0049] Optionally, the conversation result generation module is further configured to determine the conversation reasoning process based on the historical reasoning information;

[0050] If the conversation reasoning process meets the preset reasoning termination condition, a conversation result is generated based on the output information of the target agent in the historical reasoning information.

[0051] Optionally, the conversation result generation module is further configured to generate target intelligent prompt words based on the historical reasoning information when the conversation reasoning process does not meet the preset reasoning termination condition;

[0052] The target intelligent prompt is input into the target intelligent agent so that the target intelligent agent generates a conversation result based on the target intelligent prompt.

[0053] Optionally, the session result generation module is further configured to respond to the user's optimization instruction and determine the optimization target based on the optimization instruction;

[0054] Based on the historical reasoning information, determine the original agent input information corresponding to the target to be optimized;

[0055] The original intelligent agent input information is optimized based on the optimization instructions to obtain the target intelligent agent input information;

[0056] The target agent responds to the optimization instructions based on the input information from the target agent.

[0057] Optionally, the conversation result generation module is further configured to determine optimized prompt words based on the optimization instructions;

[0058] The original agent input information is adjusted based on the optimized prompt words to obtain the target agent input information.

[0059] Optionally, the session result includes the generated image; the session result generation module is further configured to determine the image generation process information based on the historical reasoning information when a defect is detected in the image.

[0060] The input information in the generation process is adjusted based on the defect information of the image, and the target agent regenerates the image based on the adjusted input information.

[0061] Optionally, the session result generation module is further configured to delete the stored historical reasoning information if no further session with the user is received within a preset time period.

[0062] In addition, to achieve the above objectives, this application also proposes a session device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the session method as described above.

[0063] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the session method as described above.

[0064] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the session method as described above.

[0065] This application responds to a user's command to continue the session, and retrieves stored historical reasoning information of the target agent based on the command. This historical reasoning information includes the target agent's input / output information and / or tool call information during the execution of the session task. A session result is then generated based on this historical reasoning information. Since this application generates the session result based on stored historical reasoning information of the target agent, compared to existing methods that require the user to repeat submitted dialogue content in case of session interruption, this method avoids repetitive input and improves the user experience. Attached Figure Description

[0066] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0067] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0068] Figure 1 This is a flowchart illustrating the first embodiment of the session method in this application.

[0069] Figure 2 This is a flowchart illustrating the second embodiment of the session method in this application.

[0070] Figure 3 This is a flowchart illustrating the third embodiment of the session method in this application.

[0071] Figure 4 This is a schematic diagram of the module structure of the session device according to an embodiment of this application;

[0072] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the session method in this application embodiment.

[0073] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0074] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0075] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0076] The main solution of this application embodiment is: in response to the user's instruction to continue the session, the stored historical reasoning information of the target agent is obtained based on the instruction, the historical reasoning information including the input / output information and / or tool call information of the target agent during the execution of the session task; a session result is generated based on the historical reasoning information. Since this application generates the session result based on the stored historical reasoning information of the target agent, compared to the existing method that requires the user to repeat the submitted dialogue content in the event of a session interruption, the above method of this application can avoid repeated input by the user and improve the user interaction experience.

[0077] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or session device capable of performing the above functions. The following description uses a session device as an example to illustrate this embodiment and the subsequent embodiments.

[0078] Based on this, the embodiments of this application provide a session method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the session method in this application.

[0079] In this embodiment, the session method includes the following steps:

[0080] Step S10: In response to the user's instruction to continue the session, obtain the stored historical reasoning information of the target agent based on the instruction to continue the session. The historical reasoning information includes the input and output information and / or tool call information of the target agent during the execution of the session task.

[0081] It should be noted that the "continue session" command can be a user-initiated session command after a previous session has failed. It can carry new session content or simply be a command to continue the session. The target intelligent agent can be an intelligent agent set up in the session device, hereinafter referred to as an intelligent agent, used to simulate human perception, understanding, and decision-making abilities, providing users with efficient, accurate, and personalized information interaction and task execution services. The session device includes at least one intelligent agent. When multiple intelligent agents are set up, they can cooperate to jointly execute user-issued tasks, i.e., session tasks, such as question-and-answer tasks, video generation tasks, and planning tasks. The input and output information can include the input and output information of the intelligent agent. The input information can be intelligent prompts generated based on the user's session task and analyzed and reasoned by the intelligent agent. The output information can be the analysis results or tool call requests output by the intelligent agent. The historical reasoning information can also include the user's historical question-and-answer records, unsubmitted content entered by the user in the input buffer, and dialogue state parameters maintained by the server.

[0082] Step S20: Generate a session result based on the historical reasoning information.

[0083] It should be noted that generating the session result based on the historical reasoning information can involve obtaining the agent's last output information from the historical reasoning results, determining whether the output information corresponds to the user's session task, and if so, directly outputting the last output information as the session result. If the output information does not correspond to the user's session task, the type of the output information is determined, and the session task is further executed based on the type of the output information until the session result corresponding to the user's session task is obtained. The type of the output information can include tool invocation, execution failure, etc. If the output information is tool invocation information, the corresponding tool is invoked based on the tool invocation information, and the session task is further executed based on the feedback result of the invoked tool until the session result is obtained. If the output information is execution failure, the agent's intelligent prompts are regenerated based on the reason for the execution failure and the user's session task, and the session result is obtained through the agent.

[0084] Furthermore, in order to improve the user experience, step S20 may include: determining the session reasoning process based on the historical reasoning information;

[0085] If the conversation reasoning process meets the preset reasoning termination condition, a conversation result is generated based on the output information of the target agent in the historical reasoning information.

[0086] If the preset reasoning termination condition is not met during the conversation reasoning process, a target intelligent prompt word is generated based on the historical reasoning information;

[0087] The target intelligent prompt is input into the target intelligent agent so that the target intelligent agent generates a conversation result based on the target intelligent prompt.

[0088] It should be noted that the conversational reasoning process can be a series of logical deductions and analyses undertaken by the conversational device to understand user needs, solve problems, and generate appropriate responses. This can include user input, agent output, historical interaction records, and preset reasoning rules. The preset reasoning termination condition can be a predefined condition used to determine whether the current reasoning has reached its endpoint. For example, the target agent's output may satisfy the core requirements, such as the output answer covering all user questions or the reasoning steps covering all necessary stages. Determining whether the conversational reasoning process satisfies the preset reasoning termination condition can be done by judging whether the current agent's output satisfies the user's core requirements. If so, the conversational reasoning process satisfies the preset reasoning termination condition, and the conversation result can be directly determined based on the output information that satisfies the user's core requirements. Otherwise, historical reasoning information is obtained, and a target intelligent prompt word is generated based on the historical reasoning information and the user's core requirements, so that the target agent can continue analysis and processing based on the target intelligent prompt word to generate the conversation result.

[0089] Furthermore, to avoid storing too much historical reasoning information and occupying storage space, this embodiment deletes the stored historical reasoning information if no further conversation with the user is received within a preset time period.

[0090] It should be noted that the preset duration can be a pre-set time, such as 2 hours or a day. Alternatively, the storage space can be set to a fixed size. Once the storage space is full, if new historical reasoning information needs to be stored, the oldest stored historical reasoning information will be deleted first to free up storage space, based on the storage duration of the stored historical reasoning information, before storing the new historical reasoning information. The historical reasoning information with the longest storage time that needs to be deleted can be determined based on the storage space occupied by the historical reasoning information to be stored.

[0091] In this embodiment, in response to a user's command to continue the session, the system retrieves stored historical reasoning information of the target agent based on the command. This historical reasoning information includes the target agent's input / output information and / or tool call information during the execution of the session task. A session result is then generated based on this historical reasoning information. Since this embodiment generates the session result based on stored historical reasoning information of the target agent, compared to existing methods that require the user to repeat submitted dialogue content in case of session interruption, this embodiment avoids repetitive input by the user, thus improving the user experience.

[0092] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the session method of this application. Before step S10, the following steps are also included:

[0093] Step S001: Generate input information for the target agent based on the user's conversation information, wherein the input information includes intelligent prompts generated based on the conversation information;

[0094] It should be noted that the conversational information can be various content conveyed by the user when interacting with the conversational device, and its form can be diverse, including but not limited to text-based questions, statements, and instructions. The intelligent prompt words can be prompts generated based on the user's conversational information. They are highly refined and optimized versions of the user's conversational information, presented in a way that is more suitable for the intelligent agent to understand and process. For example, if the user's conversational information is "I want a recommendation for brightly colored clothes suitable for summer," then the generated intelligent prompt word might be "Recommend brightly colored clothes suitable for summer."

[0095] Step S002: Obtain the output information fed back by the target intelligent agent based on the input information;

[0096] It should be noted that the output information may be the result generated by the target intelligent agent after receiving and processing the input information. It is derived by the target intelligent agent after analyzing and making decisions based on the input information, and is intended to meet the user's needs or solve the problems raised by the user.

[0097] Step S003: Determine the input and output information based on the input information and the output information, and store the input and output information.

[0098] It should be noted that determining the input and output information based on the input information and the output information can mean using the input information and the output information as the input and output information. If there are multiple rounds of dialogue, the input and output information is the input and output information in the multiple rounds of dialogue.

[0099] Furthermore, while intelligent agents are powerful language understanding and generation tools, they typically have the following limitations: they cannot directly access local files or private data, and they lack awareness of domain-specific toolchains (such as code editors and design tools). Therefore, during the process of handling tasks, intelligent agents may need to call external tools to execute user session tasks. After step S002, the method further includes: if the output information is a tool call request, calling the corresponding target tool based on the tool call request.

[0100] Obtain the tool call information fed back by the target tool based on the tool call request, and store the tool call information.

[0101] It should be noted that the tool invocation request can be information from the agent calling an external tool, such as calling an external database or accessing a local file. The tool invocation information can be information returned by the target tool to the agent based on the tool invocation request. For example, if the agent needs to access data in an external database, the target tool is the database, and the tool invocation information is the data query result returned by the database.

[0102] Furthermore, to avoid excessive input and output information that would consume storage resources, historical dialogue information is obtained when the input and output information is not the first input and output information.

[0103] Key information is extracted from the historical dialogue information and the input / output information to obtain key information extraction results;

[0104] Store the extracted key information results.

[0105] It should be noted that the historical dialogue information may include content input by the user during the dialogue. The key information extraction from the historical dialogue information and the input / output information can be achieved through technologies such as natural language processing, semantic analysis, and entity recognition, extracting core content that is of significant value to subsequent processing. This key information may include: the user's core needs, key task information, conclusions or intermediate results from historical interactions, etc.

[0106] Furthermore, to avoid storing session information for each session and consuming storage resources, this embodiment can monitor network status in real time and begin storing session information when the network monitoring results indicate that the current network status is poor. The network status may include at least one of the following: network bandwidth, signal strength, connection stability, etc. Poor network status can be caused by any of the above network conditions failing to meet a preset threshold. This preset threshold can be customized based on the network status at the time of historical session interruptions.

[0107] In this embodiment, input information for the target agent is generated based on the user's conversation information, including intelligent prompts generated according to the conversation information; output information fed back by the target agent based on the input information is obtained; input-output information is determined based on the input information and the output information, and the input-output information is stored. By storing the input-output information, this embodiment enables the conversation to continue after an interruption without requiring the user to repeatedly input conversation tasks, thus improving the user experience.

[0108] Based on the above embodiments of this application, in the third embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 , Figure 3 This is a flowchart illustrating the third embodiment of the session method of this application. After step S20, the following steps are also included:

[0109] Step S301: In response to the user's optimization instruction, determine the target to be optimized based on the optimization instruction;

[0110] It should be noted that, since this embodiment stores historical reasoning information from the session, it is possible to trace back to any session step based on this information. The optimization instruction can be a modification suggestion made by the user for any step in the session. The target to be optimized can be the output information of the agent corresponding to the optimization instruction. For example, in the video generation process, the agent outputs an image, and the user finds a continuity error in the image and points it out. The image with the continuity error is the target to be optimized, and the optimization instruction is that the image contains a continuity error. The user can also point out a continuity error in the image generated in the video synthesis step after the video has been synthesized. In this case, the agent can find the context of the generated image based on historical reasoning information and then regenerate the image.

[0111] Step S302: Determine the original agent input information corresponding to the target to be optimized based on the historical reasoning information;

[0112] It should be noted that the original intelligent agent input information can be the input information given to the intelligent agent when generating the target to be optimized. For example, the video generation process includes script generation, storyboard generation, image generation, and video compositing. After video compositing, if the user believes the script does not meet expectations and needs to regenerate it, the target to be optimized is the story script. The original intelligent agent input information can be intelligent prompts given to the intelligent agent to generate the script. For example: expanding the story of the Three Little Pigs.

[0113] Step S303: Optimize the original intelligent agent input information based on the optimization instructions to obtain the target intelligent agent input information;

[0114] It should be noted that optimizing the original intelligent agent input information based on the optimization instructions can be done by optimizing the original intelligent agent input information according to the optimization instructions. For example, if the original intelligent agent input information is to expand a story about three little pigs, but the user feels that the storyline is too monotonous and needs to generate a story about three little pigs building a house together, then the optimized target intelligent agent input information can be to generate a story about three little pigs building a house together.

[0115] Furthermore, in order to make the output information of the intelligent agent more in line with the user's expectations, step S303 may include: determining optimized prompt words based on the optimization instructions;

[0116] The original agent input information is adjusted based on the optimized prompt words to obtain the target agent input information.

[0117] It should be noted that the optimization prompt can be a keyword in the optimization instruction. For example, if the optimization instruction is "there is a continuity error," then the optimization prompt can be "continuation error"; if the optimization instruction is "add a scene of building a house," then the optimization prompt can be "building a house." Adjusting the original agent input information based on the optimization prompt to obtain the target agent input information can be achieved by adding the optimization prompt as the user's core requirement to the original agent input information.

[0118] Step S304: The target agent responds to the optimization command based on the target agent input information.

[0119] It should be noted that the optimization instruction is responded to by the target intelligent agent based on the target intelligent agent's input information.

[0120] Furthermore, the session result includes the generated image; after the step of generating the session result based on the historical reasoning information, the method further includes:

[0121] If a defect is detected in the image, the generation process information of the image is determined based on the historical reasoning information;

[0122] The input information in the generation process is adjusted based on the defect information of the image, and the target agent regenerates the image based on the adjusted input information.

[0123] It should be noted that detecting image defects can be done by detecting defects in the image based on user requirements, determining whether the generated image meets the user's needs, and if not, determining that the image has defects. It can also include detecting continuity errors, such as whether the generated figure has more than two hands. The generation process information can include the input information of the intelligent agent used to generate the image. Adjusting the input information in the generation process information based on the image defect information can be done by adjusting the input information of the intelligent agent used to generate the image based on the image defects. For example, if the generated image does not meet the user's needs due to the lack of a certain entity, the adjusted input information could be a prompt containing the missing entity; if the figure in the image has three hands, the adjusted input information could include: "Note that a person can only have a maximum of two hands."

[0124] This embodiment responds to the user's optimization command, determines the target to be optimized based on the optimization command, determines the original agent input information corresponding to the target to be optimized based on the historical reasoning information, optimizes the original agent input information based on the optimization command to obtain the target agent input information, and then the target agent responds to the optimization command based on the target agent input information. Since this embodiment stores historical reasoning information during the conversation, for any dialogue, this embodiment can trace back to any conversation step based on the historical reasoning information and then continue the conversation on that basis, avoiding the need for the user to repeat previous content when needing to return to a certain question stage.

[0125] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the session method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0126] This application also provides a conversational device, please refer to... Figure 4 The session device includes:

[0127] The response module 10 is used to respond to the user's instruction to continue the session, and to obtain the stored historical reasoning information of the target agent based on the instruction to continue the session. The historical reasoning information includes the input and output information and / or tool call information of the target agent during the execution of the session task.

[0128] The conversation result generation module 20 is used to generate conversation results based on the historical reasoning information.

[0129] In this embodiment, in response to a user's command to continue the session, the system retrieves stored historical reasoning information of the target agent based on the command. This historical reasoning information includes the target agent's input / output information and / or tool call information during the execution of the session task. A session result is then generated based on this historical reasoning information. Since this embodiment generates the session result based on stored historical reasoning information of the target agent, compared to existing methods that require the user to repeat submitted dialogue content in case of session interruption, this embodiment avoids repetitive input by the user, thus improving the user experience.

[0130] The conversation device provided in this application, employing the conversation method in the above embodiments, can solve the technical problem that users need to repeat the conversation content after a conversation is interrupted, resulting in a poor user experience. Compared with the prior art, the beneficial effects of the conversation device provided in this application are the same as those of the conversation method provided in the above embodiments, and other technical features in the conversation device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0131] This application provides a session device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the session method in Embodiment 1 above.

[0132] The following is for reference. Figure 5 The diagram illustrates a structural schematic of a session device suitable for implementing embodiments of this application. The session device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The session device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0133] like Figure 5As shown, the session device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the session device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the session device to communicate wirelessly or wiredly with other devices to exchange data. While session devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0134] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0135] The conversation device provided in this application, employing the conversation method in the above embodiments, can solve the technical problem that users need to repeat the conversation content after a conversation is interrupted, resulting in a poor user experience. Compared with the prior art, the beneficial effects of the conversation device provided in this application are the same as those of the conversation method provided in the above embodiments, and other technical features in this conversation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0136] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0137] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0138] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the session method in the above embodiments.

[0139] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0140] The aforementioned computer-readable storage medium may be included in the session device or may exist independently without being assembled into the session device.

[0141] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0142] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0143] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0144] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described session method. This solves the technical problem that users need to repeat session content after a session is interrupted, leading to a poor user experience. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the session method provided in the above embodiments, and will not be repeated here.

[0145] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the session method as described above.

[0146] The computer program product provided in this application can solve the technical problem that users need to repeat the conversation content after the conversation is interrupted, resulting in a poor user experience. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the conversation method provided in the above embodiments, and will not be repeated here.

[0147] The above description is only a part of the embodiments of this application and does not limit the scope of protection of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included in the scope of protection of this application.

[0148] This application discloses A1. A session method, which includes the following steps:

[0149] In response to the user's instruction to continue the session, the stored historical reasoning information of the target agent is obtained based on the instruction to continue the session. The historical reasoning information includes the input and output information and / or tool call information of the target agent during the execution of the session task.

[0150] The session results are generated based on the historical reasoning information.

[0151] A2. The session method as described in A1, prior to the step of obtaining the stored historical reasoning information of the target agent based on the user's continuation session instruction, the method further includes:

[0152] The input information of the target intelligent agent is generated based on the user's conversation information, and the input information includes intelligent prompt words generated based on the conversation information;

[0153] Obtain the output information fed back by the target intelligent agent based on the input information;

[0154] The input and output information is determined based on the input information and the output information, and the input and output information is stored.

[0155] A3. The conversation method as described in A2, after the step of obtaining the output information fed back by the target agent based on the input information, further includes:

[0156] If the output information is a tool invocation request, the corresponding target tool is invoked based on the tool invocation request;

[0157] Obtain the tool call information fed back by the target tool based on the tool call request, and store the tool call information.

[0158] A4. The session method as described in A2, wherein the step of storing the input / output information includes:

[0159] If the input / output information is not the first input / output information, retrieve historical dialogue information;

[0160] Key information is extracted from the historical dialogue information and the input / output information to obtain key information extraction results;

[0161] Store the extracted key information results.

[0162] A5. The conversation method as described in A1, wherein the step of generating a conversation result based on the historical reasoning information includes:

[0163] The conversation reasoning process is determined based on the historical reasoning information;

[0164] If the conversation reasoning process meets the preset reasoning termination condition, a conversation result is generated based on the output information of the target agent in the historical reasoning information.

[0165] A6. The conversation method as described in A5, after the step of determining the conversation reasoning process based on the historical reasoning information, further includes:

[0166] If the preset reasoning termination condition is not met during the conversation reasoning process, a target intelligent prompt word is generated based on the historical reasoning information;

[0167] The target intelligent prompt is input into the target intelligent agent so that the target intelligent agent generates a conversation result based on the target intelligent prompt.

[0168] A7. The conversation method as described in any one of A1-6, further comprising, after the step of generating the conversation result based on the historical reasoning information:

[0169] In response to the user's optimization command, the target to be optimized is determined based on the optimization command;

[0170] Based on the historical reasoning information, determine the original agent input information corresponding to the target to be optimized;

[0171] The original intelligent agent input information is optimized based on the optimization instructions to obtain the target intelligent agent input information;

[0172] The target agent responds to the optimization instructions based on the input information from the target agent.

[0173] A8. The conversation method as described in A7, wherein the step of optimizing the original agent input information based on the optimization instruction to obtain the target agent input information includes:

[0174] The optimization prompt words are determined based on the optimization instructions;

[0175] The original agent input information is adjusted based on the optimized prompt words to obtain the target agent input information.

[0176] A9. The session method as described in any one of A1-6, wherein the session result includes the generated image;

[0177] Following the step of generating the session result based on the historical reasoning information, the method further includes:

[0178] If a defect is detected in the image, the generation process information of the image is determined based on the historical reasoning information;

[0179] The input information in the generation process is adjusted based on the defect information of the image, and the target agent regenerates the image based on the adjusted input information.

[0180] A10. The conversation method as described in any one of A1-6, further comprising, after the step of generating a conversation result based on the historical reasoning information:

[0181] If no further conversation with the user is received within a preset time period, the stored historical reasoning information is deleted.

[0182] This application discloses B11. A conversation device, the conversation device comprising:

[0183] The response module is used to respond to the user's instruction to continue the session, and to obtain the stored historical reasoning information of the target agent based on the instruction to continue the session. The historical reasoning information includes the input and output information and / or tool call information of the target agent during the execution of the session task.

[0184] The session result generation module is used to generate session results based on the historical reasoning information.

[0185] B12. The conversational device as described in B10, wherein the response module is further configured to generate input information for the target intelligent agent based on the user's conversational information, the input information including intelligent prompt words generated according to the conversational information;

[0186] Obtain the output information fed back by the target intelligent agent based on the input information;

[0187] The input and output information is determined based on the input information and the output information, and the input and output information is stored.

[0188] B13. The session device as described in B12, wherein the response module is further configured to invoke the corresponding target tool based on the tool invocation request when the output information is a tool invocation request;

[0189] Obtain the tool call information fed back by the target tool based on the tool call request, and store the tool call information.

[0190] B14. The conversational device as described in B12, wherein the response module is further configured to acquire historical conversation information when the input / output information is not the first input / output information;

[0191] Key information is extracted from the historical dialogue information and the input / output information to obtain key information extraction results;

[0192] Store the extracted key information results.

[0193] B15. The conversation device as described in B12, wherein the conversation result generation module is further configured to determine the conversation reasoning process based on the historical reasoning information;

[0194] If the conversation reasoning process meets the preset reasoning termination condition, a conversation result is generated based on the output information of the target agent in the historical reasoning information.

[0195] B16. The conversation device as described in B15, wherein the conversation result generation module is further configured to generate target intelligent prompt words based on the historical reasoning information when the conversation reasoning process does not meet the preset reasoning termination condition;

[0196] The target intelligent prompt is input into the target intelligent agent so that the target intelligent agent generates a conversation result based on the target intelligent prompt.

[0197] B17. The conversation apparatus as described in any one of B11-16, wherein the conversation result generation module is further configured to, in response to an optimization instruction from a user, determine the target to be optimized based on the optimization instruction;

[0198] Based on the historical reasoning information, determine the original agent input information corresponding to the target to be optimized;

[0199] The original intelligent agent input information is optimized based on the optimization instructions to obtain the target intelligent agent input information;

[0200] The target agent responds to the optimization instructions based on the input information from the target agent.

[0201] This application discloses C18. A conversation device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the conversation method as described in any one of A1 to A10.

[0202] This application discloses D19. A storage medium, which is a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the session method as described in any one of A1 to A10.

[0203] This application discloses E20. A computer program product comprising a computer program that, when executed by a processor, implements the steps of a session method as described in any one of A1 to A10.

Claims

1. A session method, characterized by, The conversation method comprises the following steps: In response to a user's continue-conversation instruction, historical reasoning information of a target agent is obtained based on the continue-conversation instruction, the historical reasoning information comprising input-output information and / or tool calling information of the target agent in the process of performing a conversation task; A conversation result is generated based on the historical reasoning information.

2. The session method of claim 1, wherein, Before the step of obtaining the historical reasoning information of the target agent based on the continue-conversation instruction, the method further comprises: Input information of the target agent is generated based on conversation information of the user, the input information comprising intelligent prompt words generated according to the conversation information; Output information of the target agent is obtained based on the input information; Input-output information is determined according to the input information and the output information, and the input-output information is stored.

3. The session method of claim 2, wherein, After the step of obtaining the output information of the target agent based on the input information, the method further comprises: In the case that the output information is a tool calling request, a corresponding target tool is called based on the tool calling request; Tool calling information of the target tool is obtained based on the tool calling request, and the tool calling information is stored.

4. The session method of claim 2, wherein, The step of storing the input-output information comprises: In the case that the input-output information is not the first input-output information, historical dialogue information is obtained; Key information extraction is performed on the historical dialogue information and the input-output information to obtain a key information extraction result; The key information extraction result is stored.

5. The conversing method of claim 1, wherein, The step of generating a conversation result based on the historical reasoning information comprises: A conversation reasoning process is determined according to the historical reasoning information; In the case that the conversation reasoning process meets a preset reasoning end condition, a conversation result is generated based on output information of the target agent in the historical reasoning information.

6. The session method of claim 5, wherein, After the step of determining a conversation reasoning process according to the historical reasoning information, the method further comprises: In the case that the conversation reasoning process does not meet the preset reasoning end condition, a target intelligent prompt word is generated based on the historical reasoning information; The target intelligent prompt word is input to the target agent, so that the target agent generates a conversation result according to the target intelligent prompt word.

7. A conversational device, characterized by The conversation device comprises: A response module, configured to obtain historical reasoning information of a target agent based on a continue-conversation instruction of a user in response to the continue-conversation instruction, the historical reasoning information comprising input-output information and / or tool calling information of the target agent in the process of performing a conversation task; A conversation result generation module, configured to generate a conversation result based on the historical reasoning information.

8. A conversational device, characterized by The device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the conversation method according to any one of claims 1 to 6.

9. A storage medium, characterized by The storage medium is a computer-readable storage medium, and the storage medium stores a computer program, the computer program being executable by a processor to implement the steps of the conversation method according to any one of claims 1 to 6.

10. A computer program product, characterised in that, The computer program product comprises a computer program which, when executed by a processor, implements the steps of the session method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Dialogue interaction method and device, computer equipment and computer readable storage medium

    CN112929499A

  • Interaction method, processing equipment and storage medium

    CN113392207A

  • Intelligent agent questioning and answering method based on continuous questioning and related equipment

    CN120068886A