Question answering methods and computing devices based on memory recall

By repeatedly refining and filtering memories in the memory bank, and combining multi-dimensional evaluation factors, the problem of the accuracy of memory retrieval by the intelligent agent in user interaction was solved, resulting in more efficient answer generation and improved user experience.

CN122087091APending Publication Date: 2026-05-26XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-06
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In existing technologies, there are still challenges in how intelligent agents can provide more accurate and effective memory retrieval methods in user interaction scenarios.

Method used

By retrieving memories from the memory bank through multiple rounds of refinement, and combining factors such as the similarity between the memory and the question, recall frequency, freshness, emotional intensity, and relevance, multi-dimensional screening and quantitative evaluation are conducted to generate answers that better meet user needs.

Benefits of technology

It improves the accuracy and effectiveness of memory retrieval, enhances the accuracy, consistency, and personalization of answers, and improves the user experience and the intelligence of the interaction system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122087091A_ABST
    Figure CN122087091A_ABST
Patent Text Reader

Abstract

This application relates to the field of computing technology, and in particular provides a question-answering method and computing device based on memory recall. The method includes: responding to a user's question, determining a set of second historical memories from a plurality of first historical memories of the user, based on the similarity between each first historical memory and the question, and the memory characteristics of each first historical memory, the set of second historical memories including a plurality of second historical memories; selecting at least one target historical memory from the plurality of second historical memories according to the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory; and generating a target answer corresponding to the user's question based on the at least one target historical memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computing technology, and in particular to a question-answering method and computing device based on memory recall. Background Technology

[0002] In the realm of large-scale models, the training and use of agents rely on a large amount of information input. Especially in user interaction scenarios, a dedicated memory bank is typically set up for each user to store their historical memories. During user interaction, the agent can retrieve these historical memories from the user's memory bank and apply them to information generation and other scenarios.

[0003] Therefore, how to provide a more accurate and effective memory retrieval method is a technical problem that urgently needs to be solved. Summary of the Invention

[0004] This application provides a question-answering method and computing device based on memory retrieval, which uses multiple fine-ranking methods to retrieve memories from the memory bank to improve retrieval accuracy and effectiveness.

[0005] According to a first aspect of the embodiments of this application, a question-answering method based on memory recall is provided, comprising: In response to a user's question, a set of second historical memories is determined from the user's multiple first historical memories, based on the similarity between each first historical memory and the question, as well as the memory characteristics of each first historical memory. The set of second historical memories includes multiple second historical memories. Based on the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory, at least one target historical memory is selected from multiple second historical memories. Based on at least one target historical memory, generate the target answer corresponding to the user's question.

[0006] In this embodiment, multiple first historical memories of the user can be pre-stored to enable the application of the user's historical memories. That is, a set of second historical memories can be determined from the user's multiple first historical memories based on the similarity between each first historical memory and the question, as well as the memory characteristics of each first historical memory. The set of second historical memories is filtered from two dimensions: question similarity and memory characteristics. Then, based on the memory distribution characteristics of the second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory, a second filtering is performed from the multiple second historical memories. By completing the second filtering through question relevance in the first instance and question distribution characteristics in the second, the user's historical memories are accurately filtered and effectively utilized during the interaction process. This improves the targeting and rationality of historical memory retrieval, making one or more target historical memories involved in the generation of the target answer more accurate and effective. This significantly improves the accuracy, coherence, and personalization of the answer, enhances the user's experience and understanding of the target answer, and results in higher accuracy.

[0007] According to a first aspect of the embodiments of this application, in some embodiments of the first aspect, memory characteristics include recall frequency, freshness, emotional intensity, and relevance. From multiple first historical memories of a user, based on the similarity between each first historical memory and the question, and the memory characteristics of each first historical memory, a set of second historical memories is determined, including: Based on the similarity between each first historical memory and the question, as well as the recall frequency, freshness, emotional intensity and relevance of each first historical memory, the first score of each first historical memory is determined. Based on the first score of each first historical memory, select the first number of multiple second historical memories.

[0008] In this embodiment, a first score is determined for each first historical memory based on its similarity to the question, as well as its recall frequency, freshness, emotional intensity, and relevance. This makes the quantification of each memory more comprehensive and avoids potential matching biases caused by relying solely on dimensions for memory selection. Then, based on the first scores of each first historical memory, a first number of second historical memories are selected. This achieves the quantification, multi-dimensional precise ranking, and optimal selection of the user's historical memories, effectively highlighting highly relevant, timely, and valuable historical information, ensuring that the selected second historical memories better meet the user's specific needs, and improving the accuracy and usability of the subsequently generated answers.

[0009] According to a first aspect of the embodiments of this application, in some embodiments of the first aspect, a first score for each first historical memory is determined based on the similarity between each first historical memory and the question, as well as the recall frequency, freshness, emotional intensity, and relevance of each first historical memory, including: The importance score of each first historical memory is determined based on the recall frequency, emotional intensity, and relevance of each first historical memory; Based on the similarity between each first historical memory and the question, the importance score of each first historical memory, and the novelty of each first historical memory, the first score of each first historical memory is determined.

[0010] In this embodiment, the importance score of historical memory is determined by recall frequency, emotional intensity, and relevance. This score is then combined with similarity, importance, and freshness to calculate a first score. This multi-dimensional approach allows for a quantitative assessment of the user's historical memory, fully considering information relevance, timeliness, and user attention. This ensures the score calculation more closely aligns with actual interaction intent and user preferences. Through a multi-layered, weighted scoring mechanism, the accuracy and rationality of historical memory selection are effectively improved, reducing interference from invalid or low-value information. This provides a reliable basis for selecting high-quality target memories and generating responses that better meet user needs, thereby enhancing the intelligence, coherence, and user experience of the interactive system.

[0011] According to a first aspect of the embodiments of this application, in some embodiments of the first aspect, after responding to a user's question, the method further includes: Based on the similarity between multiple user historical memories and the question, multiple primary historical memories are selected.

[0012] In this embodiment of the application, after responding to a user's question, the first historical memory is initially selected from the user's total historical memory based on the similarity dimension. By performing the initial screening based on similarity, the user's historical memory can be efficiently filtered and accurately retrieved. This reduces interference from invalid information and fully explores high-value, highly relevant, and highly adaptable historical content, making the question-and-answer process more in line with the user's true intentions.

[0013] According to a first aspect of the embodiments of this application, in some embodiments of the first aspect, selecting at least one target historical memory from at least one second historical memory based on the memory distribution characteristics of at least one second historical memory includes: Based on the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory, the target score of each second historical memory is determined. Based on the target scores of each of the multiple second historical memories, they are sorted in descending order to obtain the sorted second historical memories; The first N second historical memories among the sorted second historical memories are identified as at least one target historical memory, where N is an integer greater than or equal to 1.

[0014] In this embodiment, memory distribution characteristics are introduced as a key indicator for screening second historical memories. Combining the similarity and memory characteristics of each second historical memory, the analysis examines both the group characteristics and individual characteristics of each second historical memory to obtain a target score for each second historical memory, ensuring that the target score possesses overall characteristics. Based on the target score of at least one second historical memory, they are sorted in descending order to obtain multiple sorted second historical memories. The top N second historical memories from these sorted memories are then further sorted in descending order to obtain multiple ranked second historical memories. These top N second historical memories are then identified as at least one target historical memory. The selected target historical memories exhibit representativeness, high consistency, and high significance in their overall distribution, ensuring that the final selected target historical memories not only have high individual value but also higher overall logical support and information completeness, laying a solid data foundation for generating high-quality answers.

[0015] According to a first aspect of the embodiments of this application, in some embodiments of the first aspect, a target score for each second historical memory is determined based on the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory, including: Based on the memory distribution characteristics of the second historical memory set, the weights of each influencing factor are determined. The influencing factor is the similarity between the first historical memory and the question, as well as at least one of the recall frequency, freshness, emotional intensity and relevance of the first historical memory. The target score for each second historical memory is determined based on the weight and corresponding value of each influencing factor.

[0016] In this embodiment, the weights of each influencing factor are determined based on the memory distribution characteristics of the second historical memory set. This allows for a leap from static memory distribution to dynamic weight adjustment, automatically optimizing the weights of the influencing factors. Thus, by using the weights and values ​​of each influencing factor, a target score for each second historical memory is obtained. This preserves the impact of dynamic weight changes on the score, upgrading memory assessment from static rules to dynamic perception. This significantly enhances the accuracy and precision of the target score, ensuring a higher overall quality for the target historical memories selected using the target score.

[0017] According to a first aspect of the embodiments of this application, in some embodiments of the first aspect, adjusting the weights of at least one influencing factor based on the memory distribution characteristics of the second set of historical memories includes: Based on the memory distribution characteristics of the set of second historical memories, determine at least one ambiguity score for the second historical memory; Determine the weight adjustment factor based on the ambiguity score; The weights of each influencing factor are determined based on the weight adjustment factor.

[0018] In this embodiment, by adjusting the weights of each influencing factor based on the memory distribution characteristics of the second set of historical memories, a leap from static memory distribution to dynamic weight adjustment can be achieved, automatically optimizing the weights of the influencing factors. Thus, a target score is obtained through the weights and values ​​of each influencing factor, preserving the impact of dynamic weight changes on the score. This upgrades memory assessment from static rules to dynamic perception, significantly enhancing the accuracy and precision of the target score, and ensuring a higher overall quality of the target historical memories selected using the target score.

[0019] According to a first aspect of the embodiments of this application, in some embodiments of the first aspect, the memory distribution characteristics of the second set of historical memories include: maximum similarity, similarity variance, information entropy, and memory diversity.

[0020] Based on the memory distribution characteristics of at least one second historical memory, determine the ambiguity score of at least one second historical memory, including: Based on the maximum similarity, similarity variance, information entropy, and memory diversity in the memory distribution characteristics, obtain the ambiguity score of at least one second historical memory.

[0021] In this embodiment, four key distribution characteristics—maximum similarity, similarity variance, information entropy, and memory diversity—are integrated. Maximum similarity and variance provide a statistical perspective based on central tendency and dispersion; entropy introduces uncertainty quantification from information theory; and diversity supplements distribution evaluation from a content dimension. This constructs a multi-dimensional fuzziness score calculation method, decomposing the traditionally difficult-to-quantify "fuzziness score" into several indicators such as maximum similarity, similarity variance, information entropy, and memory diversity. This allows the system to calculate fuzziness scores for different historical memories more precisely, providing more accurate fuzziness indicators for subsequent score calculations.

[0022] According to a first aspect of the embodiments of this application, in some embodiments of the first aspect, it further includes: Update the recall count and last retrieval time in the metadata of each target's historical memory; Alternatively, based on the question and the target answer, a new historical memory can be generated and added to multiple historical memories.

[0023] In this embodiment of the application, by updating the recall count and last retrieval time in the metadata of each target historical memory, or by generating new historical memories based on the current question and the corresponding target answer and adding them to the historical memory database, it is possible to realize the dynamic updating and continuous iteration of user historical memory data, record the usage frequency and latest validity of historical memories in a timely manner, and ensure the timeliness, effectiveness and integrity of historical memories.

[0024] According to a second aspect of the embodiments of this application, a question-answering device based on memory recall is provided, comprising: The first filtering unit is used to respond to the user's question by determining a set of second historical memories from the user's multiple first historical memories based on the similarity between each first historical memory and the question, as well as the memory characteristics of each first historical memory. The set of second historical memories includes multiple second historical memories. The second screening unit is used to select at least one target historical memory from multiple second historical memories based on the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory. The answer generation unit is used to generate the target answer corresponding to the user's question based on at least one target historical memory.

[0025] According to a third aspect of the embodiments of this application, a computing device is provided, including a processor and a memory, the memory storing a computer program, the computer program being invoked by the processor to execute any of the memory-based question-answering methods provided in the embodiments of this application.

[0026] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, it implements any kind of question-answering method based on memory recall.

[0027] According to a fifth aspect of the embodiments of this application, a computer product is provided, comprising: a computer program that, when executed by a processor, implements the steps of any memory-based question-answering method.

[0028] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description

[0029] The above and other objects, features, and advantages of the embodiments of this application will become more apparent from the more detailed description of the embodiments in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the embodiments of this application and do not constitute a limitation thereof. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0030] Figure 1 The figure illustrates a system architecture of a memory-based question-answering system according to an embodiment of this application; Figure 2The illustration shows an application example of a question-answering method based on memory recall according to an embodiment of this application; Figure 3 The illustration shows another application example of a memory-based question-answering method according to an embodiment of this application; Figure 4 The figure shows a flowchart of a question-answering method based on memory recall according to an embodiment of this application; Figure 5 The figure shows another flowchart of a question-answering method based on memory recall according to an embodiment of this application; Figure 6 The figure shows an example curve of a weighting adjustment factor according to an embodiment of this application; Figure 7 The figure shows a schematic diagram of a question-answering device based on memory recall according to an embodiment of this application; Figure 8 The figure shows a hardware block diagram of a computing device according to an embodiment of this application. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of the embodiments of this application more apparent, exemplary embodiments according to the embodiments of this application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the embodiments of this application, and not all embodiments of the embodiments of this application. It should be understood that the embodiments of this application are not limited to the exemplary embodiments described herein.

[0032] The technical solution of this application embodiment can be applied to large model application scenarios. By recalling user memory and filtering it multiple times, the accuracy and precision of the memory involved in answer generation are ensured to be higher, and the fit between the answer and the user memory is improved.

[0033] The technical solutions of the embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0034] like Figure 1 The diagram shown is an example of a memory-based question-answering system provided in an embodiment of this application. This memory-based question-answering system may include a terminal device 10 and a server 20.

[0035] The terminal device 10 can be a mobile phone, computer, wearable device, smart home appliance, or other terminal. The terminal device 10 can collect questions and distribute them to the server 20, which then generates answers to the questions.

[0036] Specifically, server 20 can execute the memory-based question-answering method provided in this application embodiment, that is: first, execute 101, first memory screening, that is, in response to the user's question, determine a set of second historical memories from the user's multiple first historical memories based on the similarity between each first historical memory and the question, and the memory characteristics of each first historical memory. The set of second historical memories includes multiple second historical memories. Then, execute 102, second memory screening, that is, select at least one target historical memory from the multiple second historical memories according to the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory. Then, execute 103, answer generation, that is, generate the target answer corresponding to the user's question based on at least one target historical memory.

[0037] The following examples illustrate several possible application scenarios of the technical solutions in the embodiments of this application.

[0038] Scenario 1: Social Chat Scenario like Figure 2 As shown, user 201 can interact with agent 202 through a terminal device, such as smart speaker 30, for companionship. Agent 202 can be a dedicated companion model for user 201 and can be deployed on server 20. Agent 202 can be a dedicated agent for user 201.

[0039] During the social interaction between agent 202 and user 201, user 201 can send a question to agent 202 through smart speaker 30, such as "Play me a song I like".

[0040] The intelligent agent 202 can execute the memory-based question-answering method provided in the embodiments of this application, recalling at least one target historical memory of the user 201, so as to generate a target answer to the question based on at least one target historical memory. For example, if at least one target historical memory is the user's playlist and favorite playlist, generating a target answer to the question may specifically mean: determining the song that the user plays most frequently from the user's playlist and favorite playlist.

[0041] Server 20 can send the target answer generated by agent 202 to smart speaker 30. For example, if the target answer generated by agent 202 is the audio signal of the song that the user plays most frequently, server 20 can send that audio signal to smart speaker 30.

[0042] The smart speaker 30 receives the target answer, such as the audio signal of the song the user plays most frequently. Then, it can output the target answer, such as playing the song the user plays most frequently based on the audio signal.

[0043] Scenario 2: Task-based dialogue scenario like Figure 3 As shown, user 301 can perform tasks through a smart terminal, such as computer 40, and agent 302. For example, the task could be "Help me check the meeting minutes from yesterday afternoon at 4 PM." Agent 302 can be a dedicated agent for user 301.

[0044] The intelligent agent 302 can execute the memory-based question-and-answer method provided in this application embodiment to recall at least one target historical memory of the user 301. This target historical memory may include multiple meeting minutes from around 4 PM yesterday. Then, the intelligent agent 302 can generate a target answer based on the at least one target historical memory, i.e., the multiple meeting minutes retrieved from around 4 PM yesterday. This target answer may be a meeting minute that started at 4 PM. The server 20 can send the target answer retrieved by the intelligent agent 302, i.e., the meeting minutes that started at 4 PM, to the computer 40. After receiving the target answer, the computer 40 can output the target answer, i.e., the meeting minutes that started at 4 PM. Of course, the output target answer may not only include meeting minutes that started at 4 PM, but may also include prompt information, such as a question related to the question. For example, the prompt information may be "Multiple meeting minutes from around 4 PM have been retrieved. Do you want me to send you a list of meeting minutes?"

[0045] It is understandable that a user's multiple primary historical memories can be selected from among these memories based on the similarity between the user's multiple historical memories and the question. These multiple historical memories can be stored in a database or memory bank. Each user can have their own dedicated database or memory bank to personalize memory storage, avoiding confusion caused by memory mixing between different users and improving the efficiency and accuracy of personal memory retrieval.

[0046] like Figure 4 The diagram shown is a flowchart of a memory-based question-answering method provided in an embodiment of this application. This memory-based question-answering method may include the following steps: S401. In response to the user's question, determine a set of second historical memories from the user's multiple first historical memories, based on the similarity between each first historical memory and the question, and the memory characteristics of each first historical memory. The set of second historical memories includes multiple second historical memories.

[0047] Optionally, before S401, the method further includes: querying at least one first historical memory that matches the user's question from multiple historical memories of the user. Specifically, multiple first historical memories can be selected based on the similarity between the user's multiple historical memories and the question.

[0048] After responding to a user's question, the system first filters the user's entire historical memory based on similarity to obtain the first historical memory. This initial screening based on similarity enables efficient filtering and accurate retrieval of the user's historical memory, reducing interference from invalid information while fully exploring high-value, highly relevant, and highly adaptable historical content, making the question-and-answer process more aligned with the user's true intentions.

[0049] Optionally, before S401, it also includes: receiving questions from the user sent by the user terminal.

[0050] In one possible design, each historical memory can be associated with / correspond to metadata.

[0051] The metadata may include: the vector embedding corresponding to the historical memory, the recall count, the relation count, the creation time, the last access time, and the sentiment salience.

[0052] The formula for calculating emotion salience is: emotion_salience = emotion_intensity × |emotion_polarity|, where emotion_intensity∈[0,1] represents emotion intensity and emotion_polarity∈[-1,1] represents emotion polarity.

[0053] Understandably, affective saliency is used to represent the importance of a memory on the affective dimension, and can be determined by affective intensity and affective polarity. Affective saliency measures the emotional influence of memory content and can play a significant role in ranking and weighting.

[0054] The vector embedding corresponding to historical memory can be obtained by calculating word vectors from the text corresponding to the historical memory.

[0055] After receiving a user's question, the question can be converted into a question vector. The similarity between the vector embeddings corresponding to multiple historical memories and the question vector is calculated. Based on the similarity scores of the multiple historical memories, several first historical memories with similarity scores greater than a preset similarity threshold are selected.

[0056] Furthermore, the similarity between the vector embedding and the question vector can be calculated using cosine similarity, Euclidean distance, dot product similarity, or Manhattan distance. In this embodiment, the specific calculation method for the similarity between the vector embedding and the question vector is not limited.

[0057] Optionally, the number of multiple first historical memories and the similarity threshold can be preset. The similarity threshold can be a small threshold to filter out a larger number of first historical memories.

[0058] For example, the number of multiple first historical memories can be set to min(α×topN, M), where α is the recall factor, with a default value of 10 and an adjustable range of [5, 20]. M is the maximum recall limit, with a default value of 500 and an adjustable range of [200, 1000]. The similarity threshold θ_low has a default value of 0.1 and an adjustable range of [0.01, 0.7].

[0059] S402. Based on the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory, select at least one target historical memory from multiple second historical memories.

[0060] Optionally, the memory distribution characteristics can refer to the overall distribution features of each second historical memory within the set of second historical memories. The similarity between each second historical memory and the question can refer to the similarity between the vector embedding in the metadata of each second historical memory and the question vector of the question.

[0061] S403. Based on at least one target historical memory, generate the target answer corresponding to the user's question.

[0062] As an example, after generating the target answer corresponding to the user's question based on at least one target historical memory in step S403, the method further includes updating the recall count and last retrieval time in the metadata of each target historical memory. By updating the recall count and last retrieval time of the target historical memory in real time, a dynamic iteration and self-learning mechanism for the metadata of the memory is constructed. This mechanism can continuously update the metadata of the memory with user interaction, realizing dynamic management of the metadata of the user's memory and improving the effectiveness and timeliness of the metadata.

[0063] As another embodiment, after generating the target answer corresponding to the user's question based on at least one target historical memory in step S403, the method further includes: generating a new historical memory based on the question and the target answer, and adding the new historical memory to multiple historical memories. By encapsulating the question and the target answer into a new historical memory and dynamically expanding it into the memory bank, an incremental accumulation and dynamic evolution of the user's historical memory is constructed, enabling the system to continuously enrich the user's memory bank as the conversation deepens. This continuous expansion of the memory bank significantly enhances the system's personalized learning ability and long-term service value, ensuring that subsequent answers are generated based on a more complete and relevant knowledge background that aligns with the user's current state.

[0064] In this embodiment, a first score is determined for each first historical memory based on its similarity to the question, as well as its recall frequency, freshness, emotional intensity, and relevance. This makes the quantification of each memory more comprehensive and avoids potential matching biases caused by relying solely on dimensions for memory selection. Then, based on the first scores of each first historical memory, a first number of second historical memories are selected. This achieves the quantification, multi-dimensional precise ranking, and optimal selection of the user's historical memories, effectively highlighting highly relevant, timely, and valuable historical information, ensuring that the selected second historical memories better meet the user's specific needs, and improving the accuracy and usability of the subsequently generated answers.

[0065] As mentioned above, the embodiments of this application can store the user's memories. That is, multiple historical memories of the user are stored. Based on this, coarse recall can be performed. For example... Figure 5 The image shows a question-answering method based on memory recall provided in an embodiment of this application. The method may include: 501. A user asks a question. 502. Performing coarse recall to obtain multiple first historical memories C. That is, selecting multiple first historical memories based on the similarity between the user's multiple historical memories and the question.

[0066] In the coarse memory retrieval stage described above, after retrieving multiple first historical memories, the first fine-grained memory retrieval can be performed, namely step 401. In response to the user's question, based on the similarity between each first historical memory and the question, as well as the memory characteristics of each first historical memory, a set of second historical memories is determined from the user's multiple first historical memories. The set of second historical memories includes multiple second historical memories.

[0067] In the first fine-grained memory retrieval phase, the metadata of each first historical memory can be used to perform enhanced similarity analysis, thereby enabling fine-grained screening using the results of the enhanced similarity analysis. Therefore, S401, based on the similarity between each first historical memory and the question, as well as the recall frequency, freshness, emotional intensity, and relevance of each first historical memory, the first score of each first historical memory is determined, including: A1. Based on the similarity between each first historical memory and the question, as well as the recall frequency, freshness, emotional intensity, and relevance of each first historical memory, determine the first score of each first historical memory.

[0068] A2. Based on the first score of each first historical memory, select a first number of multiple second historical memories to determine the multiple second historical memories as a set of second historical memories.

[0069] refer to Figure 5In the first fine-grained memory retrieval phase, steps 503 and 504 can be performed: Calculate the first score for each first historical memory; determine the set C1 of second historical memories based on the first scores of each first historical memory. That is, based on the first scores of each first historical memory, select a first number of second historical memories from the multiple first historical memories C, and determine the multiple second historical memories as the set C1 of second historical memories.

[0070] In this embodiment, the importance score of historical memory is determined by recall frequency, emotional intensity, and relevance. This score is then combined with similarity, importance, and freshness to calculate a first score. This multi-dimensional approach allows for a quantitative assessment of the user's historical memory, fully considering information relevance, timeliness, and user attention. This ensures the score calculation more closely aligns with actual interaction intent and user preferences. Through a multi-layered, weighted scoring mechanism, the accuracy and rationality of historical memory selection are effectively improved, reducing interference from invalid or low-value information. This provides a reliable basis for selecting high-quality target memories and generating responses that better meet user needs, thereby enhancing the intelligence, coherence, and user experience of the interactive system.

[0071] To obtain a more accurate first score, it can be calculated using influencing factors such as similarity, recall frequency, freshness, emotional intensity, and relevance. Specifically, step A1, based on the similarity between each first historical memory and the question, as well as the recall frequency, freshness, emotional intensity, and relevance of each first historical memory, determines the first score for each first historical memory, which may include: A11. The importance score of each first historical memory is determined based on the recall frequency, emotional intensity, and relevance of each first historical memory.

[0072] A12. Based on the similarity between each first historical memory and the question, the importance score and novelty score of each first historical memory, determine the first score of each first historical memory.

[0073] Optionally, prior to A11, the method further includes: determining interaction statistics of at least one first historical memory based on the metadata of each first historical memory.

[0074] Optionally, the interactive statistics may include: maximum recall (max_recall), maximum number of associations (max_relation), mean similarity (μ), variance of similarity (σ²), and maximum sentiment significance (max_emotion).

[0075] Optionally, the importance score of the first historical memory can be determined based on interactive statistical information and its metadata. The freshness score of the first historical memory can be determined based on a preset linear decay period and its metadata. Finally, the first score of the first historical memory is determined based on its importance and freshness scores.

[0076] Importance score calculation is used to uncover memories of higher importance and is a memory evaluation metric with higher core value. The preset linear decay period and metadata can dynamically assess the timeliness of the first historical memory and its temporal relevance to the question. By using scores from both importance and freshness dimensions, the value of the memory and user preferences can be effectively balanced to obtain a more accurate and effective first score. This allows for precise selection of more important memories that align with user preferences, significantly improving the relevance and accuracy of subsequent answer generation.

[0077] Furthermore, based on interactive statistical information and combined with the metadata of the first historical memory, the importance score of the first historical memory is determined, which may include: The importance score of the first historical memory is determined based on the maximum recall frequency, maximum association frequency, and maximum sentiment salience in the interaction statistics, as well as the recall frequency, association frequency, and sentiment salience of the first historical memory.

[0078] Optionally, the importance score of the first historical memory can be determined based on the maximum recall frequency, maximum association frequency, and maximum sentiment salience in the interaction statistics, as well as the recall frequency, association frequency, and sentiment salience of the first historical memory. This can include: normalizing the recall frequency, association frequency, and sentiment salience of the first historical memory based on the maximum recall frequency, maximum association frequency, and maximum sentiment salience in the interaction statistics to obtain the normalized recall frequency N_recall, association frequency N_relation, and sentiment salience N_emotion.

[0079] The normalization calculation formula is as follows: N_recall = log(recall_count + 1) / log(max_recall + 1) N_relation = log(relation_count + 1) / log(max_relation + 1) N_emotion = emotion_salience / max_emotion The importance score of the first historical memory is obtained by weighting and summing the normalized recall frequency N_recall, the number of associations N_relation, and the sentiment salience N_emotion.

[0080] Alternatively, the importance score can be calculated using the following formula: I = w1× N_recall + w2× N_relation + w3× N_emotion.

[0081] Where w1 is the importance weight of recall frequency, w2 is the relevance weight of association frequency, and w3 is the sentiment salience weight, which can be preset. For example, it can be set to w1=0.4, w2=0.3, w3=0.3. The adjustment range of each weight is [0,1], and it is necessary to satisfy the weight sum w1+w2+w3=1.

[0082] Understandably, by mapping recall frequency, association frequency, and sentiment salience to a more unified dimension using the maximum recall frequency, maximum association frequency, and maximum sentiment salience in interaction statistics, we can achieve objective quantification of historical memory. This allows the importance score to highlight the frequency, association, and emotional intensity of memories, making the representation of the importance score more comprehensive. As a result, higher-value core memories can be selected based on the importance score, providing a reliable basis for memory screening.

[0083] When performing memory enhancement analysis from the perspective of freshness, an appropriate decay strategy can be determined based on the duration of memory recall failure. For example, if a memory is not recalled for a short period, a linear decay strategy can be used to slow down the decay over time; if it is not recalled for a longer period, an exponential decay strategy can be used to increase the decay over time. Based on this, step A13, determining the freshness score of the first historical memory according to the preset linear decay period and in conjunction with the metadata of the first historical memory, may include: The duration of non-recall of the first historical memory is determined based on the last retrieval time in the metadata of the first historical memory. If the non-recall duration is less than or equal to the preset linear decay period, the freshness score of the first historical memory is determined based on the linear decay strategy. If the non-recall duration exceeds the preset linear decay period, the freshness score of the first historical memory is determined based on an exponential decay strategy.

[0084] The formula for calculating the freshness score R is as follows: When days_since_access ≤ T_linear: R = 1 - γ_linear × (days_since_access / T_linear) otherwise: R = γ_exp × (0.5^((days_since_access - T_linear) / T_half)) Parameter configuration: γ_linear: Linear decay coefficient, default value 0.2, adjustable range [0.1, 0.3] T_linear: Linear decay period, default value 7 days, adjustable range [3,14] γ_exp: Exponential decay base, default value 0.8, adjustable range [0.6, 0.9] T_half: Exponential half-life, default value 30 days, adjustable range [15, 60] Minimum value limit: R_min = 0.01 Understandably, when the duration of memory recall is short, a linear decay strategy is used to determine the freshness score of the first historical memory, ensuring that the weight of newly recalled memories is enhanced. When the duration of memory recall is long, an exponential decay strategy is used to weaken the weight of outdated memories, while still retaining their usability to avoid memory omissions. Therefore, a dynamic scoring mechanism combining linear and exponential decay can balance the sensitivity of short-term memory and the weakening of long-term memory. The resulting freshness score can reflect the decay pattern of user memories, improving the accuracy and precision of memory evaluation.

[0085] The first score of the first historical memory is determined based on its importance score and freshness score, and may include: The importance coefficient of the first historical memory is determined based on the importance score, freshness score, and preset enhancement coefficient of the first historical memory. The first score of the first historical memory is determined based on the importance coefficient and the similarity between the first historical memory and the question.

[0086] The formula for calculating the importance coefficient is: 1 + β × I × R.

[0087] The formula for calculating the first score is: S_enhance = S_similarity × (1 + β × I × R).

[0088] Where S_similarity is the similarity between the first historical memory and the question; β is the enhancement coefficient, with a default value of 0.3 and an adjustable range of [0.1, 0.5]; I is the importance score; and R is the freshness score.

[0089] This can be understood as follows: when calculating the first score, an enhancement coefficient is introduced. This enhancement coefficient merges the importance score and the freshness score to obtain the importance coefficient. The importance coefficient combines the static importance and dynamic timeliness of the memory. Incorporating the importance coefficient, along with the similarity between the first historical memory and the question, into the calculation of the first score can significantly improve the alignment between the first score and user needs and the freshness of knowledge. This ensures that the second historical memory ultimately selected based on the first score possesses both freshness and practical reference value.

[0090] In this embodiment, the importance score of historical memory is determined by recall frequency, emotional intensity, and relevance. This score is then combined with similarity, importance, and freshness to calculate a first score. This multi-dimensional approach allows for a quantitative assessment of the user's historical memory, fully considering information relevance, timeliness, and user attention. This ensures the score calculation more closely aligns with actual interaction intent and user preferences. Through a multi-layered, weighted scoring mechanism, the accuracy and rationality of historical memory selection are effectively improved, reducing interference from invalid or low-value information. This provides a reliable basis for selecting high-quality target memories and generating responses that better meet user needs, thereby enhancing the intelligence, coherence, and user experience of the interactive system.

[0091] After the first fine-grained memory retrieval mentioned above, a second fine-grained memory retrieval can be performed, namely, step S402, which selects at least one target historical memory from multiple second historical memories based on the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory.

[0092] In the second, fine-grained recall phase, memory recall analysis can be performed using several dimensions, such as memory distribution characteristics, memory similarity, and memory features. Since memory distribution characteristics reflect the overall characteristics of the second set of historical memories, incorporating these characteristics into the comprehensive analysis of historical memories can make the target scores for the second set of historical memories more accurate and effective.

[0093] Therefore, as another embodiment, S402, based on the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory, at least one target historical memory is selected from the plurality of second historical memories, including: B1. Based on the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory, determine the target score for each second historical memory.

[0094] B2. Based on the target scores of each of the multiple second historical memories, sort them in descending order to obtain the sorted second historical memories.

[0095] B3. Determine the first N second historical memories among the sorted second historical memories as at least one target historical memory, where N is an integer greater than or equal to 1.

[0096] In this embodiment, memory distribution characteristics are introduced as a key indicator for screening second historical memories. Combining the similarity and memory characteristics of each second historical memory, the analysis examines both the group characteristics and individual characteristics of each second historical memory to obtain a target score for each second historical memory, ensuring that the target score possesses overall characteristics. Based on the target score of at least one second historical memory, they are sorted in descending order to obtain multiple sorted second historical memories. The top N second historical memories from these sorted memories are then further sorted in descending order to obtain multiple ranked second historical memories. These top N second historical memories are then identified as at least one target historical memory. The selected target historical memories exhibit representativeness, high consistency, and high significance in their overall distribution, ensuring that the final selected target historical memories not only have high individual value but also higher overall logical support and information completeness, laying a solid data foundation for generating high-quality answers.

[0097] When memory distribution characteristics are involved in the generation of the target score for the second historical memory, they mainly participate in the weight adjustment of at least one influencing factor. Therefore, B1, determining the target score for each second historical memory based on the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory may include the following steps: B11. Based on the memory distribution characteristics of the second historical memory set, determine the weight of each influencing factor. The influencing factor is the similarity between the first historical memory and the question, and at least one of the recall frequency, freshness, emotional intensity and relevance of the first historical memory. B12. Determine the target score for each second historical memory based on the weight and corresponding value of each influencing factor.

[0098] like Figure 5 As shown, after obtaining the set C1 of the second historical memories, step 505, weight adjustment, can be performed, which involves adjusting the weights and values ​​of influencing factors such as similarity, recall frequency, relevance, freshness, and emotional intensity. Specifically, this is step B11. Afterwards, step 506, target score calculation, is performed, which is step B12.

[0099] Next, execute step 507, target score sorting, which is step B2. Then execute step 508, target memory filtering, which is step B3.

[0100] Optionally, after B11, the method further includes: determining the value of each second historical memory in at least one influencing factor based on the metadata of each second historical memory.

[0101] Optionally, B12 may include: weighted summation of the values ​​and weights of each second historical memory in at least one influencing factor to obtain the target score for each second historical memory.

[0102] In this embodiment, the weights of each influencing factor are determined based on the memory distribution characteristics of the second historical memory set. This allows for a leap from static memory distribution to dynamic weight adjustment, automatically optimizing the weights of the influencing factors. Thus, by using the weights and values ​​of each influencing factor, a target score for each second historical memory is obtained. This preserves the impact of dynamic weight changes on the score, upgrading memory assessment from static rules to dynamic perception. This significantly enhances the accuracy and precision of the target score, ensuring a higher overall quality for the target historical memories selected using the target score.

[0103] Further, step B11, based on the memory distribution characteristics of the second set of historical memories, adjusts the weights of at least one influencing factor, including: C1. Based on the memory distribution characteristics of the set of second historical memories, determine at least one ambiguity score of the second historical memory; C2. Determine the weight adjustment factor based on the ambiguity score; C3. Determine the weight of each influencing factor based on the weight adjustment factor.

[0104] Optionally, C2 may include: determining a weight adjustment factor based on the ambiguity score and a preset weight adjustment formula.

[0105] In this embodiment, by adjusting the weights of each influencing factor based on the memory distribution characteristics of the second set of historical memories, a leap from static memory distribution to dynamic weight adjustment can be achieved, automatically optimizing the weights of the influencing factors. Thus, a target score is obtained through the weights and values ​​of each influencing factor, preserving the impact of dynamic weight changes on the score. This upgrades memory assessment from static rules to dynamic perception, significantly enhancing the accuracy and precision of the target score, and ensuring a higher overall quality of the target historical memories selected using the target score.

[0106] In one possible design, the memory distribution characteristics of the second historical memory set include: maximum similarity, similarity variance, information entropy, and memory diversity. Step C1: Based on the memory distribution characteristics of the second historical memory set, determine at least one ambiguity score for the second historical memory, including: C11. Based on the maximum similarity, similarity variance, information entropy, and memory diversity in the memory distribution characteristics, obtain the ambiguity score of at least one second historical memory.

[0107] Optionally, maximum similarity can represent the strongest association between memories. Similarity variance can reflect the consistency of memory associations. Information entropy measures the disorder and uncertainty of relationships between memories. Memory diversity assesses the breadth of differences in memory content.

[0108] The ambiguity score quantifies the uncertainty or clarity of a user's question, ranging from 0 to 1. It is calculated by analyzing the similarity distribution of memories within the second set of historical memories, comprising four components: variance (V_variance), maximum similarity (V_max), information entropy (V_entropy), and diversity (V_diversity), which are then weighted to arrive at the overall ambiguity score. This metric guides subsequent dynamic adjustments to the weights.

[0109] The formula for calculating the ambiguity score is: V = λ1× V_variance + λ2× V_max + λ3× V_entropy + λ4× V_diversity.

[0110] Where, V_variance = min(σ² / θ_variance, 1) θ_variance: Variance threshold, default value 0.1, adjustable range [0.05, 0.2].

[0111] V_max = 1 - min(S_max / θ_max, 1) S_max: Maximum similarity, θ_max: High-quality matching benchmark, default value 0.8, adjustable range [0.6, 0.9].

[0112] Information entropy V_entropy = H / log2(K) H: Shannon entropy of similarity distribution, K: number of discretization intervals, default value 10, adjustable range [5,20].

[0113] The similarity scores are discretized into K intervals, and the Shannon entropy is calculated and then normalized, with a value range of [0,1].

[0114] Memory diversity V_diversity = min(σ_recall / (μ_recall + ε), 1) σ_recall: Standard deviation of recall frequency, μ_recall: Mean of recall frequency, ε=1e-8 .

[0115] In this embodiment, four key distribution characteristics—maximum similarity, similarity variance, information entropy, and memory diversity—are integrated. Maximum similarity and variance provide a statistical perspective based on central tendency and dispersion; entropy introduces uncertainty quantification from information theory; and diversity supplements distribution evaluation from a content dimension. This constructs a multi-dimensional fuzziness score calculation method, decomposing the traditionally difficult-to-quantify "fuzziness score" into several indicators such as maximum similarity, similarity variance, information entropy, and memory diversity. This allows the system to calculate fuzziness scores for different historical memories more precisely, providing more accurate fuzziness indicators for subsequent score calculations.

[0116] The ambiguity score is primarily used in calculating the weight adjustment factor. As another example, C2, based on the ambiguity score, determines the weight adjustment factor, including: C21. Determine the adjustment strength and ambiguity threshold in the weight adjustment formula.

[0117] C22. Based on the ambiguity score, ambiguity threshold, and adjustment intensity, and combined with the preset weight adjustment formula, calculate the weight adjustment factor.

[0118] The formula for calculating the weighting adjustment factor is: A=1 / (1+exp(-η×(V-φ))) Where η represents the adjustment intensity, with a default value of 10 and an adjustable range of [5,15]. Φ represents the ambiguity threshold, with a default value of 0.5 and an adjustable range of [0.3,0.7].

[0119] like Figure 6 The figure shown is an example curve of a weight adjustment factor provided in an embodiment of this application. Taking η as 1 and φ as 0.5 as an example, curve 601 represents the value of the weight adjustment factor A as V changes. The horizontal axis of the coordinate system containing curve 601 is V, and the vertical axis is the weight adjustment factor.

[0120] In this embodiment, the adjustment intensity and ambiguity threshold in the weight adjustment formula are determined, defining more refined weight adjustment parameters. Then, based on the ambiguity score, ambiguity threshold, and adjustment intensity, combined with the preset weight adjustment formula, a weight adjustment factor is calculated, realizing a dynamic combination of the ambiguity score, ambiguity threshold, and adjustment intensity parameters, making the basis for the weight adjustment factor more diverse. The ability to dynamically adjust ambiguity perception sensitivity is achieved through the ambiguity score and ambiguity threshold, while the adjustment intensity controls the adjustment strength, enabling the system to flexibly adjust the weight adjustment factor according to the corresponding application scenario.

[0121] As an example, at least one influencing factor includes: similarity influencing factor, recall influencing factor, association influencing factor, sentiment influencing factor, and novelty influencing factor; step C3, adjusting the weights of at least one influencing factor according to the weight adjustment factor, including: The similarity weights are adjusted according to the weight adjustment factor and the preset similarity decay coefficient to obtain the adjusted similarity weights. Based on the weighting adjustment factor and the preset recall enhancement coefficient, the recall weight is adjusted to obtain the adjusted recall weight. Based on the weight adjustment factor and the preset association number enhancement coefficient, the association number weight is adjusted to obtain the adjusted association number weight. Based on the weighting adjustment factor and the preset emotion enhancement coefficient, the emotion weight is adjusted to obtain the adjusted emotion weight. The weighting of freshness remains unchanged; The adjusted similarity weight, adjusted recall weight, adjusted association weight, adjusted sentiment weight, and unadjusted freshness weight are normalized to obtain the normalized target similarity weight, target recall weight, target association weight, target sentiment weight, and target freshness weight.

[0122] The formula for adjusting the similarity weight is: w_sim′ = w_sim × (1 - δ1 × A) The formula for adjusting the recall weight is: w_recall′ = w_recall × (1 + δ2 × A) The formula for adjusting the weight of association frequency is: w_relation′ = w_relation × (1 + δ3 × A) The formula for adjusting the emotional weight is: w_emotion′ = w_emotion × (1 + δ4 × A) The formula for freshness weighting is: w_fresh′ = w_fresh Among them, the adjustment coefficient is: δ1: Similarity weight decay coefficient, default value 0.4, adjustable range [0.2, 0.6] δ2: Recall frequency weighting enhancement coefficient, default value 0.8, adjustable range [0.5, 1.0] δ3: Correlation weighting enhancement coefficient, default value 0.6, adjustable range [0.4, 0.8] δ4: Emotional weight enhancement coefficient, default value 0.6, adjustable range [0.4, 0.8] Finally, all ownership is renormalized to ensure the sum is 1.

[0123] w_i″ = w_i′ / Σw_j′ In this embodiment, specific attenuation or enhancement coefficients are introduced for each of the four dynamic features: similarity, recall, association frequency, and sentiment. This allows the weight adjustment factors to be precisely controlled according to the different sensitivities and importance of each dimension, while maintaining the freshness weight unchanged. Normalization is then used to ensure the overall balance and comparability of the weight system. This achieves a balance between flexibility and stability in multi-dimensional memory evaluation.

[0124] Optionally, step B13 involves weighted summation of the values ​​and weights of each second historical memory under at least one influencing factor to obtain the target score for each second historical memory, including: The similarity score corresponding to the similarity factor, the recall score corresponding to the recall factor, the association score corresponding to the association factor, the sentiment salience score corresponding to the sentiment factor, and the freshness score corresponding to the freshness factor were determined for the second historical memory. The target similarity score is determined based on the similarity and target similarity weights corresponding to the second historical memory in the similarity influence factor. The target recall score is determined based on the weight of the second historical memory in the recall impact factor and the target recall. The target association score is determined based on the number of associations corresponding to the second historical memory in the association frequency influence factor and the weight of the target association frequency. The target emotional score is determined based on the emotional salience of the second historical memory in the emotional influence factor and the target emotional weight. The target freshness score is determined based on the freshness score of the second historical memory corresponding to the freshness influence factor and the target freshness weight. The target score for the second historical memory is obtained by summing the target similarity score, target recall score, target association score, target sentiment score, and target novelty score.

[0125] The formula for calculating the target score is: S_final = w_sim″ × S_similarity + w_recall″ × N_recall + w_relation″ × N_relation + w_fresh″ × R + w_emotion″ × N_emotion.

[0126] Where w_sim″ is the normalized similarity weight; S_similarity is the similarity; w_recall″ is the normalized recall weight; N_recall is the recall count; w_relation″ is the normalized association weight; N_relation is the association count; w_fresh″ is the normalized sentiment weight; R is the sentiment significance; w_emotion″ is the normalized freshness weight; and N_emotion is the freshness score.

[0127] In this embodiment, a comprehensive memory feature system is established based on quantitative characteristics across five key dimensions: similarity, recall frequency, association frequency, sentiment salience, and novelty. The value of each influencing factor is combined with a normalized target weight to calculate the relative importance of each factor within the current recall context. Then, all dimension scores are integrated into a single target score through linear weighted summation, allowing the target score to reflect a dynamic scoring strategy through weights. This approach decomposes the complex problem of memory value assessment into multiple independently quantifiable, weighted, and combinable sub-problems, flexibly adjusting the assessment focus through weight parameters, providing a precise and effective data quantification foundation for memory screening.

[0128] In the above embodiments, to ensure the timeliness of users' historical memories, the question-answering method based on memory retrieval provided in this application may further include: Update the recall count and last retrieval time in the metadata of each target's historical memory; Alternatively, based on the question and the target answer, a new historical memory can be generated and added to multiple historical memories.

[0129] In this embodiment of the application, by updating the recall count and last retrieval time in the metadata of each target historical memory, or by generating new historical memories based on the current question and the corresponding target answer and adding them to the historical memory database, it is possible to realize the dynamic updating and continuous iteration of user historical memory data, record the usage frequency and latest validity of historical memories in a timely manner, and ensure the timeliness, effectiveness and integrity of historical memories.

[0130] The following specific embodiments illustrate the memory-based question-answering method of this application. Example 1: When a user interacts with a social companion AI, they input the query: "What fun things have happened lately?" This is a typical open-ended question with an ambiguous intent, requiring the system to combine the user's personalized characteristics to return interesting and relevant memories. Processing steps: 1. Memory preprocessing: The memory bank contains multiple historical memories of the user, such as historical conversations, points of interest, and emotional records.

[0131] Metadata example for each historical memory: A memory entry has a vector embedding dimension of 768, a recall frequency of 15, an association number of 8, a creation time of 2023-10-01, a last retrieval time of 2024-06-15, and a sentiment salience of 0.8 (based on the sentiment analysis model output).

[0132] 2. Initial Recall Phase: Parameter settings: α=15 (recall factor), M=600 (maximum recall frequency), θ_low=0.4 (mean similarity / threshold), topN=10.

[0133] Retrieve min(15×10, 600)=150 first historical memories from the memory bank, denoted as multiple first historical memories C.

[0134] Statistical information: maximum recall frequency (max_recall=45), maximum number of associations (max_relation=25), mean similarity (μ=0.52), similarity variance (σ²=0.018), maximum sentiment significance (max_emotion=0.95).

[0135] Calculate the first score S_enhance: For a typical memory (similarity 0.58, recall frequency 20, association number 12, sentiment significance 0.75, last access 3 days): N_recall = log(20+1) / log(45+1) ≈ 0.827 N_relation = log(12+1) / log(25+1) ≈ 0.784 N_emotion = 0.75 / 0.95 ≈ 0.789 I = 0.4×0.827 + 0.3×0.784 + 0.3×0.789 ≈ 0.801 R = 1 - 0.2 × (3 / 7) ≈ 0.914 The first score of this memory is S_enhance = 0.58 × (1 + 0.3 × 0.801 × 0.914) ≈ 0.692. After obtaining the first score of each historical memory, the historical memories corresponding to the first 50 first scores are taken as the set C1 of the second historical memories.

[0136] 3. Problem Ambiguity Assessment: Analyze the similarity distribution of C1: Similarity variance σ² = 0.016, maximum similarity S_max = 0.68, information entropy H = 2.15, memory diversity = 1.25 V_variance = min(0.016 / 0.1, 1) = 0.16 V_max = 1 - min(0.68 / 0.8, 1) = 0.15 V_entropy = 2.15 / log2(10) ≈ 0.647 V_diversity = min(1.25, 1) = 1.0 Ambiguity score V = 0.3×0.16 + 0.25×0.15 + 0.25×0.647 + 0.2×1.0 ≈0.457 4. Dynamic weight adjustment: Adjustment factor A = 1 / (1+exp(-10×(0.457-0.5))) ≈ 0.395 Weight adjustment: w_sim' = 0.4×(1-0.4×0.395) ≈ 0.337 w_recall' = 0.15×(1+0.8×0.395) ≈ 0.197 w_relation' = 0.15×(1+0.6×0.395) ≈ 0.186 w_emotion' = 0.15×(1+0.6×0.395) ≈ 0.186 w_fresh' = 0.15 Normalized weights: w_sim″≈0.317, w_recall″≈0.185, w_relation″≈0.175, w_emotion″≈0.175, w_fresh″≈0.141 5. Based on comprehensive scoring and screening, calculate the target score for each second historical memory. For example, the target score for one second historical memory, S_final, is calculated as follows: S_final = 0.317 × 0.58 + 0.185 × 0.827 + 0.175 × 0.784 + 0.141 × 0.914 + 0.175 × 0.789 ≈ 0.712 Based on the target scores of each secondary historical memory, the secondary historical memories are sorted in descending order of target score, and the top 10 secondary historical memories with the highest target scores are finally selected. For example, the top 10 secondary historical memories include the user's favorite entertainment activities, recent social activities, and topics of high interest.

[0137] 6. Memory bank update: Update the recall frequency and last access time of the retrieved memory.

[0138] Example 2: When interacting with the task assistant AI, the user enters the query: "Help me find yesterday afternoon's meeting minutes." This is a specific and clear question that requires accurate retrieval of relevant memories.

[0139] Implementation steps: 1. Memory preprocessing: The memory bank contains multiple historical memories of the user, such as structured data like work documents, meeting minutes, and task lists.

[0140] 2. Initial Recall Phase: Parameter settings: α=8, M=400, θ_low=0.6, topN=5 Retrieve min(8×5, 400) = 40 first historical memories Statistical information: max_recall=32, max_relation=18, μ=0.75, σ²=0.008, max_emotion=0.3, and calculate the first score for each first historical memory. After sorting the historical memories according to their first scores, the top 25 are selected as the set C1 of second historical memories.

[0141] 3. Problem ambiguity assessment: The similarity distribution of the second set of historical memories, C1, is as follows: σ²=0.006, S_max=0.85, H=1.42, and diversity=0.4. V_variance = min(0.006 / 0.1,1)=0.06 V_max = 1 - min(0.85 / 0.8, 1) = 0.0 V_entropy = 1.42 / log2(10)≈0.427 V_diversity = min(0.4,1)=0.4 V = 0.3×0.06 + 0.25×0.0 + 0.25×0.427 + 0.2×0.4 ≈ 0.192 4. Dynamic weight adjustment: A = 1 / (1+exp(-10×(0.192-0.5))) ≈ 0.044 After weight adjustment, similarity weight remains dominant: w_sim″≈0.385, while other weights decrease accordingly. 5. Comprehensive Scoring and Filtering: Calculate the target score for each secondary historical memory based on the above parameters. Sort the secondary historical memories in descending order of their target scores and return the top N secondary historical memories. Generate corresponding target answers, such as returning accurate meeting minutes and related documents.

[0142] 6. Memory update: Updates access information for meeting minutes.

[0143] like Figure 7 The diagram shown is a structural schematic of a memory-based question-answering device 700 provided in an embodiment of this application. This memory-based question-answering device 700 may include: The first filtering unit 701 is used to respond to the user's question by determining a set of second historical memories from the user's multiple first historical memories based on the similarity between each first historical memory and the question, as well as the memory characteristics of each first historical memory. The set of second historical memories includes multiple second historical memories. The second screening unit 702 is used to select at least one target historical memory from multiple second historical memories based on the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory. The answer generation unit 703 is used to generate a target answer corresponding to a user's question based on at least one target historical memory.

[0144] As one embodiment, memory characteristics include recall frequency, freshness, emotional intensity, and relevance. The first screening unit includes: The first calculation module is used to determine the first score of each first historical memory based on the similarity between each first historical memory and the question, as well as the recall frequency, freshness, emotional intensity and relevance of each first historical memory. The first selection module is used to select a first number of second historical memories based on the first score of each first historical memory, so as to determine the multiple second historical memories as a set of second historical memories.

[0145] As another embodiment, the first calculation module is specifically used to: determine the importance score of each first historical memory based on the recall frequency, emotional intensity and relevance of each first historical memory; and determine the first score of each first historical memory based on the similarity between each first historical memory and the question, the importance score of each first historical memory and the freshness of each first historical memory.

[0146] As yet another embodiment, it also includes: The third filtering unit is used to select multiple first historical memories based on the similarity between the user's multiple historical memories and the question.

[0147] As another embodiment, the second screening unit includes: The second calculation module is used to determine the target score of each second historical memory based on the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory. The memory sorting module is used to sort multiple second historical memories in descending order based on their respective target scores, thus obtaining the sorted second historical memories. The second selection module is used to determine the top N second historical memories among the sorted second historical memories as at least one target historical memory, where N is an integer greater than or equal to 1.

[0148] As another embodiment, the second computing module is specifically used for: Based on the memory distribution characteristics of the second historical memory set, the weights of each influencing factor are determined. The influencing factor is the similarity between the first historical memory and the question, as well as at least one of the recall frequency, freshness, emotional intensity and relevance of the first historical memory. The target score for each second historical memory is determined based on the weight and corresponding value of each influencing factor.

[0149] As another embodiment, the second computing module is specifically used for: Based on the memory distribution characteristics of the set of second historical memories, determine at least one ambiguity score for the second historical memory; Determine the weight adjustment factor based on the ambiguity score; The weights of each influencing factor are determined based on the weight adjustment factor.

[0150] As another example, the memory distribution characteristics of the second set of historical memories include: maximum similarity, similarity variance, information entropy, and memory diversity; The second calculation module is specifically used for: Based on the maximum similarity, similarity variance, information entropy, and memory diversity in the memory distribution characteristics, obtain the ambiguity score of at least one second historical memory.

[0151] As yet another embodiment, it also includes: The first update unit is used to update the recall count and last retrieval time in the metadata of each target's historical memory; Alternatively, the second update unit is used to generate new historical memories based on the question and the target answer, and to add the new historical memories to multiple historical memories.

[0152] In the embodiments of this application, Figure 7 The device shown can also be a chip or a chip system, such as a system on chip (SoC) or a baseboard management controller (BMC).

[0153] Figure 8This is a hardware block diagram of a computing device provided in an embodiment of this application. The computing device 800 according to an embodiment of this application includes at least a memory 801 and a processor 802. The memory 801 is used to store computer programs. The processor 802 is used to execute the computer programs to implement the memory-based question-answering method of any of the above embodiments.

[0154] In addition, both memory 801 and processor 802 are electrically connected to bus 803.

[0155] Furthermore, embodiments of this application also provide a computer-readable storage medium for storing a computer program. When executed by a processor, the computer program implements the memory-based question-answering method of any of the preceding embodiments of this application.

[0156] Computer-readable storage media include, but are not limited to, volatile storage media and / or non-volatile storage media. Volatile storage media may include, for example, random access storage media (RAM) and / or cache storage media. Non-volatile storage media may include, for example, read-only storage media (ROM), hard disks, flash memory, optical disks, magnetic disks, etc.

[0157] This application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the memory-based question-answering method of any of the preceding embodiments of this application.

[0158] The basic principles of the embodiments of this application have been described above with reference to specific examples. However, it should be noted that the advantages, benefits, and effects mentioned in the embodiments of this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the embodiments of this application from necessarily employing the aforementioned specific details.

[0159] The block diagrams of devices, apparatuses, devices, and systems involved in the embodiments of this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context explicitly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0160] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.

[0161] It should also be noted that in the systems and methods of this application embodiment, each component or step can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions of the embodiments of this application.

[0162] Various changes, substitutions, and modifications can be made to the technology herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the embodiments of this application is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.

[0163] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use embodiments of this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of embodiments of this application. Therefore, embodiments of this application are not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0164] The above description has been given for illustrative and descriptive purposes. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A question-answering method based on memory recall, characterized in that, include: In response to a user's question, a set of second historical memories is determined from the user's multiple first historical memories based on the similarity between each first historical memory and the question, as well as the memory characteristics of each first historical memory. The set of second historical memories includes multiple second historical memories. Based on the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory, at least one target historical memory is selected from the plurality of second historical memories. Based on the at least one target historical memory, a target answer corresponding to the user's question is generated.

2. The method according to claim 1, characterized in that, The memory characteristics include recall frequency, freshness, emotional intensity, and relevance. The process of determining a set of second historical memories from the user's multiple first historical memories, based on the similarity between each first historical memory and the question, and the memory characteristics of each first historical memory, includes: Based on the similarity between each first historical memory and the question, as well as the recall frequency, freshness, emotional intensity and relevance of each first historical memory, a first score is determined for each first historical memory. Based on the first score of each first historical memory, a first number of multiple second historical memories are selected to determine the multiple second historical memories as a set of second historical memories.

3. The method according to claim 2, characterized in that, The first score for each first historical memory is determined based on the similarity between each first historical memory and the question, as well as the recall frequency, freshness, emotional intensity, and relevance of each first historical memory, including: The importance score of each first historical memory is determined based on the recall frequency, emotional intensity, and relevance of each first historical memory; Based on the similarity between each first historical memory and the question, the importance score and novelty of each first historical memory, the first score of each first historical memory is determined.

4. The method according to any one of claims 1-3, characterized in that, The response to the user's question also includes: Based on the similarity between the user's multiple historical memories and the question, the multiple first historical memories are selected.

5. The method according to any one of claims 1-4, characterized in that, The step of selecting at least one target historical memory from the plurality of second historical memories based on the memory distribution characteristics of the set of second historical memories includes: Based on the memory distribution characteristics of the second set of historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory, the target score of each second historical memory is determined. Based on the target scores of the multiple second historical memories, they are sorted in descending order to obtain the sorted multiple second historical memories; The first N second historical memories among the sorted plurality of second historical memories are determined as the at least one target historical memory, where N is an integer greater than or equal to 1.

6. The method according to claim 5, characterized in that, The step of determining the target score for each second historical memory based on the memory distribution characteristics of the set of second historical memories, the similarity between each second historical memory and the question, and the memory characteristics of each second historical memory includes: Based on the memory distribution characteristics of the second set of historical memories, the weights of each influencing factor are determined. The influencing factor is the similarity between the first historical memory and the question, and at least one of the recall frequency, freshness, emotional intensity and relevance of the first historical memory. The target score for each second historical memory is determined based on the weight and corresponding value of each influencing factor.

7. The method according to claim 6, characterized in that, The step of adjusting the weights of at least one influencing factor based on the memory distribution characteristics of the second set of historical memories includes: Based on the memory distribution characteristics of the set of second historical memories, determine the ambiguity score of the at least one second historical memory; The weight adjustment factor is determined based on the ambiguity score; The weights of each influencing factor are determined based on the weight adjustment factor.

8. The method according to claim 7, characterized in that, The memory distribution characteristics of the second set of historical memories include: maximum similarity, similarity variance, information entropy, and memory diversity; The step of determining the ambiguity score of the at least one second historical memory based on the memory distribution characteristics of the at least one second historical memory includes: The ambiguity score of the at least one second historical memory is obtained based on the maximum similarity, similarity variance, information entropy, and memory diversity in the memory distribution characteristics.

9. The method according to any one of claims 1-8, characterized in that, Also includes: Update the recall count and last retrieval time in the metadata of each target's historical memory; Alternatively, based on the question and the target answer, a new historical memory can be generated and added to multiple historical memories.

10. A computing device, characterized in that, include: A processor and a memory, the memory storing a computer program that the processor uses to invoke the question-answering method based on memory recall as described in any one of claims 1-9.