Memory mechanism-based information processing method, electronic device and storage medium

By introducing a hierarchical storage mechanism of memory database into the model and processing user information in combination with the memory mechanism, the problem of insufficient application of memory mechanism in the existing technology is solved, and the accuracy and user experience of information processing are improved.

WO2025098090A1PCT designated stage expired Publication Date: 2025-05-15ALIBABA (CHINA) CO LTD

Patent Information

Application Number
PCT/CN2024/124562
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-07
Filing Date
2024-10-12
Publication Date
2025-05-15

AI Technical Summary

Technical Problem

In the prior art, there are few researches on model processing schemes combined with memory mechanisms, resulting in poor accuracy of reply information generated by the model based on memory mechanisms and poor user experience.

Method used

An information processing method based on a memory mechanism is provided. By obtaining the pending information of the target user, searching for knowledge related to the pending information in the memory of the target user, and using the searched knowledge to obtain processing results of the pending information. Memory database includes long-term memory banks and short-term memory banks. If the knowledge used is knowledge in the short-term memory bank, the use behavior for knowledge is recorded, and the knowledge is stored in the long-term memory bank when the preset conditions are met according to the use behavior.

Benefits of technology

The memory is hierarchical storage, simulates the memory mechanism in the real world, and processes the pending information of the target user based on the memory knowledge, so that the processing results are more in line with the needs of users, improve the effect of interaction with users, and improve the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024124562_15052025_PF_FP_ABST
    Figure CN2024124562_15052025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure are a memory mechanism-based information processing method, an electronic device and a storage medium. The method comprises: acquiring information to be processed corresponding to a target user; searching in memory banks corresponding to the target user for knowledge related to said information, so as to use the searched knowledge to obtain a processing result corresponding to said information, the memory banks comprising a long-term memory bank and a short-term memory bank; if the used knowledge is knowledge in the short-term memory bank, recording a use behavior for the knowledge, the short-term memory bank being used for temporarily storing knowledge related to the target user, and when a use behavior corresponding to any knowledge in the short-term memory bank meets a preset condition, storing the knowledge meeting the preset condition into the long-term memory bank. The present disclosure can achieve hierarchical storage of memory, and simulate the memory mechanism of the real world to process information to be processed of users, thus improving the effect of interacting with the users, and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Information processing method, electronic device and storage medium based on memory mechanism

[0001] This disclosure claims priority to the Chinese patent application filed with the China Patent Office on November 7, 2023, with application number 202311471492.8 and application name “Information processing method, electronic device and storage medium based on memory mechanism”, all contents of which are incorporated by reference in this disclosure. Technical Field

[0002] The present disclosure relates to artificial intelligence technology, and in particular to an information processing method, electronic device, and storage medium based on a memory mechanism. Background Art

[0003] With the continuous development of artificial intelligence, machine learning models have been increasingly widely used in various fields, especially in the fields of intelligent customer service, search recommendations, etc. By utilizing the model's powerful natural language processing capabilities, personalized chats with users can be achieved or professional advice can be provided to users.

[0004] To improve the model's performance when interacting with users, it's possible to consider incorporating a memory mechanism into the model's processing, making the model's handling of user input more similar to real human interaction. However, research on model processing solutions incorporating memory mechanisms is currently limited, and the responses generated by the model using memory mechanisms are often inaccurate, resulting in a poor user experience.

[0005] Summary of the Invention

[0006] The present disclosure provides an information processing method, electronic device and storage medium based on a memory mechanism, which are used to process user information to be processed in combination with the memory mechanism to improve the effect of interaction with the user.

[0007] In a first aspect, an embodiment of the present disclosure provides an information processing method based on a memory mechanism, comprising:

[0008] Obtain the pending information corresponding to the target user;

[0009] Searching for knowledge related to the information to be processed in a memory bank corresponding to the target user, and using the searched knowledge to obtain a processing result corresponding to the information to be processed; the memory bank includes a long-term memory bank and a short-term memory bank;

[0010] If the knowledge used is the knowledge in the short-term memory bank, then the use behavior of the knowledge is recorded;

[0011] The short-term memory library is used to temporarily store knowledge related to the target user, and when the usage behavior corresponding to any knowledge in the short-term memory library meets the preset conditions, the knowledge meeting the preset conditions is stored in the long-term memory library.

[0012] Optionally, if the knowledge used is knowledge in the short-term memory bank, then the use behavior of the knowledge is recorded, including:

[0013] If the knowledge used is the knowledge in the short-term memory bank, the number of times the knowledge is used is increased by one;

[0014] Accordingly, when the usage behavior corresponding to any knowledge in the short-term memory library meets the preset conditions, the knowledge meeting the preset conditions is stored in the long-term memory library, including:

[0015] When the usage count corresponding to any piece of knowledge in the short-term memory reaches a usage count threshold, the knowledge reaching the usage count threshold is stored in the long-term memory.

[0016] Optionally, the method further includes:

[0017] After the knowledge is stored in the long-term memory, the knowledge is deleted from the short-term memory.

[0018] Optionally, the short-term memory is used to store a preset amount of knowledge, and the stored knowledge is sorted according to the time when it was added to the short-term memory; the method further includes:

[0019] Acquire knowledge generated for the target user to be added to the short-term memory bank;

[0020] The acquired knowledge is added to the short-term memory library, and part of the knowledge in the short-term memory library is deleted in sequence to maintain the amount of knowledge in the short-term memory library at a preset amount.

[0021] Optionally, the recorded usage behavior of the knowledge includes the number of times the knowledge is used and / or the usage time; the method further includes:

[0022] If the number of times and / or the usage time corresponding to any knowledge in the short-term memory bank meets the forgetting condition, the knowledge meeting the forgetting condition will be deleted from the short-term memory bank.

[0023] Optionally, using the searched knowledge to obtain a processing result corresponding to the information to be processed includes:

[0024] Inputting the information to be processed, the at least one piece of knowledge found, and the prompt information into the target model to obtain a corresponding processing result;

[0025] The prompt information is used to indicate the type of each piece of knowledge in the at least one piece of knowledge, and the type includes long-term memory and short-term memory.

[0026] Optionally, before searching the memory library corresponding to the target user for knowledge related to the information to be processed, the method further includes:

[0027] Acquire at least one historical behavior information corresponding to the target user, and extract at least one knowledge from the historical behavior information;

[0028] If any of the extracted knowledge meets the memory condition, the knowledge meeting the memory condition is stored in the memory library.

[0029] Optionally, if any of the extracted knowledge meets the memory condition, storing the knowledge meeting the memory condition in the memory library includes:

[0030] For any one of the at least one pieces of knowledge to be processed, if there is knowledge matching the knowledge to be processed in the cache library corresponding to the target user, updating the number of occurrences of the matching knowledge;

[0031] If the number of occurrences of any knowledge in the cache library meets the short-term memory condition, the knowledge meeting the short-term memory condition is stored in the short-term memory library corresponding to the target user.

[0032] Optionally, the method further includes:

[0033] If there is no knowledge matching the knowledge to be processed in the cache library corresponding to the target user, the knowledge to be processed is stored in the cache library, and the number of occurrences is set to one.

[0034] Optionally, if the number of occurrences of any knowledge in the cache library meets the short-term memory condition, the knowledge meeting the short-term memory condition is stored in the short-term memory library corresponding to the target user, including:

[0035] If the number of occurrences of any piece of knowledge in the cache reaches a threshold number of occurrences, the knowledge that reaches the threshold number of occurrences will be stored in the short-term memory library corresponding to the target user.

[0036] Optionally, if the number of occurrences of any knowledge in the cache library meets the short-term memory condition, the knowledge meeting the short-term memory condition is stored in the short-term memory library corresponding to the target user, including:

[0037] For any piece of knowledge in the cache library, input the knowledge and the number of occurrences of the knowledge into the large model, so as to determine whether the knowledge meets the short-term memory condition through the large model;

[0038] If satisfied, the knowledge is stored in the short-term memory bank corresponding to the target user.

[0039] Optionally, if there is knowledge matching the knowledge to be processed in the cache library corresponding to the target user, the method further includes: storing the knowledge to be processed in a preset storage space;

[0040] Accordingly, before storing the knowledge in the cache library into the short-term memory library, the method further includes:

[0041] For any knowledge in the cache library, the knowledge stored in the preset storage space and matching the knowledge is fused to obtain fused knowledge, and the fused knowledge is used to replace the knowledge in the cache library.

[0042] Optionally, obtaining at least one historical behavior information corresponding to the target user includes: obtaining at least one historical behavior information of the target user within the preset period at every preset period;

[0043] The method further includes: after storing the knowledge in the cache library that meets the memory conditions into the memory library, clearing the cache library.

[0044] Optionally, if any of the extracted knowledge meets the memory condition, storing the knowledge meeting the memory condition in the memory library includes:

[0045] If any of the extracted knowledge matches the knowledge in the preset knowledge base, or if the large model determines that the knowledge meets the long-term memory conditions, the knowledge will be stored in the long-term memory base.

[0046] Optionally, obtaining at least one historical behavior information corresponding to the target user and extracting at least one piece of knowledge from the historical behavior information includes:

[0047] Determine the categories of knowledge to be extracted;

[0048] Inputting any historical behavior information and instruction information into the big model to obtain at least one piece of knowledge extracted by the big model from the historical behavior information;

[0049] The instruction information is used to instruct the large model to extract the knowledge of the category from the historical behavior information.

[0050] Optionally, the method further includes:

[0051] Displaying multiple candidate categories through an interactive interface; wherein the multiple candidate categories are categories of extractable knowledge;

[0052] A target category selected by a target user or a configuration person from the plurality of candidate categories is obtained, so as to extract knowledge corresponding to the target category from historical behavior information corresponding to the target user.

[0053] Optionally, the method further includes:

[0054] Based on the pre-trained large model, construct a target model corresponding to the target user, wherein the target model includes the large model and a bypass model;

[0055] Training the target model based on multiple historical behavior information of the target user, wherein during the training process, the parameters of the large model are frozen and only the parameters of the bypass model are updated;

[0056] The target model is used to obtain a processing result corresponding to the information to be processed based on the searched knowledge.

[0057] Optionally, training the target model based on the historical behavior information of the target user includes:

[0058] Determining the behavior style corresponding to each historical behavior information of the target user;

[0059] The historical behavior information and the behavior style are input into the target model, and the parameters of the target model are updated according to the output of the target model.

[0060] Optionally, before training the target model, the method further includes:

[0061] Displaying multiple candidate behavioral styles through an interactive interface, and obtaining a behavioral style selected by a target user or configuration personnel from the multiple candidate behavioral styles;

[0062] According to the selected behavior style, the parameters of the bypass model are initialized.

[0063] In a second aspect, the embodiments of the present disclosure further provide an information processing method based on a memory mechanism, comprising:

[0064] Acquire historical behavior information corresponding to a target user, and extract at least one piece of knowledge from the historical behavior information;

[0065] For any extracted knowledge, if there is matching knowledge in the cache library corresponding to the target user, the number of occurrences of the knowledge is updated;

[0066] According to the number of occurrences of the knowledge in the cache library, determine whether to store the knowledge in the memory library corresponding to the target user, so that when the information to be processed corresponding to the target user is obtained, the information to be processed is processed according to the knowledge in the memory library.

[0067] In a third aspect, the present disclosure further provides an intelligent dialogue method based on a memory mechanism, comprising:

[0068] Get the input information of the target user;

[0069] Searching for knowledge related to the input information in a memory bank corresponding to the target user; wherein the memory bank includes a long-term memory bank and a short-term memory bank;

[0070] Generate reply information for the target user using the searched knowledge and the input information;

[0071] If the knowledge used is the knowledge in the short-term memory bank, then the use behavior of the knowledge is recorded;

[0072] The short-term memory library is used to temporarily store knowledge related to the target user, and when the usage behavior corresponding to any knowledge in the short-term memory library meets the preset conditions, the knowledge meeting the preset conditions is stored in the long-term memory library.

[0073] In a fourth aspect, the present disclosure also provides a knowledge construction method based on a memory mechanism, including:

[0074] Obtaining historical conversation information corresponding to a target user, and extracting at least one piece of knowledge from the historical conversation information;

[0075] For any extracted knowledge, if there is matching knowledge in the cache library corresponding to the target user, the number of occurrences of the knowledge is updated;

[0076] According to the number of occurrences of the knowledge in the cache library, determine whether to store the knowledge in the memory library corresponding to the target user, so that when the input information corresponding to the target user is obtained, the reply information corresponding to the input information can be obtained according to the knowledge in the memory library.

[0077] In a fifth aspect, an embodiment of the present disclosure provides an electronic device, including:

[0078] at least one processor; and

[0079] a memory communicatively coupled to the at least one processor;

[0080] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the electronic device to execute the method described in any one of the above aspects.

[0081] In a sixth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in any one of the above aspects is implemented.

[0082] In a seventh aspect, an embodiment of the present disclosure provides a computer program product, comprising a computer program, which implements the method described in any of the above aspects when executed by a processor.

[0083] The information processing method, electronic device and storage medium based on the memory mechanism provided by the embodiments of the present disclosure can obtain the information to be processed corresponding to the target user, search for knowledge related to the information to be processed in the memory library corresponding to the target user, and use the searched knowledge to obtain the processing result corresponding to the information to be processed. The memory library includes a long-term memory library and a short-term memory library. If the knowledge used is the knowledge in the short-term memory library, the use behavior of the knowledge is recorded, wherein the short-term memory library is used to temporarily store knowledge related to the target user, and when the use behavior corresponding to any knowledge in the short-term memory library meets the preset conditions, the knowledge that meets the preset conditions is stored in the long-term memory library, which can realize hierarchical storage of memory, thereby simulating the memory mechanism of the real world, and processing the information to be processed of the target user according to the remembered knowledge, so that the processing result is more in line with the needs of the user, improving the effect of interaction with the user, and enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0085] FIG1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0086] FIG2 is a schematic diagram showing the principle of an information processing method provided by an embodiment of the present disclosure;

[0087] FIG3 is a flow chart of an information processing method based on a memory mechanism according to an embodiment of the present disclosure;

[0088] FIG4 is a schematic diagram of adding, converting, and forgetting memories provided by an embodiment of the present disclosure;

[0089] FIG5 is a flow chart of a memory generation method provided by an embodiment of the present disclosure;

[0090] FIG6 is a schematic diagram of an interactive interface for memory generation provided by an embodiment of the present disclosure;

[0091] FIG7 is a schematic diagram of a construction principle of a short-term memory bank provided by an embodiment of the present disclosure;

[0092] FIG8 is a schematic diagram of a process flow of a personalized fine-tuning method provided by an embodiment of the present disclosure;

[0093] FIG9 is a schematic diagram of an interactive interface for personalized fine-tuning provided by an embodiment of the present disclosure;

[0094] FIG10 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure.

[0095] The above drawings illustrate specific embodiments of the present disclosure, which will be described in more detail below. These drawings and textual descriptions are not intended to limit the scope of the present disclosure in any way, but rather to illustrate the concepts of the present disclosure to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0096] Exemplary embodiments are described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different drawings represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present disclosure.

[0097] It should be noted that the user information (including but not limited to user device information, user attribute information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and corresponding operation entrances must be provided for users to choose to authorize or refuse.

[0098] The disclosed embodiments can be implemented based on a large language model. Among them, a large language model refers to a deep learning language model with large-scale language model parameters, which usually contains hundreds of millions, tens of billions, hundreds of billions, trillions or even more than ten trillion language model parameters. The large language model can also be called a cornerstone language model / foundation model (Foundation Model). The large language model is pre-trained by large-scale unlabeled corpus to produce a pre-trained language model with more than 100 million parameters. This language model can adapt to a wide range of downstream tasks, and the language model has good generalization ability, such as a large-scale language model (LLM), a multi-modal pre-training language model, etc.

[0099] In practical applications, large language models only require a small number of samples to fine-tune the pre-trained language model and can be applied to different tasks. Large language models can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, they can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), and image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of large language models include digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.

[0100] First, the terms involved in this disclosure are explained:

[0101] Causal Language Modeling (CLM): A method for large-scale modeling to learn semantic information. Unlike masked language models, CLM focuses on acquiring information within a given corpus, assuming the input and output are identical. This modeling approach adheres to the principle of causality, meaning that the current word is only affected by the previous word, not the following word.

[0102] PEFT (Parameter-Efficient Fine-tuning): A low-resource method for training large models with few parameters.

[0103] LoRA (Low-Rank Adaptation for Large Language Model): A type of PEFT that focuses on freezing most of the large model parameters and fine-tuning small-scale parameters on downstream tasks.

[0104] Dual-Process: This refers to an information processing process that originates from real-world memory mechanisms and includes the Rehearsal Process and the Executive Process. The Rehearsal Process focuses on identifying which external information is worth recording in memory, while the Executive Process focuses on processing information stored in memory, such as which information will be stored in long-term memory.

[0105] DPeM (Dual-Process enhanced Memory mechanism): A memory mechanism simulating Dual-Process proposed in the embodiments of the present disclosure can effectively process information in the process of memorizing knowledge.

[0106] MaLP (Memory-augmented LLM Personalization): A personalized large model learning framework using memory mechanism and PEFT technology proposed in the embodiments of the present disclosure.

[0107] The application scenarios of the present disclosure are first described below.

[0108] The embodiments of the present disclosure can be applied to any scenario where a memory mechanism can be used to process user information, such as personalized chat, intelligent customer service, search recommendation, etc. The following description will be made using personalized chat as an example.

[0109] Currently, there is relatively little research in the industry on personalized chat using large models. Considering the various applications of large models' powerful natural language processing capabilities in real life, it is worthwhile to study personalized chat using large models.

[0110] In real-world chat scenarios, humans retain memories of their chat partners and, during the conversation, use these memories to respond accordingly. When using large models for intelligent chats with users, being able to respond based on user input and their memories of the current user can improve response effectiveness and enhance the user experience.

[0111] In some technologies, it is possible to consider extracting information from the user's historical conversations and storing it in a memory bank. During the interaction with the user, the information in the memory bank is referred to to respond to the user's questions.

[0112] However, the memory bank used by this approach struggles to mimic real-world memory mechanisms. In the real world, human memory is differentiated. For example, how to drive is considered long-term memory, while recent events, such as seeing a sign while driving yesterday, are considered short-term memory. Memories are constantly being summarized and refreshed in daily life. How to achieve this memory summary and refreshment to improve response effectiveness is a challenge that needs to be addressed.

[0113] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure. As shown in Figure 1, in an embodiment of the present disclosure, user information can be summarized based on historical conversations to form a memory of the user. For example, if a user mentioned information such as "I'm getting a sore throat today" or "I can't eat strong flavors" in a conversation one day ago, the large model can analyze and summarize this information to obtain a short-term memory of the user, "I've recently gotten a sore throat," and store it in the memory bank.

[0114] In the disclosed embodiment, the memory bank can be divided into a short-term memory bank and a long-term memory bank. After summarizing and analyzing the user conversation content, if the information obtained meets the short-term memory conditions, it will be stored in the short-term memory bank as short-term memory. After the short-term memory meets certain conditions, it will be converted into long-term memory. For example, if "liking spicy food" is frequently mentioned at multiple time points in the past, it will be converted from short-term memory to long-term memory and stored in the long-term memory bank. In this way, a long-term memory bank and a short-term memory bank are formed for a specific user.

[0115] In the process of interacting with the user, if the user inputs the question "What to eat tonight, any recommendations", if it is not combined with the memory mechanism, the large model may make random recommendations, and the generated content often does not meet the user's requirements and is difficult to meet the user's actual expectations. In the embodiment of the present disclosure, combined with the memory mechanism, the large model can know the user's preferences in advance, and then make targeted recommendations. For example, if the user's memory is "likes spicy food", then the large model's recommendation of Hunan cuisine may be more in line with the user's expectations. For another example, if the user's long-term memory is "likes spicy food" and the user's short-term memory is "lately getting angry", then the large model will combine long-term memory and short-term memory to provide content that better meets the user's needs. For example, some light meals included in a specific restaurant are more in line with the current user's expectations.

[0116] In order to achieve the above effects, the present disclosure provides an information processing method based on a memory mechanism, which can train a large model to record users' relevant knowledge and preferences and provide personalized responses to users.

[0117] Figure 2 is a schematic diagram illustrating the principles of an information processing method provided by an embodiment of the present disclosure. As shown in Figure 2, the MaLP provided by an embodiment of the present disclosure primarily comprises two modules: the Memory Generation module and the Memory Utilization module. These modules involve three phases: memory generation, personalized fine-tuning, and memory utilization. These phases are described below.

[0118] Stage 1: Memory Generation

[0119] The memory generation phase focuses on learning and storing useful information from past conversations. In each round of conversation, the coordinator extracts useful information as knowledge and temporarily stores it in a cache. This process is known as learning. The knowledge stored in the cache is recorded for its occurrence count. If the same or similar knowledge appears in multiple rounds of conversation, it is summarized and stored in short-term memory. This step is known as the rehearsal process.

[0120] Specifically, the integrator can be implemented based on a big model. A round of dialogue is input into the big model, and the big model can extract one or more knowledge therein. For each piece of extracted knowledge, it is determined whether there is matching knowledge in the cache library. If so, the number of occurrences of the matching knowledge in the cache library is increased by 1. If there is no relevant knowledge, the current knowledge is saved and the number of occurrences is set to 1.

[0121] After learning multiple rounds of conversation, the cache will contain a large amount of knowledge. Knowledge that appears a certain number of times will be summarized and stored in the short-term memory. Summarizing any piece of knowledge in the cache can include inputting that knowledge, along with matching knowledge from multiple rounds of conversation, into the large model. The large model then fuses this knowledge to generate updated knowledge, which is then stored in the short-term memory.

[0122] In some cases, important knowledge, such as "suffering from diabetes," can be directly stored in long-term memory. A large model can be used to determine whether knowledge should be stored in short-term or long-term memory, reflecting the executive process of memory.

[0123] After all the knowledge that meets the requirements is stored in the memory bank, the cache bank can be cleared to facilitate the use of the cache bank for knowledge learning next time.

[0124] Phase 2: Personalized fine-tuning:

[0125] In the process of interacting with users, the target model can be used to generate response information for the user. The target model can be implemented based on the big model.

[0126] By fine-tuning the target model, we can learn user preferences, such as their conversational style. For example, if a user prefers brief responses, the trained target model can generate short responses based on their conversational style.

[0127] During training, to improve training efficiency, most parameters in the target model can be frozen, while a smaller portion can be updated based on the user's historical conversations. As shown in Figure 2, the target model can include a large model (LLM) and a bypass model (denoted by A and B). During training, the parameters of the large model can be fixed, while only the parameters of the bypass model are updated. The dotted arrow in the figure represents the bypass model learning the user's personalized preferences after training.

[0128] This allows for efficient acquisition of a target model that has undergone user dialogue learning, which can be used to generate response information during the memory usage process in phase three.

[0129] Stage 3: Memory Usage

[0130] With the memory bank generated by the memory generation module and the personalized fine-tuned target model, the memory bank and target model can be used to respond to new user input information. During the memory utilization phase, after obtaining the user's current input information x, the retriever can search the STM (short-term memory) and LTM (long-term memory) for knowledge related to the input information x. The retrieved knowledge q is sent along with the input information x to the fine-tuned target model. The target model then responds to the user's current input information x based on the content learned during the fine-tuning process and the knowledge q obtained from the memory bank.

[0131] The knowledge in short-term memory is dynamic; old knowledge is forgotten as new knowledge enters. Furthermore, the number of times knowledge in short-term memory is used is recorded. Knowledge that has been used repeatedly is then stored in long-term memory. This step is known as memorization, and it also reflects the execution process. The term θ in the figure represents the conditions that must be met for the number of uses, thereby simulating real-world memory mechanisms and improving user interaction.

[0132] In the disclosed embodiment, the three-stage solution is implemented for a specific user, that is, a set of memory libraries and a set of model parameters are maintained for each user, thereby achieving personalized service for the user.

[0133] In summary, the disclosed embodiment proposes a memory strategy based on human memory ability, which can learn and summarize user conversations and store relevant knowledge in a short-term memory bank. The knowledge in the short-term memory bank can be stored in a long-term memory bank after being used multiple times, thereby realizing hierarchical storage of memory, thereby simulating the memory mechanism of the real world, combining the remembered knowledge with the user's current input information to reply to the user, so that the content of the reply is more in line with the user's needs, improving the accuracy of the reply information, and enhancing the user experience.

[0134] Some embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. The following embodiments and features thereof may be combined with one another unless they conflict with each other. Furthermore, the sequence of steps in the following method embodiments is provided for illustrative purposes only and is not intended to be a strict limitation.

[0135] FIG3 is a flow chart of an information processing method based on a memory mechanism provided by an embodiment of the present disclosure. The method in this embodiment can be implemented on any device with data processing capabilities, for example, on the cloud, locally deployed, on a client, or on an IOT (Internet of Things) device. As shown in FIG3 , the method may include:

[0136] Step 301: Obtain the to-be-processed information corresponding to the target user.

[0137] The method provided in this embodiment is used to interact with a specific user, which is referred to as a target user. The information to be processed may be information input by the target user, or other information corresponding to the target user. The information to be processed is processed to obtain a corresponding processing result.

[0138] In one example, in a personalized chat scenario, the target user may be a user having a conversation with the chat robot, the information to be processed may be the user's input information, and the corresponding processing result may be reply information to the input information.

[0139] In another example, in an intelligent customer service scenario, the target user may be a user who is in conversation with the intelligent customer service, the information to be processed may be a question input by the user, and the corresponding processing result may be an answer to the question.

[0140] In another example, in a smart recommendation scenario, the target user may be a user of an e-commerce platform. When the target user opens the homepage of the e-commerce platform, the portrait information of the target user can be used as the information to be processed, and the information to be processed can be processed to obtain recommended information for the target user and displayed on the homepage.

[0141] Artificial intelligence technology involves the simulation of human intelligence. In the above scenarios or other scenarios involving user interaction, combined with memory mechanisms, it can better simulate real-world interactions and more accurately respond to or recommend to target users. In this embodiment, there are no restrictions on the target user or the specific content of the information to be processed.

[0142] Optionally, the information to be processed may be information in any one modality of text, image, voice, or video, or may be a combination of at least two modalities of information.

[0143] Step 302: Search the memory bank corresponding to the target user for knowledge related to the information to be processed, and use the searched knowledge to obtain a processing result corresponding to the information to be processed; the memory bank includes a long-term memory bank and a short-term memory bank.

[0144] Alternatively, the search can be performed by extracting and comparing feature vectors. Specifically, the feature vector corresponding to the information to be processed can be extracted and compared with the feature vectors of each piece of knowledge in the memory library. If the feature vector of a piece of knowledge meets the required similarity with the feature vector of the information to be processed, the knowledge can be considered relevant to the information to be processed.

[0145] Alternatively, the relevance of the knowledge to the information to be processed may be determined by keyword matching, semantic similarity, etc. Alternatively, the information to be processed and the knowledge may be input into a relevance determination model to determine whether the two are relevant.

[0146] After searching for knowledge related to the information to be processed, the searched knowledge can be used to obtain a processing result. For example, the knowledge and the information to be processed can be input into the target model to obtain the corresponding processing result.

[0147] The target model may be a pre-trained model or a pre-trained and personalized fine-tuned model.

[0148] Alternatively, the information to be processed and the knowledge can be directly concatenated and then input into the target model, or prompt information can be added. For example, the information to be processed, the knowledge, and the prompt information can be input into the target model, and the prompt information is used to prompt the target model to respond to the information to be processed based on its memory of the target user (i.e., the searched knowledge).

[0149] The memory bank includes a long-term memory bank and a short-term memory bank, which are used to store long-term memory and short-term memory of target users respectively.

[0150] Optionally, when using knowledge to obtain a processing result, it is also possible to distinguish between long and short memories. Specifically, using the searched knowledge to obtain a processing result corresponding to the information to be processed may include:

[0151] The information to be processed, at least one piece of knowledge searched, and prompt information are input into the target model to obtain corresponding processing results; wherein, the prompt information is used to indicate the type of each piece of knowledge in the at least one piece of knowledge, and the type includes long-term memory and short-term memory.

[0152] For example, the information to be processed is "What should I eat tonight? Any recommendations?" The knowledge retrieved from the long-term memory is "I like spicy food," and the knowledge retrieved from the short-term memory is "I've recently had a sore throat." Both are related to the information to be processed and are therefore fed into the target model for processing. During processing, long and short memories can be distinguished. For example, the target model can be prompted with the following information: the target user's long-term memory is "I like spicy food," while the target user's short-term memory is "I've recently had a sore throat." This allows the target model to recommend restaurants and dishes based on the target user's long-term and short-term memories.

[0153] When processing the information to be processed and the long and short memories searched, the long and short memories can be distinguished through prompts, which makes it easier for the target model to simulate the memory mechanism of the real world, process the long and short memories in a targeted manner, and obtain processing results that are more in line with actual needs.

[0154] Step 303: If the knowledge used is the knowledge in the short-term memory library, the usage behavior of the knowledge is recorded; wherein, the short-term memory library is used to temporarily store knowledge related to the target user, and when the usage behavior corresponding to any knowledge in the short-term memory library meets the preset conditions, the knowledge meeting the preset conditions is stored in the long-term memory library.

[0155] Figure 4 is a schematic diagram of the addition, conversion and forgetting of memory provided by an embodiment of the present disclosure. As shown in Figure 4, both the short-term memory bank and the long-term memory bank are used to store knowledge (memory), but the storage mechanisms are different. External knowledge is usually added to the short-term memory bank. Each time the knowledge (short-term memory) stored in the short-term memory bank is used (accessed), the impression is deepened, and when the usage behavior meets certain conditions, it is converted into long-term memory. Therefore, after each time the knowledge in the short-term memory bank is used to process the information to be processed, the usage behavior of the knowledge can be recorded and stored in the long-term memory bank when the usage behavior meets the preset conditions.

[0156] In addition, the knowledge in the long-term memory bank (long-term memory) will not be forgotten, while the knowledge in the short-term memory bank will be forgotten. Therefore, in this embodiment, the short-term memory bank is used to temporarily store knowledge, where temporary storage means that it will be deleted or replaced after being stored for a period of time.

[0157] Corresponding to the above principle, the memory bank in this embodiment provides at least two functions: long-short memory conversion and short-term memory temporary storage. The implementation method of long-short memory conversion is first described below.

[0158] In an optional implementation, recording the usage behavior may include recording the number of times the knowledge is used. Specifically, if the knowledge used is knowledge in the short-term memory bank, recording the usage behavior of the knowledge includes: if the knowledge used is knowledge in the short-term memory bank, increasing the number of times the knowledge is used by one.

[0159] Correspondingly, when the usage behavior corresponding to any knowledge in the short-term memory library meets the preset conditions, the knowledge that meets the preset conditions will be stored in the long-term memory library, including: when the number of uses corresponding to any knowledge in the short-term memory library reaches a usage threshold, the knowledge that reaches the usage threshold will be stored in the long-term memory library.

[0160] In another optional implementation, recording the usage behavior may include recording the usage time, for example, the knowledge was used at a certain time and minute on a certain date and time. Based on the multiple recorded usage times, it can be determined whether to convert the short-term memory into the long-term memory.

[0161] Specifically, multiple recorded usage times can be compared with preset rules. If the preset rules are met, they are considered to be eligible for long-term memory. For example, the preset rules can include the interval size that should be met between two consecutive usage times. Optionally, the interval between the (i+1)th usage time and the previous usage time can be greater than the interval between the (i)th usage time and the previous usage time, thereby more in line with the actual memory mechanism.

[0162] In another alternative implementation, both the number of uses and the duration of use can be recorded simultaneously, and the decision to convert the information into long-term memory can be made based on these two factors. Alternatively, the information can be compared with pre-set rules, or the knowledge, number of uses, and duration of use can be input into a large model, which can then determine whether the information can be converted into long-term memory.

[0163] By recording the number of times it is used and making judgments based on the number of times it is used, short-term memory can be accurately and conveniently converted into long-term memory, effectively simulating the long-short memory mechanism in the real world, so that the memory bank can store knowledge more accurately and meet the user's needs for the use of the memory bank during interaction.

[0164] Optionally, after storing the knowledge in the long-term memory, the knowledge can be deleted from the short-term memory. In this way, the same knowledge only exists in one place in the short-term memory and the long-term memory, which can reduce storage space usage and avoid duplication during search operations, thereby improving the search processing effect.

[0165] In addition to the conversion of long-term and short-term memories, this embodiment also provides a mechanism for temporarily storing short-term memories. Specifically, if the knowledge in the short-term memory bank is not converted into long-term memory, it will be forgotten after a period of time.

[0166] In an optional implementation, the short-term memory library is used to store a preset amount of knowledge, and the knowledge is sorted according to the time of addition to the short-term memory library; the method also includes: obtaining knowledge generated for the target user to be added to the short-term memory library; adding the obtained knowledge to the short-term memory library, and deleting part of the knowledge in the short-term memory library in sequence to maintain the amount of knowledge in the short-term memory library at a preset amount.

[0167] The knowledge to be added to the short-term memory bank may be obtained by the method shown in FIG2 or by other means. For example, an interactive interface may be provided to allow the target user to actively add knowledge to the short-term memory bank through the interactive interface.

[0168] The knowledge added to the short-term memory bank can record the time of addition, or the knowledge can be stored in order according to the time of addition. The amount of knowledge stored in the short-term memory bank is limited. When new knowledge comes in, the old knowledge will be deleted. When deleting, the knowledge that is ranked first can be deleted according to the order, that is, one or more knowledge with the earliest addition time, so that the knowledge in the short-term memory bank is maintained at a preset amount.

[0169] For example, the short-term memory is used to store N pieces of knowledge. When new knowledge is to be added, if the total number of pieces of knowledge in the current short-term memory and the number of pieces of knowledge to be added is less than or equal to N, the addition operation is performed directly. If the total number of pieces of knowledge in the current short-term memory and the number of pieces of knowledge to be added is greater than N, the oldest M pieces of knowledge in the short-term memory are deleted and the new pieces of knowledge to be added are added to the short-term memory. M is the difference between the total number and N.

[0170] In another optional implementation, when knowledge is added to the short-term memory bank, the adding time may be recorded. If it is determined based on the adding time that the length of time the knowledge has stayed in the short-term memory bank has exceeded a preset length of time, the knowledge may be deleted.

[0171] For example, it can be set that knowledge in the short-term memory bank will be forgotten after K days. After a piece of knowledge is added to the short-term memory bank, if it is frequently used within K days, it may be converted into long-term memory and added to the long-term memory bank. If the knowledge is rarely or not used within K days, it will be forgotten and deleted from the short-term memory bank.

[0172] In another optional implementation scheme, the recorded usage behavior of the knowledge includes the number of times the knowledge is used and / or the usage time; the method also includes: if the number of times and / or the usage time corresponding to any knowledge in the short-term memory library meets the forgetting condition, the knowledge that meets the forgetting condition will be deleted from the short-term memory library.

[0173] Specifically, the forgetting condition can be set according to actual needs. For example, knowledge is forgotten the fastest right after being stored in the short-term memory bank. If it is not used for more than 1 day, it may be forgotten. If the knowledge is used once or more soon after being stored in the short-term memory bank, the forgetting time will increase accordingly, and it may not be forgotten until it is not used for more than 3 days. The forgetting conditions can be pre-stored in a table, and the table can be looked up to determine whether the current knowledge should be forgotten. Alternatively, a large model can be used to determine whether the forgetting conditions are met. Among them, when setting the forgetting conditions, the forgetting conditions can be set only according to the number of uses, or only according to the usage time, or according to both the number of uses and the usage time.

[0174] The above implementation scheme enables forgetting of short-term memory, which is consistent with the short-term memory mechanism in the real world. Furthermore, knowledge in the short-term memory library can be deleted based on the time it was added, ensuring that previously stored knowledge is forgotten first and that old knowledge is forgotten as new knowledge arrives, thus improving the accuracy of short-term memory storage. Alternatively, whether knowledge has been forgotten can be determined based on the number of times it has been used and / or the time it has been used, which can more accurately simulate the actual memory forgetting mechanism and improve the effectiveness of user interaction based on the memory library.

[0175] The information processing method based on the memory mechanism provided in this embodiment can obtain the information to be processed corresponding to the target user, search for knowledge related to the information to be processed in the memory library corresponding to the target user, and use the searched knowledge to obtain the processing result corresponding to the information to be processed. The memory library includes a long-term memory library and a short-term memory library. If the knowledge used is the knowledge in the short-term memory library, the usage behavior for the knowledge is recorded, wherein the short-term memory library is used to temporarily store the knowledge related to the target user, and when the usage behavior corresponding to any knowledge in the short-term memory library meets the preset conditions, the knowledge that meets the preset conditions is stored in the long-term memory library, which can realize hierarchical storage of memory, thereby simulating the memory mechanism of the real world, and processing the information to be processed of the target user according to the remembered knowledge, so that the processing result is more in line with the needs of the user, improving the effect of interaction with the user, and enhancing the user experience.

[0176] The memory generation scheme provided by the embodiment of the present disclosure is described in detail below. FIG5 is a flow chart of a memory generation method provided by the embodiment of the present disclosure. As shown in FIG5 , the memory generation process may include:

[0177] Step 501: Obtain at least one historical behavior information corresponding to the target user, and extract at least one knowledge from the historical behavior information.

[0178] The knowledge may refer to useful information learned through the historical behavior information of the target user. When certain conditions are met, the learned knowledge is stored as memory, which is the memory generation process.

[0179] Alternatively, memory generation can be performed first, followed by memory use. Therefore, this step can be performed before searching the memory library corresponding to the target user for knowledge related to the information to be processed, as mentioned in the aforementioned embodiment. Alternatively, the two steps can be performed alternately.

[0180] The historical behavior information may be any information related to the target user, including but not limited to conversations, browsing, comments, etc. For example, the historical conversations of the target user may be obtained, and relevant knowledge may be extracted from the historical conversations.

[0181] When extracting knowledge from historical behavior information, the historical behavior information can be input into the large model, which generates corresponding knowledge based on the historical behavior information. Optionally, instruction information can also be input at the same time, which is used to instruct the large model to extract knowledge from the historical behavior information.

[0182] Optionally, to improve the effectiveness of knowledge extraction, the category of knowledge to be extracted can be indicated in the instruction information. Specifically, obtaining at least one piece of historical behavior information corresponding to the target user and extracting at least one piece of knowledge from the historical behavior information includes: determining the category of knowledge to be extracted; inputting any piece of historical behavior information and instruction information into the macro model to obtain at least one piece of knowledge extracted by the macro model from the historical behavior information; wherein the instruction information is used to instruct the macro model to extract the knowledge of the category from the historical behavior information.

[0183] The categories can be set according to actual needs.

[0184] For example, the categories may include common sense knowledge and personalized knowledge. Common sense knowledge may be applicable to most users, such as "a certain drug is used to treat a certain disease," while personalized knowledge may be specific to the target user, such as "the target user likes spicy food."

[0185] Different types of knowledge can correspond to different prompts. For example, the prompt for common sense knowledge might be "This is a conversation between users: ...; Please analyze which information is worth learning?", while the prompt for personalized knowledge might be "This is a conversation between users: ...; Please analyze which information is relevant to the user?"

[0186] In this way, common sense knowledge and personalized knowledge can be extracted through the large model. Both common sense knowledge and personalized knowledge can subsequently be stored in the memory bank as short-term memory. Optionally, common sense knowledge and personalized knowledge can also be distinguished in the memory bank. Common sense knowledge can be shared by different users. In other words, common sense knowledge can be set up so that after being used multiple times by one user or by multiple users, as long as the total usage behavior meets preset conditions, it can be converted into long-term memory. Personalized knowledge is designed for each user individually and is not shared.

[0187] Through the above settings, the following situations in the real world can be simulated: humans can remember multiple users separately, common sense knowledge can be continuously deepened in memory as it is used in the process of interacting with multiple users, and personalized knowledge can also be retained for different users, so that the memory mechanism provided by the embodiment of the present disclosure is more in line with actual needs and improves the accuracy of memory.

[0188] Alternatively, the categories can also be divided in other ways. For example, the categories may include: food, clothing, medical, emotions, etc. The categories can be matched with the application scenarios. For example, when applying the embodiments of the present disclosure to the intelligent customer service of a restaurant app, it can mainly record knowledge related to food.

[0189] Optionally, the categories of knowledge to be extracted can also be manually configured. Specifically, multiple candidate categories can be displayed through an interactive interface; wherein the multiple candidate categories are categories of extractable knowledge; a target category selected by a target user or configuration personnel from the multiple candidate categories is obtained, and the knowledge corresponding to the target category is extracted from the historical behavior information corresponding to the target user.

[0190] The configuration personnel may be a user for configuring the memory generation strategy, for example, a backend service personnel.

[0191] Figure 6 is a schematic diagram of an interactive interface for memory generation provided by an embodiment of the present disclosure. As shown in Figure 6, the interactive interface can display which categories of knowledge are available for the target user or configuration personnel to select, such as food, clothing, medical care, and emotions. The selection permissions of the target user and the configuration personnel can be the same or different.

[0192] The target user or configuration personnel can select the knowledge category they wish to extract from the displayed list. For example, in a personalized chat scenario, if the target user prefers the large model to remember emotional content, they can select emotion as the target category to meet the user's emotional communication needs.

[0193] Different indication information can be set in advance for different categories. After obtaining the target category, the historical behavior information of the target user and the indication information corresponding to the target category are input into the big model so that the big model can extract the knowledge corresponding to the target category from the historical behavior information.

[0194] By inputting instructions, the large model can extract relevant categories of knowledge to meet the actual usage needs of different application scenarios. In addition, the target user or configuration personnel can also configure the knowledge categories to be extracted during the memory generation process, improving the user experience.

[0195] Step 502: If any of the extracted knowledge meets the memory condition, the knowledge meeting the memory condition is stored in the memory library.

[0196] Generally, the extracted knowledge will be stored in the short-term memory bank when the memory conditions are met. In rare cases, the knowledge may be directly stored in the long-term memory bank. Therefore, in this embodiment, the memory conditions can be divided into short-term memory conditions and long-term memory conditions. The short-term memory conditions will be explained first.

[0197] Optionally, if any of the extracted knowledge meets the memory condition, the knowledge meeting the memory condition will be stored in the memory library, including: for any one of the at least one pieces of knowledge to be processed, if there is knowledge matching the knowledge to be processed in the cache library corresponding to the target user, then the number of occurrences of the matching knowledge is updated; if the number of occurrences of any knowledge in the cache library meets the short-term memory condition, then the knowledge meeting the short-term memory condition will be stored in the short-term memory library corresponding to the target user.

[0198] Among them, if a certain knowledge has been extracted (learned) multiple times in the recent past, it can be stored in the short-term memory library as short-term memory. In this embodiment, a corresponding cache library is designed, wherein the cache library can be a storage space for caching the knowledge extracted by the large model. For each piece of historical behavior information, one or more pieces of knowledge extracted from it will be temporarily stored in the cache library. After each piece of historical behavior information is extracted, the cache library will be refreshed once. In addition, the cache library is only used to cache knowledge. Direct acquisition of knowledge from the cache library is not supported during memory use.

[0199] The knowledge stored in the cache will record the number of times it appears. If the same knowledge appears in multiple historical behavior information, the short-term memory condition is met and the knowledge will be stored in the short-term memory library.

[0200] Optionally, when a piece of knowledge is to be stored in the cache, it can first be determined whether there is already matching knowledge in the cache. Matching can mean that the substantive content is identical or related. Semantic similarity can be used to determine whether two pieces of knowledge are matching. Alternatively, a large model can be used to determine whether two pieces of knowledge are matching.

[0201] For example, for any unprocessed knowledge extracted from historical behavior information, the existing knowledge in the cache library can be traversed. For each piece of knowledge traversed, the knowledge and the unprocessed knowledge can be input into the big model, and the big model can determine whether the two pieces of knowledge are matching knowledge. If they are, the number of occurrences of the currently traversed knowledge can be increased by one.

[0202] Optionally, if there is no knowledge matching the knowledge to be processed in the cache library corresponding to the target user, the knowledge to be processed is stored in the cache library, and the number of occurrences is set to one.

[0203] By using the above method, the number of occurrences of knowledge can be counted. There are many ways to determine whether the number of occurrences meets the short-term memory condition.

[0204] In an optional implementation, if the number of occurrences of any knowledge in the cache library meets the short-term memory condition, the knowledge meeting the short-term memory condition will be stored in the short-term memory library corresponding to the target user, which may include: if the number of occurrences of any knowledge in the cache library reaches an occurrence threshold, the knowledge reaching the occurrence threshold will be stored in the short-term memory library corresponding to the target user.

[0205] The number threshold can be set according to actual needs. Directly judging whether the knowledge is suitable for short-term memory based on the number threshold can quickly and accurately improve processing efficiency.

[0206] In an optional implementation, if the number of occurrences of any knowledge in the cache library meets the short-term memory condition, the knowledge meeting the short-term memory condition is stored in the short-term memory library corresponding to the target user, which may include: for any knowledge in the cache library, inputting the knowledge and the number of occurrences of the knowledge into the big model to determine whether the knowledge meets the short-term memory condition through the big model; if so, storing the knowledge in the short-term memory library corresponding to the target user.

[0207] Specifically, the knowledge, its occurrence count, and prompt information can be input into the macro model. The prompt information is used to instruct the macro model to determine whether the knowledge is suitable for short-term memory based on the knowledge and its occurrence count. If the macro model determines that the knowledge is suitable for short-term memory, the knowledge can be stored in the short-term memory bank.

[0208] In practical applications, different pieces of knowledge may become short-term memory under different conditions. For example, some pieces of knowledge may become short-term memory after appearing twice, while other pieces of knowledge may only become short-term memory after appearing more frequently. The large model can comprehensively determine whether knowledge should be included in short-term memory based on its content and the number of times it appears. This allows for personalized memorization of different pieces of knowledge and improves the accuracy of memory library construction.

[0209] In this embodiment, a cache library is introduced to cache the learned knowledge, and the number of occurrences of the knowledge in the cache library is counted. The number of occurrences is used to determine whether the knowledge should be stored in the short-term memory library as short-term memory, which can effectively realize the transformation of knowledge into short-term memory. Moreover, in actual applications, two pieces of knowledge with the same essential content may have different expressions. In this embodiment, the number of occurrences is counted by determining whether they belong to matching knowledge, which can effectively improve the accuracy of the transformation of knowledge into short-term memory and enhance the effect of the constructed memory library.

[0210] Optionally, in addition to learning knowledge from historical behavior information, the learned knowledge can also be summarized. Specifically, if the cache library corresponding to the target user contains knowledge that matches the knowledge to be processed, the method further includes: storing the knowledge to be processed in a preset storage space; accordingly, before storing the knowledge in the cache library in the short-term memory library, the method further includes: for any knowledge in the cache library, fusing the knowledge stored in the preset storage space that matches the knowledge to obtain the fused knowledge, and using the fused knowledge to replace the knowledge in the cache library.

[0211] FIG7 is a schematic diagram of the construction principle of a short-term memory library provided by an embodiment of the present disclosure. As shown in FIG7, after extracting knowledge from historical behavior information (such as a round of conversation), the knowledge can be compared with the existing knowledge in the cache library. For example, if the extracted knowledge A3 matches the existing knowledge A1 in the cache library, the number of occurrences of the knowledge A1 in the cache library can be increased by one, and at the same time, the extracted knowledge A3 can be temporarily stored in a preset storage space.

[0212] Before storing a piece of knowledge in the cache into the short-term memory, a fusion operation can be performed on that knowledge. This fusion operation involves fusing the knowledge with matching knowledge stored in the preset storage space. As shown in the figure, for knowledge A1 in the cache, if the number of occurrences of A1 meets the short-term memory condition, knowledge A1 can be fused with matching knowledge A2 and A3 stored in the preset storage space to obtain the fused knowledge A, which is then stored in the short-term memory.

[0213] Optionally, the fusion process may include: inputting the knowledge to be fused into the large model, so that the large model summarizes the input knowledge to obtain fused knowledge.

[0214] In this way, each time the knowledge extracted will be stored in the cache library or the preset storage space. When the knowledge in the cache library needs to be stored in the short-term memory library, the knowledge in the cache library can be summarized according to the matching knowledge in the preset storage space to enrich the semantics of the knowledge stored in the short-term memory library and improve the quality of the short-term memory library.

[0215] In practical applications, historical behavior information can be acquired in real time, or acquired and processed at regular intervals. For example, acquiring at least one piece of historical behavior information corresponding to the target user can include acquiring at least one piece of historical behavior information for the target user within a preset period at intervals. Accordingly, the method further includes: after storing the knowledge in the cache library that meets the memory conditions in the memory library, clearing the cache library.

[0216] Optionally, when initially building the memory library, multiple historical behavior information of the target user can be obtained, and the knowledge contained in the multiple historical behavior information can be learned based on the cache library to obtain corresponding short-term memory and store it in the short-term memory library, and then the cache library can be cleared.

[0217] During subsequent use, historical behavior information within a preset period can be obtained every preset period, and knowledge can be learned based on the cache library with reference to the above method. After learning the historical behavior information within the preset period, it can be determined whether the existing knowledge in the cache library meets the short-term memory conditions. After storing the knowledge that meets the short-term memory conditions in the short-term memory library, the cache library can be cleared to facilitate the next learning.

[0218] Through the above method, the historical behavior information of the target user can be learned at regular time intervals, and the cache library and short-term memory library can be updated in a timely manner to achieve regular updates of the short-term memory and improve the effect of using the short-term memory library.

[0219] The above describes a method for storing the extracted knowledge in a short-term memory bank. Optionally, in this embodiment, the extracted knowledge can be directly stored in a long-term memory bank in certain circumstances.

[0220] Specifically, if the extracted knowledge is important, even if it only appears once, it can be stored as long-term memory. For example, "diabetes" and "scalds" often leave a deep impression when they first appear in real applications. This knowledge is also very important in subsequent user interactions, so it is stored as long-term memory.

[0221] Correspondingly, if any extracted knowledge meets the memory conditions, the knowledge meeting the memory conditions will be stored in the memory library, which may include: if any extracted knowledge matches the knowledge in the preset knowledge library, or, if the large model is used to determine that the knowledge meets the long-term memory conditions, then the knowledge will be stored in the long-term memory library.

[0222] The preset knowledge base can be used to store important knowledge, which can be manually configured or obtained by the model through learning and analysis. If the knowledge extracted based on historical behavior information matches the knowledge in the preset knowledge base, for example, if the preset knowledge base contains "diabetes" and the extracted knowledge is "the user has diabetes", this knowledge can be directly stored in the long-term memory as long-term memory.

[0223] Alternatively, the big model can be used to determine whether the knowledge extracted from historical behavior information meets the long-term memory conditions. For example, the extracted knowledge can be input into the big model and asked whether the knowledge is important knowledge, or whether the knowledge is suitable for long-term memory. If the big model's judgment result is yes, the knowledge is stored in the long-term memory library, thereby utilizing the rich capabilities of the big model to assist in the realization of long-term memory judgment.

[0224] In summary, by using a preset knowledge base or a large model to determine whether the knowledge extracted from historical behavior information is important knowledge, if it is important knowledge, it can be directly stored in the long-term memory library as long-term memory, so that important knowledge can be deeply remembered once it appears, avoiding the forgetting of important knowledge and improving the effect of interaction with users.

[0225] The memory generation method provided in this embodiment can obtain at least one historical behavior information corresponding to the target user and extract at least one knowledge from the historical behavior information. If any extracted knowledge meets the memory condition, the knowledge meeting the memory condition is stored in the memory bank. Therefore, when the target user's to-be-processed information is obtained, the knowledge related to the to-be-processed information can be searched from the memory bank corresponding to the target user and processed, thereby realizing the construction of the target user's memory bank based on the target user's historical behavior information, meeting the target user's actual interaction needs, and improving the user experience.

[0226] In other optional implementations, the knowledge extracted from the target user's historical behavior information may be directly stored as short-term memory to improve the efficiency of building the short-term memory library.

[0227] Optionally, knowledge in the long-term memory repository is generally not forgotten. However, a deletion mechanism can be set up to allow long-term memory to be deleted under certain circumstances or by the target user.

[0228] The personalized fine-tuning solution provided by the embodiment of the present disclosure is described in detail below. FIG8 is a flow chart of a personalized fine-tuning method provided by the embodiment of the present disclosure. As shown in FIG8, the personalized fine-tuning process may include:

[0229] Step 801: Based on the pre-trained large model, construct a target model corresponding to the target user, wherein the target model includes the large model and a bypass model.

[0230] Step 802: Train the target model based on multiple historical behavior information of the target user, wherein during the training process, the parameters of the large model are frozen and only the parameters of the bypass model are updated.

[0231] The target model is used to obtain a processing result corresponding to the information to be processed based on the searched knowledge.

[0232] In practical applications, it's difficult to understand a user's personal conversation preferences by using a large model that's not trained but uses only commands. However, completely retraining the model would place enormous strain on computing resources. Therefore, this embodiment uses parameter-friendly PEFT technology to construct a target model for the target user using a pre-trained large model and a bypass model. Given multiple historical behavioral data points about the target user, the target model is primed to understand the target user's conversation preferences.

[0233] Optionally, the bypass model can be any model with learning capabilities. The bypass model and the large model can be set in parallel. The input information enters the bypass model and the large model for processing respectively. The processing results of the bypass model are fused with the processing results of the large model to obtain the output of the target model.

[0234] Optionally, the bypass model has multiple implementation schemes, which are not limited in this embodiment. For example, it can be implemented using LoRA technology. Specifically, the bypass model can include matrix A and matrix B. Matrix A and matrix B can be initialized using a preset strategy. During training, the parameters of the large model are fixed, and only matrix A and matrix B are trained.

[0235] Optionally, during the training of each batch, the user's historical behavior information, such as conversations, can be input into the target model and trained using CLM.

[0236] The personalized fine-tuning method provided in this embodiment freezes most of the parameters in the target model during training, and a small number of parameters are learned and updated based on the historical behavior information of the target user, thereby achieving efficient training. After the historical behavior information of the target user is learned, the target model can be used to provide a more accurate and user-aware interaction method to meet the personalized needs of different users.

[0237] Optionally, training the target model based on the historical behavior information of the target user may include: determining the behavior style corresponding to each historical behavior information of the target user; inputting the historical behavior information and the behavior style into the target model, and updating the parameters of the target model based on the output of the target model.

[0238] The behavior style may be used to represent a style corresponding to the user behavior. For example, when the historical behavior information of the target user is a conversation, the corresponding style may be a conversation style, such as concise, detailed, polite, and the like.

[0239] Based on historical behavior information, the corresponding behavior style can be determined. The behavior style can be obtained through manual annotation, model analysis, and other methods. After obtaining the behavior style corresponding to the historical behavior information, when training the target model, the historical behavior information and the behavior style can be input into the target model together to learn the target user's conversation style through self-supervised training.

[0240] For example, the information input into the target model may be “This is a conversation of a user: ...; the style of this conversation is polite.”

[0241] By explicitly informing the target model of the style of the target user's historical behavior information, after multiple rounds of learning historical behavior information, the target model will be able to distinguish styles based on historical behavior information. Moreover, when processing the information to be processed subsequently, the target model will pay more attention to the style in the information to be processed, so that it can use the corresponding style to interact with the target user, thereby improving the target user's interactive experience.

[0242] Optionally, before training the target model, the method further includes: displaying multiple candidate behavioral styles through an interactive interface, obtaining a behavioral style selected by the target user or configuration personnel from the multiple candidate behavioral styles; and initializing the parameters of the bypass model according to the selected behavioral style.

[0243] Figure 9 is a schematic diagram of a personalized fine-tuning interactive interface provided by an embodiment of the present disclosure. As shown in Figure 9, the interactive interface can display multiple candidate behavioral styles, such as concise, detailed, and polite, allowing the target user or configuration personnel to select the desired behavioral style from the multiple candidate behavioral styles.

[0244] Different behavioral styles can correspond to different initialization parameters, which can be obtained through pre-training. The bypass model is initialized with the corresponding parameters, and the target model is trained based on this initialization. For example, concise, detailed, and polite styles each correspond to different initialization parameters. When the target user or configuration personnel desires to interact in a polite style, the initialization parameters corresponding to the polite style can be obtained and used to initialize the bypass model.

[0245] In actual applications, target users can set their desired behavioral styles through the interactive interface, or configuration personnel such as back-end service personnel can also uniformly configure behavioral styles for users using this platform, and initialize the parameters of the target model according to the selected behavioral style. This allows the model to further utilize the historical behavioral information of the target user for fine-tuning on the basis of having the ability to have the corresponding behavioral style, which can effectively improve the training effect.

[0246] In addition to the above functions, the target user or configuration personnel can also adjust other training strategies of the target model through the interactive interface, including but not limited to: model input, model output, model structure, model training process, etc.

[0247] For example, regarding model input, users can adjust the input format and modality, and add, modify, or filter historical behavior information. Regarding model output, users can adjust output strategies, etc. Regarding model structure, users can adjust the model's specific structure and parameter counts, adding, reducing, or modifying one or more modules within the model. Regarding the model training process, users can plan the model's training phases, loss function, and training stop conditions.

[0248] Optionally, relevant information to assist the user in making a selection can be displayed on the interface, such as the various available options or the detailed content of each available option. Furthermore, various dynamic information during the model training process can be displayed to the user, such as intermediate results of model training, to facilitate timely updates to the strategy.

[0249] In actual applications, the three stages provided by the embodiments of the present disclosure can be continuously executed. For example, for a certain target user, when the target user's to-be-processed information, such as a question, is obtained, the memory use operation of stage three can be executed according to the question, and relevant knowledge can be searched according to the question and answered based on the target model, and the question and answer can be saved as historical behavior information. At regular intervals, the personalized fine-tuning operation of stage two can be executed based on the historical behavior information during this period, so that the target model learns the latest personalized preferences of the target user. The memory generation operation of stage one can be executed at regular intervals, or memory generation can be executed in real time based on the target user's questions and answers. In this way, by continuously executing memory generation, personalized fine-tuning and memory use operations, different memory libraries and target models can be maintained for different users and updated in a timely manner, thereby improving the accuracy of the memory library and target model.

[0250] In summary, the embodiments of the present disclosure provide a DPeM mechanism that can effectively process and hierarchically store information, as well as a MaLP framework based on human memory strategies, and use them for personalized training of target models and improvement of general task capabilities. The memory mechanism and PEFT are effectively combined, so that user personalized preferences can be learned accurately and efficiently, while also improving the interaction quality of the target model.

[0251] Corresponding to the aforementioned stage 1, the embodiment of the present disclosure further provides an information processing method based on a memory mechanism, including:

[0252] Acquire historical behavior information corresponding to a target user, and extract at least one piece of knowledge from the historical behavior information;

[0253] For any extracted knowledge, if there is matching knowledge in the cache library corresponding to the target user, the number of occurrences of the knowledge is updated;

[0254] According to the number of occurrences of the knowledge in the cache library, determine whether to store the knowledge in the memory library corresponding to the target user, so that when the information to be processed corresponding to the target user is obtained, the information to be processed is processed according to the knowledge in the memory library.

[0255] The specific implementation principles and processes of the information processing method provided in this embodiment can be found in the aforementioned embodiments and will not be repeated here.

[0256] In practical applications, the above information processing method can be used to generate memory to improve the efficiency and accuracy of memory library construction. After obtaining the memory library, the memory library can be used to process the target user's pending information, improve the effect of interaction with the target user, and enhance the user experience.

[0257] The solution provided by the embodiments of the present disclosure can be applied to a variety of scenarios. In intelligent customer service scenarios or personalized chat scenarios, the embodiments of the present disclosure provide an intelligent dialogue method based on a memory mechanism, including:

[0258] Get the input information of the target user;

[0259] Searching for knowledge related to the input information in a memory bank corresponding to the target user; wherein the memory bank includes a long-term memory bank and a short-term memory bank;

[0260] Generate reply information for the target user using the searched knowledge and the input information;

[0261] If the knowledge used is the knowledge in the short-term memory bank, then the use behavior of the knowledge is recorded;

[0262] The short-term memory library is used to temporarily store knowledge related to the target user, and when the usage behavior corresponding to any knowledge in the short-term memory library meets the preset conditions, the knowledge meeting the preset conditions is stored in the long-term memory library.

[0263] In the intelligent dialogue method provided in this embodiment, input information can be used as information to be processed, and reply information can be used as the processing result. The specific implementation principles and processes can be referred to in the aforementioned embodiments and will not be repeated here. In intelligent customer service scenarios or personalized chat scenarios, the short-term memory bank and the long-term memory bank can be used to process the input information of the target user, and the short-term memory bank and the long-term memory bank can be continuously updated to improve the accuracy of the memory bank, so that the generated reply information is more in line with the actual needs of the target user, thereby improving the user experience.

[0264] In intelligent customer service scenarios or personalized chat scenarios, the present disclosure also provides a knowledge construction method based on a memory mechanism, including:

[0265] Obtaining historical conversation information corresponding to a target user, and extracting at least one piece of knowledge from the historical conversation information;

[0266] For any extracted knowledge, if there is matching knowledge in the cache library corresponding to the target user, the number of occurrences of the knowledge is updated;

[0267] According to the number of occurrences of the knowledge in the cache library, determine whether to store the knowledge in the memory library corresponding to the target user, so that when the input information corresponding to the target user is obtained, the reply information corresponding to the input information can be obtained according to the knowledge in the memory library.

[0268] In the knowledge construction method provided in this embodiment, historical conversation information can be used as historical behavior information, input information can be used as information to be processed, and reply information can be used as processing results. The specific implementation principles and processes can be found in the previous embodiments and will not be repeated here. In intelligent customer service scenarios or personalized chat scenarios, knowledge can be extracted based on the target user's historical conversations. When certain conditions are met, this knowledge can be stored as memory in a memory bank. This allows the user to engage in conversations based on the knowledge in the memory bank, improving the accuracy of the constructed memory bank and enhancing the interaction effect with the target user.

[0269] Corresponding to the above method, on the one hand, an embodiment of the present disclosure provides an information processing device based on a memory mechanism, comprising:

[0270] The acquisition module is used to obtain the pending information corresponding to the target user;

[0271] a processing module, configured to search for knowledge related to the information to be processed in a memory bank corresponding to the target user, and obtain a processing result corresponding to the information to be processed using the searched knowledge; the memory bank includes a long-term memory bank and a short-term memory bank;

[0272] a recording module, configured to record usage behavior of the knowledge when the knowledge being used is the knowledge in the short-term memory bank;

[0273] The short-term memory library is used to temporarily store knowledge related to the target user, and when the usage behavior corresponding to any knowledge in the short-term memory library meets the preset conditions, the knowledge meeting the preset conditions is stored in the long-term memory library.

[0274] On the other hand, an embodiment of the present disclosure further provides an information processing device based on a memory mechanism, comprising:

[0275] an acquisition module, configured to acquire historical behavior information corresponding to a target user and extract at least one piece of knowledge from the historical behavior information;

[0276] An updating module, configured to update the occurrence count of any extracted knowledge if matching knowledge exists in the cache library corresponding to the target user;

[0277] A determination module is used to determine whether to store the knowledge in the memory library corresponding to the target user based on the number of occurrences of the knowledge in the cache library, so that when the information to be processed corresponding to the target user is obtained, the information to be processed is processed according to the knowledge in the memory library.

[0278] On the other hand, the present disclosure also provides an intelligent dialogue device based on a memory mechanism, including:

[0279] The acquisition module is used to obtain the input information of the target user;

[0280] A search module, configured to search for knowledge related to the input information in a memory bank corresponding to the target user; wherein the memory bank includes a long-term memory bank and a short-term memory bank;

[0281] A generation module, configured to generate reply information for the target user using the searched knowledge and the input information;

[0282] a recording module, configured to record usage behavior of the knowledge when the knowledge being used is the knowledge in the short-term memory bank;

[0283] The short-term memory library is used to temporarily store knowledge related to the target user, and when the usage behavior corresponding to any knowledge in the short-term memory library meets the preset conditions, the knowledge meeting the preset conditions is stored in the long-term memory library.

[0284] On the other hand, the present disclosure also provides a knowledge construction device based on a memory mechanism, including:

[0285] An acquisition module, configured to acquire historical conversation information corresponding to a target user and extract at least one piece of knowledge from the historical conversation information;

[0286] An updating module, configured to update the occurrence count of any extracted knowledge if matching knowledge exists in the cache library corresponding to the target user;

[0287] A determination module is used to determine whether to store the knowledge in the memory library corresponding to the target user based on the number of occurrences of the knowledge in the cache library, so that when the input information corresponding to the target user is obtained, the reply information corresponding to the input information is obtained based on the knowledge in the memory library.

[0288] The specific implementation principles and effects of the device provided by the embodiments of the present disclosure can be found in the aforementioned embodiments and will not be repeated here.

[0289] FIG10 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. As shown in FIG10 , the electronic device of this embodiment may include:

[0290] At least one processor 1001; and a memory 1002 communicatively connected to the at least one processor; wherein the memory 1002 stores instructions executable by the at least one processor 1001, and the instructions are executed by the at least one processor 1001 to cause the electronic device to perform the method as described in any of the above embodiments. Optionally, the memory 1002 can be independent or integrated with the processor 1001.

[0291] The implementation principle and technical effects of the electronic device provided in this embodiment can be found in the aforementioned embodiments and will not be described in detail here.

[0292] An embodiment of the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in any of the above embodiments is implemented.

[0293] An embodiment of the present disclosure further provides a computer program product, including a computer program, which implements the method described in any of the aforementioned embodiments when executed by a processor.

[0294] In the several embodiments provided in this disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical function division. In actual implementation, other division methods may be used. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not implemented.

[0295] The integrated modules implemented in the form of software function modules can be stored in a computer-readable storage medium. The software function modules stored in a storage medium include several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute some of the steps of the methods described in various embodiments of the present disclosure.

[0296] It should be understood that the above-mentioned processor can be a processing unit (Central Processing Unit, referred to as CPU), or it can be other general-purpose processors, digital signal processors (Digital Signal Processor, referred to as DSP), application-specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The memory may include high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and can also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.

[0297] The storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0298] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.

[0299] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0300] The serial numbers of the above-mentioned embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments.

[0301] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present disclosure.

[0302] The above are only preferred embodiments of the present disclosure and are not intended to limit the patent scope of the present disclosure. Any equivalent structure or equivalent process transformation made using the contents of the present disclosure and the drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present disclosure.

Claims

1. An information processing method based on a memory mechanism, wherein: include: Obtain the pending information corresponding to the target user; Searching for knowledge related to the information to be processed in the memory bank corresponding to the target user, so as to obtain a processing result corresponding to the information to be processed using the searched knowledge; the memory bank includes a long-term memory bank and a short-term memory bank; If the knowledge used is the knowledge in the short-term memory bank, then the use behavior of the knowledge is recorded; The short-term memory library is used to temporarily store knowledge related to the target user, and when a usage behavior corresponding to any knowledge in the short-term memory library meets a preset condition, the knowledge meeting the preset condition is stored in the long-term memory library.

2. The method according to claim 1, wherein: If the knowledge used is the knowledge in the short-term memory bank, the use behavior of the knowledge is recorded, including: If the knowledge used is the knowledge in the short-term memory bank, the number of times the knowledge is used is increased by one; Accordingly, when the usage behavior corresponding to any knowledge in the short-term memory library meets the preset conditions, the knowledge meeting the preset conditions is stored in the long-term memory library, including: When the usage count corresponding to any piece of knowledge in the short-term memory reaches a usage count threshold, the knowledge reaching the usage count threshold is stored in the long-term memory.

3. The method according to claim 1, wherein: The short-term memory is used to store a preset amount of knowledge, and the stored knowledge is sorted according to the time when it was added to the short-term memory; the method also includes: Acquire knowledge generated for the target user to be added to the short-term memory bank; The acquired knowledge is added to the short-term memory library, and part of the knowledge in the short-term memory library is deleted in sequence to maintain the amount of knowledge in the short-term memory library at a preset amount.

4. The method according to claim 1, wherein: The recorded usage behavior of the knowledge includes the number of times the knowledge is used and / or the usage time; the method further includes: If the usage times and / or usage time corresponding to any knowledge in the short-term memory bank meets the forgetting condition, the knowledge meeting the forgetting condition will be deleted from the short-term memory bank.

5. The method according to claim 1, wherein: Using the searched knowledge to obtain a processing result corresponding to the information to be processed includes: Inputting the information to be processed, the at least one piece of knowledge searched, and the prompt information into the target model to obtain a corresponding processing result; The prompt information is used to indicate the type of each piece of knowledge in the at least one piece of knowledge, and the type includes long-term memory and short-term memory.

6. The method according to any one of claims 1 to 5, wherein: Before searching the memory library corresponding to the target user for knowledge related to the information to be processed, the method further includes: Obtain at least one historical behavior information corresponding to the target user, and extract at least a knowledge; If any of the extracted knowledge meets the memory condition, the knowledge meeting the memory condition is stored in the memory library.

7. The method according to claim 6, wherein: If any of the extracted knowledge meets the memory condition, the knowledge meeting the memory condition is stored in the memory library, including: For any one of the at least one pieces of knowledge to be processed, if there is knowledge matching the knowledge to be processed in the cache library corresponding to the target user, updating the number of occurrences of the matching knowledge; If the number of occurrences of any knowledge in the cache library meets the short-term memory condition, the knowledge meeting the short-term memory condition is stored in the short-term memory library corresponding to the target user.

8. The method according to claim 7, wherein: Also includes: If there is no knowledge matching the knowledge to be processed in the cache library corresponding to the target user, the knowledge to be processed is stored in the cache library, and the number of occurrences is set to one.

9. The method according to claim 7, wherein: If the number of occurrences of any knowledge in the cache library meets the short-term memory condition, the knowledge meeting the short-term memory condition is stored in the short-term memory library corresponding to the target user, including: If the number of occurrences of any knowledge in the cache reaches a threshold number of occurrences, the knowledge reaching the threshold number of occurrences will be stored in the short-term memory library corresponding to the target user.

10. The method according to claim 7, wherein: If the number of occurrences of any knowledge in the cache library meets the short-term memory condition, the knowledge meeting the short-term memory condition is stored in the short-term memory library corresponding to the target user, including: For any knowledge in the cache library, the knowledge and the number of occurrences of the knowledge are input into the big model, so as to determine whether the knowledge meets the short-term memory condition through the big model; If satisfied, the knowledge is stored in the short-term memory bank corresponding to the target user.

11. The method according to claim 7, wherein: If there is knowledge matching the knowledge to be processed in the cache library corresponding to the target user, the method further includes: storing the knowledge to be processed in a preset storage space; Accordingly, before storing the knowledge in the cache library into the short-term memory library, the method further includes: For any knowledge in the cache library, the knowledge stored in the preset storage space and matching the knowledge is merged to obtain merged knowledge, and the merged knowledge is used to replace the knowledge in the cache library.

12. The method according to claim 7, wherein: Acquiring at least one historical behavior information corresponding to the target user, including: acquiring at least one historical behavior information of the target user within the preset period every preset period; The method further comprises: after storing the knowledge in the cache library that meets the memory condition into the memory library, clearing the cache library.

13. The method according to claim 6, wherein: If any of the extracted knowledge meets the memory condition, the knowledge meeting the memory condition is stored in the memory library, including: If any of the extracted knowledge matches the knowledge in the preset knowledge base, or if the large model determines that the knowledge meets the long-term memory conditions, the knowledge is stored in the long-term memory base.

14. The method according to claim 6, wherein: Acquiring at least one historical behavior information corresponding to the target user and extracting at least one knowledge from the historical behavior information, including: Determine the categories of knowledge to be extracted; Inputting any historical behavior information and indication information into the big model to obtain at least one knowledge extracted by the big model from the historical behavior information; The indication information is used to instruct the large model to extract the knowledge of the category from the historical behavior information.

15. The method according to claim 6, wherein: The method further comprises: Displaying multiple candidate categories through an interactive interface; wherein the multiple candidate categories are categories of extractable knowledge; The target category selected by the target user or the configuration personnel from the multiple candidate categories is obtained to extract knowledge corresponding to the target category from the historical behavior information corresponding to the target user.

16. The method according to any one of claims 1 to 5, wherein: Also includes: Based on the pre-trained large model, construct a target model corresponding to the target user, wherein the target model includes the large model and a bypass model; Training the target model according to the multiple historical behavior information of the target user, wherein during the training process, the parameters of the large model are frozen and only the parameters of the bypass model are updated; The target model is used to obtain a processing result corresponding to the information to be processed according to the searched knowledge.

17. The method according to claim 16, wherein: The target model is trained according to the historical behavior information of the target user, including: Determine the behavior style corresponding to each historical behavior information of the target user; The historical behavior information and the behavior style are input into the target model, and the parameters of the target model are updated according to the output of the target model.

18. The method according to claim 17, wherein: Before training the target model, the method further includes: Displaying multiple candidate behavior styles through an interactive interface, and obtaining a behavior style selected by a target user or a configuration person from the multiple candidate behavior styles; According to the selected behavior style, the parameters of the bypass model are initialized.

19. An information processing method based on a memory mechanism, wherein: include: Acquire historical behavior information corresponding to the target user, and extract at least one knowledge from the historical behavior information; For any extracted knowledge, if there is matching knowledge in the cache library corresponding to the target user, the number of occurrences of the knowledge is updated; According to the number of occurrences of the knowledge in the cache library, it is determined whether to store the knowledge in the memory library corresponding to the target user, so that when the information to be processed corresponding to the target user is obtained, the information to be processed is processed according to the knowledge in the memory library.

20. An intelligent dialogue method based on memory mechanism, wherein: include: Get the input information of the target user; Searching for knowledge related to the input information in a memory bank corresponding to the target user; wherein the memory bank includes a long-term memory bank and a short-term memory bank; Generate reply information for the target user using the searched knowledge and the input information; If the knowledge used is the knowledge in the short-term memory bank, then the use behavior of the knowledge is recorded; The short-term memory library is used to temporarily store knowledge related to the target user, and when a usage behavior corresponding to any knowledge in the short-term memory library meets a preset condition, the knowledge meeting the preset condition is stored in the long-term memory library.

21. A knowledge construction method based on memory mechanism, wherein: include: Acquire historical conversation information corresponding to the target user, and extract at least one piece of knowledge from the historical conversation information; For any extracted knowledge, if there is matching knowledge in the cache library corresponding to the target user, the number of occurrences of the knowledge is updated; According to the number of occurrences of the knowledge in the cache library, it is determined whether to store the knowledge in the memory library corresponding to the target user, so that when the input information corresponding to the target user is obtained, the reply information corresponding to the input information can be obtained according to the knowledge in the memory library.

22. An electronic device, wherein: include: at least one processor; as well as a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the electronic device to perform the method described in any one of claims 1-21.

23. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 21 is implemented.

24. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 21 is implemented.

Citation Information

Patent Citations

  • Individualized document processing system based on keywords

    CN101004737A

  • Chat agent system and method

    CN105138710A

  • Man-machine interaction method and device for intelligent robot

    CN106774832A

  • Control method and control device of artificial intelligence equipment and artificial intelligence equipment

    CN112508197A

  • Data processing method for chat and related device

    CN114003702A

Cited By

  • Three-party interactive memory structure implementation method and device, equipment and storage medium

    CN120524010A

  • Data archiving method, data retrieval method, data archiving device, data retrieval device, medium, equipment and product

    CN120705274A

  • Intelligent dialogue method and device, equipment and storage medium

    CN120892542A

  • Data processing method, electronic equipment, system, storage medium and program product

    CN121166043A

  • Large model agent memory construction method and memory system

    CN121638303A