Interaction method, apparatus, agent, device, medium and product

By using a first language model to filter target items and generate response prompts, and combining a second language model with preset prompts, the problem of inaccurate reflection of user preferences in existing question-and-answer systems is solved, achieving accuracy and consistency in personalized interactive responses.

CN122489708APending Publication Date: 2026-07-31BAIDU COM TIMES TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BAIDU COM TIMES TECH (BEIJING) CO LTD
Filing Date
2026-05-09
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing question-and-answer systems fail to accurately reflect users' true preferences, resulting in discrepancies between responses and user needs.

Method used

By using a first language model to filter target items that are semantically related to the request content, generating response prompts, and inputting them along with the request content into a second language model to generate an interactive response, personalized replies are then provided in conjunction with preset prompts.

Benefits of technology

It improves the memory utilization efficiency of the interactive system in multi-turn dialogues, enhances the consistency and generation quality of responses, and ensures the accuracy and personalization of replies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122489708A_ABST
    Figure CN122489708A_ABST
Patent Text Reader

Abstract

This disclosure provides an interaction method, apparatus, intelligent agent, device, medium, and product, relating to the field of artificial intelligence, particularly to large-scale models, deep learning, and natural language processing. The specific implementation scheme is as follows: In response to receiving an interaction request, the request content and memory information generated from historical interactions are input into a first language model, wherein the memory information includes multiple memory items, each memory item having multiple state information that changes with historical interactions; the first language model determines a target item semantically associated with the request content from the multiple memory items; the request content and response prompt information generated based on the target item are input into a second language model to obtain an output interaction response, wherein the response prompt information is used to describe the changes in the state information of the target item.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence, and more particularly to the fields of large models, deep learning, and natural language processing. More specifically, this disclosure provides an interaction method, apparatus, intelligent agent, device, medium, and product. Background Technology

[0002] With the widespread application of large-scale models in intelligent question-answering systems, users expect personalized interactive experiences. However, when existing question-answering systems utilize users' historical memories to provide personalized responses, they often fail to accurately reflect the true state of users' preferences, resulting in discrepancies between the responses and the users' actual needs. Summary of the Invention

[0003] This disclosure provides an interaction method, apparatus, intelligent agent, device, medium, and product.

[0004] According to one aspect of this disclosure, an interaction method is provided, comprising: in response to receiving an interaction request, inputting the request content in the interaction request and memory information generated from historical interactions into a first language model, wherein the memory information includes multiple memory items, each memory item having multiple state information that changes with historical interactions; determining a target item semantically associated with the request content from the multiple memory items through the first language model; inputting the request content and response prompt information generated based on the target item into a second language model to obtain an output interaction response, wherein the response prompt information is used to describe the changes in the state information of the target item.

[0005] According to another aspect of this disclosure, an interactive device is provided, comprising: an information input module, configured to, in response to receiving an interactive request, input the request content of the interactive request and memory information generated from historical interactions into a first language model, wherein the memory information includes multiple memory items, each memory item having multiple state information that changes with historical interactions; a target determination module, configured to, through the first language model, determine a target item semantically associated with the request content from the multiple memory items; and a response output module, configured to input the request content and response prompt information generated based on the target item into a second language model to obtain an output interactive response, wherein the response prompt information is used to describe the changes in the state information of the target item.

[0006] According to another aspect of this disclosure, an intelligent agent for prompting output is provided, comprising: a first input module for receiving an interaction request; a first processing module for determining a target task based on the interaction request received by the input module, determining a first language model based on the target task, and obtaining response prompt information by invoking the first language model and executing the above method; and a first output module for outputting the response prompt information obtained by the processing module.

[0007] According to another aspect of this disclosure, an intelligent agent for responding to output is provided, comprising: a second input module for receiving interaction requests and response prompts; a second processing module for determining a target task based on the interaction requests and response prompts received by the input module, and determining a second language model based on the target task; obtaining an interaction response by invoking the second language model and executing the above method; and a second output module for outputting the interaction response obtained by the processing module.

[0008] According to another aspect of this disclosure, an electronic device is provided, comprising: 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, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above.

[0009] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause a computer to perform the methods described above.

[0010] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described above.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0012] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0013] Figure 1 This illustration schematically shows an exemplary system architecture to which interactive methods and apparatus can be applied according to embodiments of the present disclosure;

[0014] Figure 2 A flowchart illustrating an interaction method according to an embodiment of the present disclosure is shown schematically;

[0015] Figure 3 A flowchart illustrating the first language model processing of the interaction method according to an embodiment of the present disclosure is shown schematically.

[0016] Figure 4 A schematic diagram illustrating a short-term memory management method according to an embodiment of the present disclosure is shown.

[0017] Figure 5 A block diagram of an interactive device according to an embodiment of the present disclosure is shown schematically;

[0018] Figure 6A schematic diagram illustrating the structure of an intelligent agent of artificial intelligence according to embodiments of the present disclosure is shown.

[0019] Figure 7 A block diagram of an electronic device suitable for implementing an interaction method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation

[0020] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0021] Figure 1 The illustration schematically depicts an exemplary system architecture to which content processing methods and apparatus can be applied according to embodiments of the present disclosure.

[0022] It is important to note that Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments, or scenarios. For example, in another embodiment, an exemplary system architecture to which the content processing methods and apparatus can be applied may include a terminal device, but the terminal device may implement the content processing methods and apparatus provided by the embodiments of this disclosure without interacting with the server.

[0023] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0024] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (for example only).

[0025] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0026] Server 105 can be a server that provides various services, such as a backend management server that supports the content browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0027] It should be noted that the content processing method provided in the embodiments of this disclosure can generally be executed by terminal devices 101, 102, or 103. Accordingly, the interactive device provided in the embodiments of this disclosure can also be disposed in terminal devices 101, 102, or 103.

[0028] Alternatively, the content processing method provided in this embodiment can generally be executed by server 105. Correspondingly, the interactive device provided in this embodiment can generally be located in server 105. The content processing method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the interactive device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105.

[0029] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0030] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, and application of any type of information, such as user personal information, comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and they do not violate public order and good morals.

[0031] In the technical solution disclosed herein, the user's authorization or consent is obtained before acquiring or collecting the user's personal information.

[0032] Figure 2 A flowchart illustrating a content processing method according to an embodiment of this disclosure is shown schematically.

[0033] like Figure 2 As shown, the method includes operations S210~S230.

[0034] In operation S210, in response to receiving an interaction request, the request content in the interaction request and the memory information generated by the historical interaction are input into the first language model. The memory information includes multiple memory items, and each memory item has multiple state information that changes with the historical interaction.

[0035] In operation S220, the target item that is semantically associated with the requested content is determined from multiple memory items using a first language model.

[0036] In operation S230, the request content and the response prompt information generated based on the target item are input into the second language model to obtain the output interactive response, wherein the response prompt information is used to describe the changes in the status information of the target item.

[0037] When a user initiates an interaction request through the client, the client receives that request. This request must contain at least the content of the user's current input, such as a question or instruction. Simultaneously, the client retrieves memory information generated from the user's historical interactions.

[0038] This memory information is pre-stored in a memory bank, organized as multiple memory items. Each memory item corresponds to a specific memory theme, such as the user's age, occupation, color preference, or taste preference. It's important to note that each memory item does not simply store a single state value, but rather contains multiple state information that changes over time. For example, the memory item for "color preference" might sequentially record the user's expressions of "white," "black," and "red" at different points in time.

[0039] The request content from the interaction request, along with memory information retrieved from the memory bank, is fed into the first language model. This first language model is a finely tuned, lightweight language model with a smaller parameter size than the second language model subsequently used to generate the final response. The task of the first language model is to filter out target items from the memory information that are semantically relevant to the request content.

[0040] After identifying the target items, the first language model needs to generate response prompts to describe the changes in state information of these target items. These response prompts can be a piece of natural language to describe the trend of state change (such as "the user's color preference is gradually shifting from white to red") and the most reliable state information at present (such as "the most reliable color preference at present is red").

[0041] The original request content and the generated response prompts are input into the second language model. The second language model is typically a larger, more general model with more parameters, used to generate the final user interaction response. Importantly, while receiving the request content and response prompts, the second language model is also configured with preset prompts (i.e., system prompts). These preset prompts define the model's response rules, such as behavioral constraints like "user privacy must be protected," "responses should be concise," and "inappropriate content should not be output." Under the constraints of the preset prompts, the second language model combines the request content and response prompts to perform reasoning and generate the final interaction response.

[0042] For example, if a user's interaction request is "Recommend a restaurant," and the response message is "User has a medium to high budget, prefers spicy food, and dislikes cilantro," the second language model, while adhering to rules such as "privacy protection," would output a reply similar to "Based on your taste preferences, we recommend the following spicy restaurants, with an average cost of approximately 200-300 yuan per person, and the dishes do not contain cilantro." Finally, this interaction response is returned to the user, completing the personalized question-and-answer process.

[0043] By inputting the request content from the interactive request along with multiple state memory information generated from historical interactions into the first language model, the target memory item is selected through semantic association. Then, response prompts are generated based on the changes in the state information of the target item. Finally, the response prompts and the request content are fed into the second language model to obtain the output interactive response. This achieves effective tracking and structured expression of dynamically evolving memory states, enabling the second language model to clearly perceive the state change trajectory of memory items when generating interactive responses, thereby generating responses that are both factually accurate and contextually coherent.

[0044] Meanwhile, by leveraging the semantic filtering of memory items using a first-language model, the interference of irrelevant memories on the generation process is reduced, thus lowering computational redundancy. Furthermore, the response prompts, as explicit descriptions of state changes, further enhance the interpretability and controllability of the model regarding memory evolution, thereby improving the overall memory utilization efficiency, response consistency, and generation quality of the interactive system in multi-turn dialogues.

[0045] Figure 3 A flowchart illustrating the first language model processing of the interaction method according to an embodiment of the present disclosure is shown schematically.

[0046] like Figure 3As shown, the system obtains the user's input request content and its accompanying contextual information. The contextual information includes historical dialogue content from several rounds prior to the current dialogue turn, used to help the first language model understand the complete semantic background and referential relationships of the user's request. Simultaneously, it reads memory information generated from historical interactions. The first language model filters and processes noise and unreasonable data in the memory information, for example, removing memory entries that are irrelevant to the current request or have low confidence.

[0047] The first language model performs a memory recall operation, filtering out memory items that are semantically related to the requested content from the cleaned memory information. After recalling the memory items, the first language model further identifies state information that contains sensitive state information (such as income, health status, etc.), and converts it into a general description according to the pre-labeled risk category, thus completing the rewriting of sensitive state information.

[0048] The first language model generates a natural language response prompt based on the change trajectory of processed memory items and state information. This prompt describes the changing trend of user preferences and the current trust status, thereby providing accurate, desensitized, and dynamically evolving personalized guidance for the subsequent second language model.

[0049] According to embodiments of this disclosure, determining a target item semantically associated with the request content from multiple memory items using a first language model includes: performing semantic analysis on the request content and each memory item using the first language model to determine multiple candidate items semantically associated with the request content from multiple memory items; determining a comprehensive confidence level for each candidate item based on the target confidence level of each state information in each candidate item, wherein the target confidence level represents the reliability of the state information, and the target confidence level is dynamically updated based on the frequency of the state information appearing in historical interactions; and determining the target item from multiple candidate items based on the comprehensive confidence level of each candidate item.

[0050] After receiving the user's request content and all memory items retrieved from the memory bank, the first language model needs to perform semantic analysis on the request content and each memory item. Specifically, the first language model uses its internal semantic encoding layer to vectorize the topic description of the request content and each memory item, and then calculates the semantic relevance score between the request content and each memory item by calculating the cosine similarity or dot product similarity between the vectors.

[0051] The first-language model sorts these relevance scores from highest to lowest and selects the top few memory items with scores exceeding a preset threshold as candidate options that are semantically associated with the request content. For example, when the request content is "recommend a restaurant," the first-language model may identify memory items such as "income level," "taste preference," "geographical location," and "dietary restrictions" as candidate options. Although these do not completely overlap with "restaurant" literally, semantic analysis can capture their potential association with consumption decisions.

[0052] After obtaining the candidate options, the first language model further performs confidence analysis on the multiple state information within each candidate option. When each state information is recorded during the historical interaction, an initial target confidence is assigned to it, and whenever the state information reappears in subsequent dialogues, its target confidence dynamically increases according to the frequency of occurrence.

[0053] For example, if a user repeatedly mentions "likes spicy food," the target confidence of the "spicy" status information under the "taste preference" memory item will gradually increase. Conversely, if a certain status information is not mentioned for a long time, its target confidence may decrease over time.

[0054] For each candidate, the first language model obtains the target confidence scores corresponding to all its state information, and then calculates the overall confidence score of the candidate according to a predefined fusion rule. The fusion rule can be the maximum or average of the target confidence scores of each state information, or a weighted summation method (e.g., assigning higher weight to the latest state information). In this way, each candidate can obtain an overall confidence score reflecting its overall reliability.

[0055] The first language model determines the final target item from multiple candidate items based on the overall confidence level of each candidate item. The determination rule can be to select the candidate item with the highest overall confidence level as the target item, or, depending on the needs of the actual application scenario, to select several candidate items with high overall confidence levels as the target item together.

[0056] For example, in a restaurant recommendation scenario, if the overall confidence level of the "income level" memory item is the highest, followed by "taste preference" and then "geographical location", the first language model can use all three candidate items as target items in order to generate more comprehensive personalized suggestions in the future.

[0057] Semantic analysis using a first language model is used to screen candidate items. Then, a comprehensive confidence score is calculated based on the target confidence score of each state information, and the target item is determined accordingly. This gives higher weight to high-frequency and reliable memory information, effectively suppresses low-confidence noise interference, thereby improving the accuracy of key memory screening and reducing response bias.

[0058] According to embodiments of this disclosure, the interaction method further includes: obtaining timestamps recorded when each state information in the target item changes during historical interactions; sorting multiple state information according to the chronological order of the timestamps to obtain a state change sequence; performing trend analysis on the state change sequence using a first language model to obtain analysis results, wherein the analysis results include at least one of the change direction, change magnitude, and change pattern of the state information in the state change sequence; and generating response prompt information describing the state change trend and credible state information based on the analysis results and the target confidence level of each state information in the state change sequence.

[0059] Once the first language model identifies the target item associated with the interaction request, it's necessary to further mine the temporal features of the state information recorded for that target item to generate response prompts. Specifically, all state information corresponding to the target item is read from the memory, and the timestamps recorded when each state information changes during historical interactions are obtained. These timestamps precisely record the exact moments when user preferences or attributes change; for example, a user might express "like white" on a certain day and then change it to "like black" at another point in time.

[0060] These state information items are arranged in ascending order according to their timestamps to form a state change sequence that reflects the evolution of user preferences over time. For example, for the target item "color preference", the resulting state change sequence may be: white (January 2025) → black (February 2025) → red (March 2025).

[0061] The first language model performs trend analysis on the state change sequence, identifies the direction of change between adjacent state information in the state change sequence (e.g., from light to dark is an increase, from dark to light is a decrease), calculates the magnitude of the state information change (e.g., from white to black is a medium magnitude, from white to red is a large magnitude), and summarizes the overall change pattern of the sequence (e.g., whether it exhibits periodic fluctuations, linear increases, random changes, etc.).

[0062] First-language models can output a structured analysis result based on internally learned semantic knowledge and reasoning ability. This analysis result includes at least one of the following: direction of change, magnitude of change, and pattern of change. For example, for a color preference sequence, the analysis result might be "the direction of change is gradually darker, the magnitude of change is moderate, and the pattern is linear progression".

[0063] After obtaining the analysis results, the first language model also incorporates the target confidence score associated with each state information in the state change sequence. The target confidence score reflects the reliability of the state information being verified in historical interactions. For example, if a user confirms "likes red" multiple times, its target confidence score is high, while "likes black" mentioned only once has a low target confidence score.

[0064] The first language model integrates the analysis results and the target confidence scores of various state information to generate a natural language response prompt. This response prompt aims to clearly describe two aspects to the subsequent second language model: first, the overall trend of user preference changes (e.g., "The user's color preference is gradually shifting from white to red"), and second, the most reliable current state information (e.g., "Based on multiple interactions, the user's most stable color preference is currently red").

[0065] If the target confidence of a certain state information is significantly low, the first language model can appropriately reduce its weight when generating response prompts, thereby minimizing the impact of inaccurate information on the final recommendation. Response prompts generated in this way include both insights into dynamic evolution and highlight the most reliable conclusions, providing high-quality personalized references for the large second language model.

[0066] According to embodiments of this disclosure, the interaction method further includes: obtaining the risk category of each state information in the state change sequence, wherein the risk category is pre-labeled based on the content type and semantic features of the state information when extracting the state information, and is used to characterize the sensitivity of the state information; determining sensitive state information whose risk category meets preset conditions from multiple state information in the state change sequence; converting the sensitive state information into a general description to obtain a converted state change sequence, and generating response prompt information based on the converted state change sequence.

[0067] To protect user privacy while utilizing user state information, the state change sequence is anonymized before generating response prompts. Each piece of state information is pre-labeled with a risk category based on its content type and semantic features when it is initially extracted and stored.

[0068] For example, status information containing specific amounts, age, health records, and identification may be labeled as "high-risk" or "sensitive"; while status information that does not involve privacy, such as color preferences and hobbies, is labeled as "low-risk" or "normal." These risk categories are stored in the database as metadata of the status information.

[0069] After the first language model generates the state change sequence of the target item, it reads the risk category corresponding to each state information in the state change sequence. Then, based on preset conditions (such as the risk category being "high risk" or "sensitive"), it filters out sensitive state information that meets the preset conditions from the state change sequence. For example, if the state change sequence includes "monthly income of 20,000 yuan", "monthly income of 30,000 yuan", and "monthly income of 35,000 yuan", these state information will all be identified as sensitive state information.

[0070] This sensitive state information is converted into a general description. For example, specific income values ​​are replaced with abstract levels such as "low to medium budget," "medium budget," and "high to medium budget," or with a vague expression like "user income is at a medium level." Non-sensitive state information (such as color preferences and taste preferences) is retained in its original form. After this conversion, the original state change sequence becomes a desensitized state change sequence.

[0071] The first language model generates response prompts based on this transformed sequence of state changes. Since sensitive state information has been replaced by a generic description, the final output response prompts will not contain any content that could pinpoint the user's specific privacy settings. This ensures personalized response prompts while enhancing the security of user information.

[0072] According to embodiments of this disclosure, multiple memory items include long-term memory items and short-term memory items; determining a target item semantically associated with the requested content from the multiple memory items using a first language model includes: determining a long-term target item and a short-term target item semantically associated with the requested content from the long-term memory items and the short-term memory items respectively using the first language model; wherein, the response prompt information includes a first prompt information and a second prompt information, the first prompt information being generated based on the state information of the long-term target item and used to describe changes in the state information of the long-term target item, and the second prompt information being generated based on the state information of the short-term target item and used to describe changes in the state information of the short-term target item; the category of the state information in the long-term memory item belongs to a long-term attribute category or preference category, and the category of the state information in the short-term memory item belongs to a temporary topic category or dynamic profile category generated by historical interactions.

[0073] The memory information is divided into two main categories: long-term memory items and short-term memory items. Long-term memory items are used to store user attribute information or preference information that has long-term stability, such as the user's age, occupation, education, marital status, taste preferences, color preferences, etc. This memory information usually spans a long time period, and each time it changes, it retains a complete timestamp and confidence level, forming a traceable change trajectory.

[0074] Short-term memory (STM) items are used to store temporary topic information or dynamic profile information generated during a user's recent interactions. For example, the specific content discussed by the user in the past few days, topics of current interest, and temporary profiles inferred from conversational behavior (such as "I'm under a lot of work pressure lately" or "I'm considering changing jobs"). STM items can also record state changes, but their time span is usually shorter, the amount of state information is relatively smaller, and they are mainly used to capture the user's current context and intent.

[0075] When the first language model receives the user's request content, it performs semantic analysis and relevance filtering in parallel from long-term memory and short-term memory. Specifically, the first language model first filters out memory items with a high semantic relevance to the request content from all long-term memory items, as long-term target items. At the same time, it filters out memory items with a high semantic relevance to the request content from all short-term memory items, as short-term target items.

[0076] These two filtering processes can be executed independently without interfering with each other. For example, when a user's interaction request is "recommend a restaurant", the long-term memory items may filter out "taste preferences (long-term)", "dietary restrictions (long-term)" and "income level (long-term)" as long-term target items; while the short-term memory items may filter out "the hot pot restaurant we discussed yesterday" and "the weight loss plan we recently mentioned" as short-term target items.

[0077] After determining the long-term and short-term objectives, the first language model generates corresponding prompts based on the state information of these two types of objectives. For long-term objectives, the same method as described above is used to obtain the timestamps of each state information within the long-term objective, arrange them sequentially into a state change sequence, perform trend analysis, and combine this with the objective confidence level to generate first prompts describing the long-term state change trend and reliable state information. For example, for the long-term objective of "taste preference," a first prompt might be generated such as "The user's taste preference is gradually shifting from mild to spicy; the most reliable preference at present is spicy."

[0078] For short-term goals, since the state information they contain typically spans a short period and has limited scope, a simplified approach can be taken. Specifically, the most recent or highest-confidence state information from the short-term goal can be directly retrieved to generate a second cue message describing the current short-term context. For example, "The user has recently shown a strong interest in hot pot" or "The user has recently been controlling their diet."

[0079] The first and second prompts together constitute a complete response prompt, which is then input into the second language model. This allows the second language model to understand both the user's long-term, stable preference evolution and their current temporary needs or dynamic profile, thereby generating more personalized responses that better suit the user's actual situation. Simultaneously, this separation of long-term and short-term processing allows for differentiated management strategies for different types of memory information, improving the overall efficiency and flexibility of the memory system.

[0080] According to embodiments of this disclosure, the interaction method further includes: in response to the target confidence level of the target state information in the short-term memory item reaching a preset threshold, creating a long-term memory item corresponding to the target state information; and using the target state information and the timestamp recorded in the historical interaction as the initial state information of the long-term memory item.

[0081] The confidence level of each state information in the short-term memory item is continuously monitored. When the state information in each short-term memory item is recorded during the historical interaction, an initial target confidence level is assigned to it, and the target confidence level is dynamically increased whenever the state information is repeated in subsequent dialogues or is confirmed by the user.

[0082] For example, if a user mentions "I want to learn to draw recently" multiple times in conversations over several days, the target confidence of the state information "interest preference: drawing" in the short-term memory item will gradually increase. When the target confidence of a specific state information in a short-term memory item reaches or exceeds a preset threshold (e.g., 0.8), it is determined that the state information has sufficient stability and reliability and is no longer suitable as a temporary short-term memory, but should be promoted to long-term memory.

[0083] In response to this determination, a new long-term memory item corresponding to the state information is automatically created. First, the topic of the new long-term memory item is determined, and this topic is consistent with the topic of the short-term memory item. For example, if the topic of the short-term memory item is "recent interests" and the corresponding state information is "drawing," then the topic of the newly created long-term memory item can be set to "long-term interest preferences."

[0084] The target state information itself is used as the initial state information of the new long-term memory entry, and the timestamps recorded when the target state information first appeared or was last confirmed in the historical interactions are also stored as the change time of the initial state information. In addition, a target confidence level inherited from the short-term memory entry is assigned to the initial state information as its initial target confidence level.

[0085] Furthermore, to maintain the integrity and traceability of memory, other state information (if any) preceding this state information in the short-term memory item, along with the corresponding target confidence, can be migrated to the newly created long-term memory item as the starting part of the change trajectory. However, it will at least ensure that the target state information that has reached the preset threshold and its timestamp are stored as the initial state information of the long-term memory item.

[0086] For example, if the target confidence score for "Interest Preference: Drawing" in short-term memory reaches 0.85, and the timestamp is April ×, 2026, then the newly created long-term memory item "Long-term Interest Preference" will contain an initial state information: "Drawing," recorded on April ×, 2026, with an initial target confidence score of 0.85. Subsequently, if the user changes this long-term interest again (e.g., from "Drawing" to "Sculpture"), new state information will be added under the same long-term memory item according to the long-term memory management rules, while retaining the state before the change, thus forming a complete change trajectory.

[0087] In this way, short-term memories that have been repeatedly verified and have long-term value can be automatically converted into long-term memories. This reduces the unlimited expansion of the short-term memory bank and enriches the content of long-term memories, enabling personalized question answering to make more efficient use of users' historical information.

[0088] According to embodiments of this disclosure, the interaction method further includes: obtaining the changes in the state information of different memory items within a preset period; analyzing the correlation and change patterns between the state information of different memory items based on the changes, and generating a generalized higher-order memory item based on the correlation and change patterns, wherein the higher-order memory item is used to describe the comprehensive characteristics reflected by the state information of different memory items; and adding the higher-order memory item as a new memory item to the memory information.

[0089] Periodically or under specific triggering conditions (such as after a preset number of dialogue rounds or reaching a fixed time period), cross-topic correlation analysis is performed on the state information stored in different memory items. Specifically, the state information changes of different memory items within a preset period are retrieved from the memory bank. For example, the past three months can be set as the preset period, and then all state information change records of the "income level" memory item within that preset period can be retrieved (e.g., 20,000 yuan in January 2025, 25,000 yuan in February 2025, and 30,000 yuan in March 2025), as well as all state information change records of the "consumption level" memory item within that preset period (e.g., low consumption in January 2025, low-middle consumption in February 2025, and medium consumption in March 2025). In addition, changes of other related memory items such as "frequency of dining out" and "travel expenditure" can also be retrieved. These changes include the timestamp of each change, the state information before and after the change, and the corresponding target confidence level.

[0090] By using a first-language model or a specialized analytical model, the changes in these different memory items are jointly analyzed to uncover the patterns of change among them. Specifically, the model aligns the time-axis sequences of the state changes of each memory item and then analyzes whether their change directions are synchronized, whether the magnitudes of change are correlated, and whether the patterns of change have causal relationships.

[0091] For example, the model might discover that each increase in "income level" is highly consistent with an increase in "consumption level" in time, and that "frequency of dining out" and "travel expenditure" also increase accordingly, thus summarizing a positive correlation between income and consumption. Similarly, the model might find a pattern between changes in a user's "emotional state" (happy / sad) and changes in "weather preference" (sunny / rainy), concluding that "user emotions are significantly affected by weather." These patterns of correlation are not simple descriptions of trends within individual memory items, but rather higher-order knowledge spanning different memory themes.

[0092] Based on the identified patterns of change, a generalized higher-order memory term is generated. This higher-order memory term describes the comprehensive characteristics reflected by the state information of multiple different memory terms. For example, the content of the higher-order memory term could be "the user's income level and consumption level show a synchronous upward trend," or "the user's emotional state is highly correlated with weather conditions."

[0093] This higher-order memory item is itself a type of structured memory information, which can include a descriptive text, a pattern label, and the confidence level of the pattern being verified (e.g., assigning confidence based on the consistency of the analysis).

[0094] This higher-order memory item is added as a new memory item to the memory information, making it available for subsequent semantic retrieval and recall processes. When the user asks a related question again (such as "Recommend a travel plan suitable for my budget"), this higher-order memory item can be recalled, thereby generating more accurate response prompts.

[0095] By generating and storing these higher-order memory items, we can not only remember the trajectory of changes in a single preference, but also extract deeper user characteristics from the linkage between multiple preferences, thus achieving intelligent enhancement of memory.

[0096] Figure 4 A schematic diagram illustrating a short-term memory management method according to an embodiment of the present disclosure is shown.

[0097] like Figure 4 As shown, the short-term memory management mechanism aggregates and abstracts user dialogue content according to a preset cycle. The dialogue content of each day is organized into specific memories. For example, multiple specific memories are generated on day 1. At the same time, based on these specific memories, corresponding first-order abstract memories (reflecting the dialogue topic) and second-order abstract memories (reflecting the inferred user profile) are generated.

[0098] As time goes on, when the accumulated memories reach the 8th day, the concrete memories of the past 7 days are replaced with new concrete memories (the conversations of that day), and first-order and second-order abstract memories are regenerated based on these 7 days of concrete memories, replacing the original abstract memories.

[0099] Similarly, on day 22, the abstract memory is updated again based on the concrete memories of the most recent 14 days. Finally, at the end of the cycle of weeks 1-4, the latest first-order and second-order abstract memories are generated based on the concrete memories of the past 28 days and stored in the abstract memory bank, while the previous abstract memories are replaced.

[0100] Through this rolling update mechanism, short-term memory can continuously reflect the user's recent conversational behavior and dynamic profile, while avoiding the storage of redundant specific conversation content, effectively balancing the timeliness of memory and storage efficiency.

[0101] According to embodiments of this disclosure, inputting response prompts and request content into a second language model to obtain an output interactive response includes: inputting response prompts and request content into the second language model so that the second language model generates an interactive response under the guidance of preset prompt words; wherein, the preset prompt words are used to define model response rules, and the response prompts are used to provide targeted response guidance during the reasoning process of the second language model based on the model response rules.

[0102] After the first language model generates a response prompt, the user's original request content and the response prompt are input into the second language model to generate the final interactive response. The second language model is a large, general-purpose language model with many parameters. Its input includes not only the above content but also a pre-configured set of preset prompts. These preset prompts, also known as system prompts, define the model's response rules when generating replies, such as "user privacy must be protected, and no sensitive information should be output," "responses should be concise and polite," and "follow specific formatting requirements." These model response rules are fixed in each interaction, forming the basic constraint framework for the second language model's behavior.

[0103] Importantly, the response prompts are not appended to the preset prompts, but rather input into the second language model as auxiliary data independent of the preset prompts. During model inference, the preset prompts and response prompts play distinct roles. The preset prompts tell the second language model "how to answer the question" (i.e., the model's response rules), while the response prompts tell the second language model "what specific personalized background information the current user has" (i.e., content guidance).

[0104] For example, preset prompts might specify "always reply in a mild tone and do not mention specific income figures," while response prompts might provide information such as "the user has a medium to high budget, prefers spicy food, and dislikes cilantro." When generating a response, the second language model simultaneously follows the rules defined by the preset prompts and the content provided by the response prompts. Because these are separate inputs, the second language model will not ignore or forget the preset model response rules due to receiving a large amount of personalized memory. This ensures that the response meets basic requirements (such as privacy protection and formatting), while also fully utilizing the response prompts to improve the relevance and satisfaction of the response.

[0105] Specifically, in the generation process, the second language model first parses the preset prompt words to establish their behavioral boundaries, then reads the request content to understand the user's current intent, then refers to the response prompt information to obtain the personalized background related to the current interaction request, and finally generates the final interactive response word by word under the joint constraints of the model's response rules and the response prompt information.

[0106] For example, a user's interaction request is "Recommend a restaurant," and the response prompt is "User has a medium-to-high budget, prefers spicy food, and dislikes cilantro," with the preset prompt including "Do not output specific amounts." The second language model might generate the response: "Based on your taste preferences and budget, we recommend the following spicy restaurants, with average spending per person at a medium-to-high level, and none of the dishes contain cilantro." This response reflects personalized suggestions (spicy food, dislike of cilantro, budget) while adhering to privacy protection rules (not outputting specific income figures).

[0107] In this way, personalized information and system instructions are effectively decoupled, significantly improving the ability of large models to follow instructions and the quality of personalized services in complex question-and-answer scenarios.

[0108] Figure 5 A block diagram of an interactive device according to an embodiment of the present disclosure is shown schematically.

[0109] like Figure 5 As shown, the interactive device 500 includes an information input module 510, a target determination module 520, and a response output module 530.

[0110] The information input module 510 is used to respond to receiving an interaction request by inputting the request content in the interaction request and the memory information generated by the historical interaction into the first language model. The memory information includes multiple memory items, and each memory item has multiple state information that changes with the historical interaction.

[0111] The target determination module 520 is used to determine the target item that is semantically associated with the requested content from multiple memory items using a first language model.

[0112] The response output module 530 is used to input the request content and the response prompt information generated based on the target item into the second language model to obtain the output interactive response, wherein the response prompt information is used to describe the change of status information in the target item.

[0113] According to embodiments of this disclosure, the target determination module 520 includes a candidate determination submodule, a confidence determination submodule, and a target determination submodule.

[0114] The candidate determination submodule is used to perform semantic analysis on the request content and each memory item using a first language model, and to determine multiple candidate items that are semantically related to the request content from multiple memory items.

[0115] The confidence determination submodule is used to determine the comprehensive confidence of each candidate option based on the target confidence of each status information in each candidate option. The target confidence represents the reliability of the status information and is dynamically updated according to the frequency of the status information in historical interactions.

[0116] The target determination submodule is used to determine the target item from multiple candidate items based on the comprehensive confidence level of each candidate item.

[0117] According to embodiments of this disclosure, the interactive device 500 further includes a time acquisition module, a sequence generation module, a trend analysis module, and a prompt generation module.

[0118] The time acquisition module is used to obtain the timestamps recorded when the status information of each target item changes during historical interactions.

[0119] The sequence generation module is used to sort multiple state information according to the order of timestamps to obtain a state change sequence.

[0120] The trend analysis module is used to perform trend analysis on the state change sequence using a first language model to obtain analysis results. The analysis results include at least one of the following: the direction of change, the magnitude of change, and the pattern of change of state information in the state change sequence.

[0121] The prompt generation module is used to generate response prompts that describe the trend of state changes and reliable state information based on the analysis results and the target confidence level of each state information in the state change sequence.

[0122] According to embodiments of this disclosure, the interactive device 500 further includes a risk acquisition module, a higher-order generation module, and a memory addition module.

[0123] The risk acquisition module is used to acquire the risk category of each state information in the state change sequence. The risk category is pre-labeled based on the content type and semantic features of the state information when extracting the state information, and is used to characterize the sensitivity of the state information.

[0124] The higher-order generation module is used to determine sensitive state information whose risk category meets preset conditions from multiple state information in the state change sequence.

[0125] The memory addition module is used to convert sensitive state information into a general description, obtain a converted state change sequence, and generate response prompt information based on the converted state change sequence.

[0126] According to embodiments of this disclosure, the target determination module 520 further includes a memory determination submodule.

[0127] The memory determination submodule is used to determine the long-term and short-term target items semantically associated with the requested content from long-term and short-term memory items respectively, using a first language model. The response prompt information includes a first prompt and a second prompt. The first prompt is generated based on the state information of the long-term target item and describes changes in the state information of the long-term target item. The second prompt is generated based on the state information of the short-term target item and describes changes in the state information of the short-term target item. The state information in the long-term memory item belongs to a long-term attribute class or preference class, while the state information in the short-term memory item belongs to a temporary topic class or dynamic profile class generated from historical interactions.

[0128] According to embodiments of this disclosure, the interactive device 500 further includes a long-term creation module and a state creation module.

[0129] The long-term creation module is used to create a long-term memory item corresponding to the target state information in response to the target confidence level of the target state information in the short-term memory item reaching a preset threshold.

[0130] The state creation module is used to use the target state information and the timestamps recorded in the historical interactions as the initial state information for long-term memory items.

[0131] According to embodiments of this disclosure, the interactive device 500 further includes a change acquisition module, an association analysis module, and a higher-level addition module.

[0132] The change acquisition module is used to acquire the changes in the status information of different memory items within a preset period.

[0133] The association analysis module is used to analyze the association change patterns between the state information of different memory items based on the changes, and to generate generalized higher-order memory items based on the association change patterns. The higher-order memory items are used to describe the comprehensive characteristics reflected by the state information of different memory items.

[0134] The advanced addition module is used to add advanced memories as new memories to the memory information.

[0135] According to embodiments of this disclosure, the response output module 530 includes a response output submodule.

[0136] The response output submodule is used to input response prompts and request content into the second language model, so that the second language model can generate an interactive response under the guidance of preset prompts. The preset prompts are used to define the model response rules, and the response prompts are used to provide targeted response guidance during the second language model's reasoning process based on the model response rules.

[0137] Figure 6A schematic block diagram of an artificial intelligence agent according to an embodiment of the present disclosure is shown.

[0138] In embodiments of this disclosure, the von Neumann architecture in modern computer theory is inspired, such as... Figure 6 As shown, the AI ​​agent 600 may include five core modules: an input module 610, a processing module 620, and an output module 630.

[0139] The input module 610 is responsible for receiving or sensing information such as queries, requests, instructions, signals, or data from the outside world (e.g., users or the external environment), and converting it into a format that the AI ​​agent 600 can understand and process. The input module 610 is the primary link for the AI ​​agent 600 to interact with the outside world. It enables the AI ​​agent 600 to efficiently and accurately obtain the necessary "sensory" information from the outside world and respond to this information.

[0140] In the example, input module 610 can input the content described above to generate a request.

[0141] In embodiments of this disclosure, the processing module 620 may include a control module 621, a storage module 622, and a computation module 623. The processing module 620 is configured to determine a target task based on input information received by the input module 610, determine a target large model based on the target task, and obtain field content by invoking a content generation method on the target large model. In the example, the target large model includes at least one of a visual language large model, a video generation large model, and a video evaluation large model.

[0142] The control module 621 is the core support for the AI ​​agent 600's ability to handle complex tasks. The control module 621 can execute the content generation method described above.

[0143] In the example, the control module 621 will continuously interact with the storage module 622, the arithmetic module 623, and / or the output module 630 during operation. However, it should be noted that in the embodiments of this disclosure, the control module 621 initiates communication with the storage module 622, the arithmetic module 623, and / or the output module 630 as a single initiator, and there is no communication coupling between the storage module 622, the arithmetic module 623, and the output module 630.

[0144] In the example, the performance of the control module 621 is closely related to the large model on which the AI ​​agent 600 is based. To fully leverage the capabilities of the large language model, the internal structure of the control module 621 can be designed to be highly configurable and scalable to handle various types of tasks and requirements in real-world scenarios.

[0145] Storage module 622 can be responsible for storing the large visual language model, the large video generation model, and the large video evaluation model. The aforementioned large visual language model, large video generation model, and large video evaluation model can be included in storage module 622.

[0146] In the example, after receiving a content generation request, the AI ​​agent 600 can trigger a code generation process, obtain the page execution code, and feed it back to the control module 621. Then, the control module 621 can pass the returned field content to the output module 630.

[0147] The computation module 623 can be viewed as a predefined tool library. Tools for timing alignment, as described above, can be included in the computation module 623.

[0148] In the example, when the AI ​​agent 600 needs to process data, it can invoke relevant tools from the computing module 623 and feed them back to the control module 621. The control module 621 can then use the fed-back tools to process the relevant data. It's understandable that while large language models have excellent language understanding and generation capabilities, like humans, the tasks they can solve without any tools are very limited. When the AI ​​agent 600 is given the ability to invoke tools, it can perform tasks such as timing alignment using tools designed for timing alignment.

[0149] Output module 630 can output the field content described above.

[0150] The AI ​​agent 600 according to embodiments of this disclosure can simply and effectively improve the level of intelligence, as well as enhance flexibility and versatility.

[0151] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0152] According to an embodiment of the present disclosure, an electronic device 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, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above.

[0153] According to embodiments of the present disclosure, a non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are used to cause a computer to perform the methods described above.

[0154] According to an embodiment of this disclosure, a computer program product includes a computer program that, when executed by a processor, implements the method described above.

[0155] Figure 7 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown.

[0156] Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0157] like Figure 7 As shown, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 702 or a computer program loaded from storage unit 708 into random access memory (RAM) 703. RAM 703 may also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.

[0158] Multiple components in device 700 are connected to input / output (I / O) interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0159] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as interactive methods. For example, in some embodiments, the interactive method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the interactive method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform interactive methods by any other suitable means (e.g., by means of firmware).

[0160] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0161] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0162] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on 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 fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0163] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0164] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0165] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, distributed system servers, or servers incorporating blockchain technology.

[0166] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0167] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. An interaction method, comprising: In response to receiving an interaction request, the request content in the interaction request and the memory information generated by the historical interaction are input into the first language model, wherein the memory information includes multiple memory items, and each memory item has multiple state information that changes with the historical interaction; Using the first language model, a target item semantically associated with the requested content is determined from a plurality of memory items; The request content and the response prompt information generated based on the target item are input into the second language model to obtain the output interactive response, wherein the response prompt information is used to describe the change of state information in the target item.

2. The method according to claim 1, wherein, The step of determining the target item semantically associated with the requested content from multiple memory items using the first language model includes: The first language model is used to perform semantic analysis on the request content and each memory item, and multiple candidate items that are semantically associated with the request content are determined from the multiple memory items. Based on the target confidence level of each state information in each candidate option, a comprehensive confidence level is determined, wherein the target confidence level represents the reliability of the state information, and the target confidence level is dynamically updated according to the frequency of the state information in historical interactions. The target item is determined from the plurality of candidate items based on the overall confidence level of each candidate item.

3. The method according to claim 1, further comprising: Obtain the timestamps recorded when the status information of each target item changes during historical interactions; Based on the chronological order of the timestamps, the multiple state information items are sorted to obtain a state change sequence; The first language model is used to perform trend analysis on the state change sequence to obtain analysis results, wherein the analysis results include at least one of the following: the direction of change, the magnitude of change, and the pattern of change of state information in the state change sequence. Based on the analysis results and the target confidence level of each state information in the state change sequence, response prompt information is generated to describe the state change trend and reliable state information.

4. The method according to claim 3, further comprising: Obtain the risk category of each state information in the state change sequence, wherein the risk category is pre-labeled based on the content type and semantic features of the state information when extracting the state information, and is used to characterize the sensitivity of the state information; From multiple state information in the state change sequence, determine the sensitive state information that satisfies the preset conditions for the risk category; The sensitive state information is converted into a general description to obtain a converted state change sequence, and the response prompt information is generated based on the converted state change sequence.

5. The method according to any one of claims 1-4, wherein, The aforementioned memory items include long-term memory items and short-term memory items; The step of determining the target item semantically associated with the requested content from multiple memory items using the first language model includes: Using the first language model, long-term target items and short-term target items that are semantically associated with the request content are determined from the long-term memory items and the short-term memory items, respectively; The response prompt information includes a first prompt information and a second prompt information. The first prompt information is generated based on the status information of the long-term target item and is used to describe the changes in the status information of the long-term target item. The second prompt information is generated based on the status information of the short-term target item and is used to describe the changes in the status information of the short-term target item. The state information in the long-term memory item belongs to the category of long-term attributes or preferences, while the state information in the short-term memory item belongs to the category of temporary topics generated by historical interactions or dynamic profiles.

6. The method according to claim 5, further comprising: In response to the target confidence level of the target state information in the short-term memory item reaching a preset threshold, a long-term memory item corresponding to the target state information is created. The target state information and the timestamps recorded in the historical interactions are used as the initial state information of the long-term memory item.

7. The method according to claim 1, further comprising: Obtain the changes in the state information of each of the different memory items within a preset period; Based on the changes, the correlation and change patterns between the state information of different memory items are analyzed to generate a generalized higher-order memory item based on the correlation and change patterns. The higher-order memory item is used to describe the comprehensive characteristics reflected by the state information of different memory items. The higher-order memory item is added as a new memory item to the memory information.

8. The method according to claim 1, wherein, The step of inputting the response prompt information and the request content into the second language model to obtain the output interactive response includes: The response prompt information and the request content are input into the second language model so that the second language model generates the interactive response under the guidance of preset prompt words; The preset prompt words are used to define model response rules, and the response prompt information is used to provide targeted response guidance during the reasoning process of the second language model based on the model response rules.

9. An interactive device, comprising: An information input module is used to respond to receiving an interaction request by inputting the request content in the interaction request and the memory information generated by the historical interaction into a first language model. The memory information includes multiple memory items, and each memory item has multiple state information that changes with the historical interaction. The target determination module is used to determine, through the first language model, a target item that is semantically associated with the request content from a plurality of memory items; The response output module is used to input the request content and the response prompt information generated based on the target item into the second language model to obtain the output interactive response, wherein the response prompt information is used to describe the change of status information in the target item.

10. An intelligent agent for prompting output, comprising: The first input module is used to receive interactive requests; The first processing module is used to determine a target task based on the interaction request received by the input module, and to determine a first language model based on the target task; By invoking the first language model, the method described in any one of claims 1 to 8 is executed to obtain a response prompt message; The first output module is used to output the response prompt information obtained by the processing module.

11. An intelligent agent for responding to output, comprising: The second input module is used to receive interactive requests and response prompts. The second processing module is used to determine the target task based on the interaction request and response prompt information received by the input module, and to determine the second language model based on the target task; By invoking the second language model, the method described in any one of claims 1 to 8 is executed to obtain an interactive response; The second output module is used to output the interactive response obtained by the processing module.

12. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 8.

13. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 8.

14. A computer program product comprising a computer program stored on at least one of a readable storage medium and an electronic device, the computer program implementing the method according to any one of claims 1 to 8 when executed by a processor.