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

By introducing an information processing method of memory mechanism into the model, the problem of poor accuracy of reply information in the prior art is solved, and information processing effects with more accurate and better user experience are achieved.

CN119961375APending Publication Date: 2025-05-09HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202311471492.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-07
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

In the prior art, there are few researches on model processing schemes that combine memory mechanisms, and the reply information generated by the model based on the memory mechanism is poor in accuracy and poor user experience.

Method used

It provides an information processing method based on a memory mechanism, which can obtain the pending information of the target user, search for relevant knowledge in its memory database, and use the hierarchical storage mechanism of the long and short-term memory database to record and update the usage behavior of the knowledge, and then generate processing results.

Benefits of technology

It realizes hierarchical storage of memory, simulates the memory mechanism in the real world, improves the accuracy of processing results, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119961375A_ABST
    Figure CN119961375A_ABST
Patent Text Reader

Abstract

The invention provides an information processing method based on a memory mechanism, electronic equipment and a storage medium. The method comprises the steps of obtaining to-be-processed information corresponding to a target user; searching knowledge related to the to-be-processed information in a memory library corresponding to the target user, so as to obtain a processing result corresponding to the to-be-processed information by using the searched knowledge; the memory bank comprises a long-term memory bank and a short-term memory bank; if the used knowledge is the knowledge in the short-term memory library, recording a use behavior aiming at the knowledge; wherein the short-term memory bank is used for temporarily storing knowledge related to the target user, and when the use behavior corresponding to any knowledge in the short-term memory bank meets the preset condition, the knowledge meeting the preset condition is stored in the long-term memory bank. According to the method, hierarchical storage of memory can be realized, a memory mechanism of the real world is simulated to process the to-be-processed information of the user, the effect of interaction with the user is improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application 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

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

[0003] In order to improve the performance of the model when interacting with users, it is possible to consider incorporating a memory mechanism into the model's processing, so that the model's processing of user input information is closer to the real human interaction process. However, there is currently little research on model processing solutions that incorporate memory mechanisms, and the accuracy of the response information generated by the model based on the memory mechanism is poor, resulting in poor user experience. Summary of the invention

[0004] The present application 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.

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

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

[0007] 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;

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

[0009] 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.

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

[0011] 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;

[0012] 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:

[0013] 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.

[0014] Optionally, the method further includes:

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

[0016] 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:

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

[0018] 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.

[0019] 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:

[0020] 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.

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

[0022] 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;

[0023] 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.

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

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

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

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

[0028] 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;

[0029] 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.

[0030] Optionally, the method further includes:

[0031] 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.

[0032] 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:

[0033] 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.

[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] 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;

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

[0037] 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;

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

[0039] 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.

[0040] 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 every preset period;

[0041] 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.

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

[0043] 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.

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

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

[0046] 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;

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

[0048] Optionally, the method further includes:

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

[0050] 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.

[0051] Optionally, the method further includes:

[0052] 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;

[0053] 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;

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

[0055] Optionally, training the target model according to the historical behavior information of the target user includes:

[0056] Determine the behavior style corresponding to each historical behavior information of the target user;

[0057] 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.

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

[0059] 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;

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

[0061] In a second aspect, the embodiment of the present application further provides an information processing method based on a memory mechanism, comprising:

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

[0063] 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;

[0064] 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.

[0065] In a third aspect, the embodiment of the present application further provides an intelligent dialogue method based on a memory mechanism, comprising:

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

[0067] 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;

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

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

[0070] 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.

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

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

[0073] 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;

[0074] 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.

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

[0076] at least one processor; and

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

[0078] 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.

[0079] In a sixth aspect, an embodiment of the present application 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 aspects is implemented.

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

[0081] The information processing method, electronic device and storage medium based on the memory mechanism provided in the embodiments of the present application 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 the 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 improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0083] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0084] Figure 2 A schematic diagram of the principle of an information processing method provided in an embodiment of the present application;

[0085] Figure 3 A flowchart of an information processing method based on a memory mechanism provided in an embodiment of the present application;

[0086] Figure 4 A schematic diagram of adding, converting and forgetting memory provided in an embodiment of the present application;

[0087] Figure 5 A flowchart of a memory generation method provided in an embodiment of the present application;

[0088] Figure 6 A schematic diagram of an interactive interface for memory generation provided in an embodiment of the present application;

[0089] Figure 7 A schematic diagram of the construction principle of a short-term memory bank provided in an embodiment of the present application;

[0090] Figure 8 A flowchart of a personalized fine-tuning method provided in an embodiment of the present application;

[0091] Fig. 9A schematic diagram of a personalized fine-tuning interactive interface provided in an embodiment of the present application;

[0092] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0093] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0094] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.

[0095] 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 application 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 provide corresponding operation entrances for users to choose to authorize or refuse.

[0096] The embodiments of the present application 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 language model (FoundationModel). The large language model is pre-trained through 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 (Large Language Model, LLM), a multi-modal pre-training language model (multi-modal pre-training model), etc.

[0097] In actual application, only a small number of samples are needed to fine-tune the pre-trained language model and it can be applied to different tasks. The large language model can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), 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 the large language model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.

[0098] First, the terms involved in this application are explained:

[0099] CLM (Causal Language Modeling): A way for large models to learn semantic information. Unlike masked language models, CLM focuses on a given corpus and acquires information from the corpus under the assumption that the input and output are the same. This modeling method follows the causal principle, that is, the current word is only affected by the previous word, not the following word.

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

[0101] 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 in downstream tasks.

[0102] Dual-Process: The information processing flow originating from the memory mechanism in the real world, including Rehearsal Process and Executive Process. Rehearsal Process focuses on distinguishing which external information is worth writing into memory, while Executive Process focuses on processing the information stored in memory, such as which information will be stored as long-term memory.

[0103] DPeM (Dual-Process enhanced Memory mechanism): A memory mechanism simulating Dual-Process proposed in an embodiment of the present application can effectively process information in the process of memorizing knowledge.

[0104] MaLP (Memory-augmented LLM Personalization): A personalized large model learning framework using a memory mechanism and PEFT technology proposed in an embodiment of the present application.

[0105] The application scenario of this application is first described below.

[0106] The embodiments of the present application 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 personalized chat is used as an example for explanation.

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

[0108] In real-life chat scenarios, humans will have some memories of the other person they are chatting with, and during the chat process, they will give corresponding replies based on their memories. When using a large model to conduct intelligent chats with users, if you can give a reply based on the memory of the current user after obtaining the information input by the user, you can improve the effect of the reply and enhance the user experience.

[0109] 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.

[0110] However, the memory bank used by this method is difficult to simulate the memory mechanism of the real world. In the real world, human memory is different. For example, how to drive belongs to long-term memory, but recent events, such as seeing a sign while driving yesterday, belong to short-term memory. Memory is constantly summarized and refreshed in daily life. How to achieve memory summary and refresh to improve the response effect is a problem that needs to be solved.

[0111] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1As shown, in an embodiment of the present application, the user's information can be summarized based on historical conversations to form a memory of the user. For example, the user's conversation one day ago included information such as "I feel hot today" and "I can't eat food with strong flavors". The large model can analyze and summarize this information to obtain the user's short-term memory "I feel hot recently" and store it in the memory bank.

[0112] In the embodiment of the present application, the memory bank can be divided into a short-term memory bank and a long-term memory bank. After summarizing and analyzing the content of the user's conversation, 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 transformed into long-term memory. For example, if "liking spicy food" is frequently mentioned at multiple time points before, it will be transformed 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 for a specific user are formed.

[0113] In the process of interacting with the user, if the user inputs the question "What to eat tonight, any recommendations", if the memory mechanism is not combined, 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 application, 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 "like 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 "like spicy food" and the user's short-term memory is "recently getting angry", the large model will combine long-term memory and short-term memory to provide content that better meets the user's needs, such as some light meals included in a specific restaurant that are more in line with current user expectations.

[0114] In order to achieve the above effects, the present application provides an information processing method based on a memory mechanism, which can train a large model to record users' relevant knowledge and preferences and respond to users in a personalized manner.

[0115] Figure 2 The schematic diagram of the principle of an information processing method provided in the embodiment of the present application is as follows. Figure 2 As shown, the MaLP provided in the embodiment of the present application mainly includes two modules: Memory Generation module and Memory Utilization module, involving three stages: memory generation, personalized fine-tuning, and memory utilization. They are described below.

[0116] Stage 1: Memory Generation:

[0117] The memory generation stage focuses on learning useful information from historical conversations and storing it. In each round of conversation, the coordinator extracts useful information as knowledge and temporarily stores it in the cache. This process is recorded as learning, and the knowledge stored in the cache will be recorded with the number of occurrences. If the same or similar knowledge appears in multiple rounds of conversation, this knowledge will be summarized and stored in the short-term memory. This step is the rehearsal process.

[0118] Specifically, the integrator can be implemented based on the 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.

[0119] After learning multiple rounds of dialogue, a lot of knowledge will be stored in the cache, among which the knowledge that meets the requirements will be summarized and stored in the short-term memory. The summarization operation for any knowledge in the cache may include: inputting the knowledge and the knowledge that appears in multiple rounds of dialogue and matches the knowledge into the big model, and the big model integrates the knowledge to obtain updated knowledge for storage in the short-term memory.

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

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

[0122] Phase 2: Personalized fine-tuning:

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

[0124] By fine-tuning the target model, we can learn user preferences, such as user conversation style. Assuming that a user prefers brief answers, the trained target model can generate brief reply messages based on the user's conversation style.

[0125] During the training process, in order to improve the training efficiency, most of the parameters in the target model can be frozen, and a small part of the parameters can be updated based on the user's historical conversations. Figure 2 As shown, the target model may include a large model LLM and a bypass model (indicated by A and B in the figure). During the training process, the parameters of the large model may be fixed and only the parameters of the bypass model may be updated. The dotted arrow in the figure represents that the bypass model learns the user's personalized preferences after training.

[0126] In this way, a target model that has been learned through user dialogue can be efficiently obtained, which can be used to generate response information during the memory usage process in stage three.

[0127] Stage 3: Memory Use:

[0128] After having the memory bank generated by the memory generation module and the target model obtained by personalized fine-tuning, the memory bank and the target model can be used to respond to the user's new input information. In the memory use stage, after obtaining the user's current input information x, the retriever can be used to search for knowledge related to the input information x in the STM (short-term memory) and LTM (long-term memory). The retrieved knowledge q and the input information x are sent to the fine-tuned target model. The target model will respond 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.

[0129] The knowledge in the short-term memory is dynamic, and old knowledge will be forgotten when new knowledge comes in. In addition, the number of times the knowledge in the short-term memory is used will be recorded, and the knowledge that has been used many times will be further stored in the long-term memory. This step is memorize, which can also reflect the executive process. The θ in the figure represents the conditions that must be met for the number of times used, thereby simulating the memory mechanism of the real world and improving the effect of interaction with users.

[0130] In the embodiment of the present application, the three-stage solutions are all implemented for specific users, that is, a set of memory libraries and a set of model parameters are maintained for each user, thereby achieving personalized services for the user.

[0131] In summary, the embodiment of the present application 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 the 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.

[0132] Some embodiments of the present application are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.

[0133] Figure 3 The following is a flowchart of an information processing method based on a memory mechanism provided in an embodiment of the present application. The method in this embodiment can be implemented on any device with data processing functions, for example, on the cloud, locally deployed, on a client, or on an IOT (Internet of Things) device. Figure 3 As shown, the method may include:

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

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

[0136] In one example, in a personalized chat scenario, the target user may be a user who is 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.

[0137] 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.

[0138] 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 may be used as the information to be processed, and the information to be processed may be processed to obtain recommended information for the target user and displayed on the homepage.

[0139] Artificial intelligence technology includes the simulation of human intelligence. In the above scenarios or other scenarios of interaction with users, combined with the memory mechanism, it can better simulate the interaction mode of the real world and more accurately realize the reply or recommendation to the target user. In this embodiment, there is no restriction on the specific content of the target user and the information to be processed.

[0140] 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.

[0141] Step 302: Search the memory bank corresponding to the target user for knowledge related to the information to be processed, so as to 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.

[0142] Optionally, the search may be performed by extracting feature vectors and comparing them. Specifically, the feature vector corresponding to the information to be processed may be extracted and compared with the feature vector of each knowledge in the memory bank. If the similarity between the feature vector of a certain knowledge and the feature vector of the information to be processed meets the requirements, the knowledge may be considered as knowledge related to the information to be processed.

[0143] Alternatively, it is also possible to determine whether the knowledge is related to the information to be processed by keyword matching, semantic similarity, etc. It is also possible to input the information to be processed and the knowledge into a relevance determination model to determine whether the two are related by the model.

[0144] 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 a corresponding processing result.

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

[0146] Optionally, the information to be processed and the knowledge may be directly concatenated and input into the target model, or prompt information may be added. For example, the information to be processed, the knowledge and the prompt information may be input into the target model, and the prompt information is used to prompt the target model to reply to the information to be processed based on the memory of the target user (i.e. the searched knowledge).

[0147] 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.

[0148] Optionally, when using knowledge to obtain a processing result, long memory and short memory may also be distinguished. Specifically, using the searched knowledge to obtain a processing result corresponding to the information to be processed may include:

[0149] The information to be processed, at least one piece of searched knowledge, 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.

[0150] For example, the information to be processed is "What to eat tonight, any recommendations?" The knowledge searched from the long-term memory library is "I like spicy food", and the knowledge searched from the short-term memory library is "I have recently gotten angry". They are all knowledge related to the information to be processed, so they will be sent to the target model for processing together. During processing, long and short memories can be distinguished. For example, the target model is prompted: the long-term memory of the target user is "I like spicy food", and the short-term memory of the target user is "I have recently gotten angry". In this way, the target model can recommend restaurants and dishes in a targeted manner based on the long-term and short-term memories of the target user.

[0151] 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-term memory and short-term memory in a targeted manner, and obtain processing results that are more in line with actual needs.

[0152] 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.

[0153] Figure 4 A schematic diagram of adding, converting and forgetting a memory provided in an embodiment of the present application. Figure 4 As shown, 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. The knowledge (short-term memory) stored in the short-term memory bank will be more deeply impressed every time it is used (accessed), and will be converted into long-term memory when the usage behavior meets certain conditions. Therefore, after each use of the knowledge in the short-term memory bank 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.

[0154] 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, wherein temporary storage means that the knowledge will be deleted or replaced after being stored for a period of time.

[0155] 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.

[0156] In an optional implementation, recording the usage behavior may include recording the number of times of use. Specifically, if the knowledge used is the knowledge in the short-term memory bank, recording the usage behavior for the knowledge includes: if the knowledge used is the knowledge in the short-term memory bank, adding one to the number of times of use corresponding to the knowledge.

[0157] Correspondingly, when the usage behavior corresponding to any knowledge in the short-term memory library meets the preset conditions, the knowledge meeting 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 number threshold, the knowledge reaching the usage number threshold will be stored in the long-term memory library.

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

[0159] Specifically, the recorded multiple usage times can be compared with preset rules, and if the preset rules are met, it is considered that they can be converted into long-term memory. For example, the preset rules can include the interval size that two adjacent usage times should meet. Optionally, the interval between the i+1th usage time and the previous usage time can be greater than the interval between the ith usage time and the previous usage time, so as to be more in line with the actual memory mechanism.

[0160] In another optional implementation, the number of times used and the time of use can also be recorded at the same time, and whether to convert it into long-term memory can be determined based on the number of times used and the time of use. Optionally, it can be compared with pre-set rules, or the knowledge, number of times used and the time of use can be input into the big model, and the big model can determine whether it can be converted into long-term memory.

[0161] 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 and short memory mechanisms of the real world, so that the memory bank can store knowledge more accurately and meet the needs of users for the use of the memory bank during interaction.

[0162] Optionally, after the knowledge is stored 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 the storage space occupied and avoid duplication when performing search operations, thereby improving the effect of search processing.

[0163] 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.

[0164] 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 being added to the short-term memory library; the method also includes: acquiring knowledge generated for the target user and to be added to the short-term memory library; adding the acquired 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.

[0165] The knowledge to be added to the short-term memory can be Figure 2 The method shown in the figure may also be used to obtain the information in other ways. 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.

[0166] 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.

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

[0168] 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.

[0169] For example, it can be set that the 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, the knowledge will be forgotten and deleted from the short-term memory bank.

[0170] In another optional implementation, 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 is deleted from the short-term memory library.

[0171] Specifically, the forgetting condition can be set according to actual needs. For example, knowledge is forgotten the fastest just 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 used for more than 3 days before it is forgotten. 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.

[0172] Through the above implementation scheme, the forgetting operation of short-term memory can be realized, which is in line with the short-term memory mechanism of the real world. In addition, the knowledge in the short-term memory library can be deleted according to the addition time, so that the knowledge stored first is forgotten first, and the old knowledge will be forgotten when new knowledge comes in, thereby improving the accuracy of short-term memory storage. Alternatively, it is possible to determine whether the knowledge is forgotten based on the number of uses and / or the time of use, which can more accurately simulate the actual memory forgetting mechanism and improve the effect of interacting with users based on the memory library.

[0173] 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 use behavior of 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 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 improving the user experience.

[0174] The memory generation scheme provided in the embodiments of the present application is described in detail below. Figure 5 A flow chart of a memory generation method provided in an embodiment of the present application. Figure 5 As shown, the process of memory generation can include:

[0175] 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.

[0176] 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.

[0177] Optionally, memory generation may be performed first, and then memory use may be performed. Therefore, this step may 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 above embodiment. Alternatively, the two steps may be performed alternately.

[0178] The historical behavior information may be any information related to the target user, including but not limited to: conversation, browsing, comment, etc. Exemplarily, the historical conversation of the target user may be obtained, and relevant knowledge may be extracted from the historical conversation.

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

[0180] Optionally, in order to improve the effect of knowledge extraction, the category of knowledge to be extracted can be indicated in the indication information. Specifically, obtaining at least one historical behavior information corresponding to the target user and extracting at least one knowledge from the historical behavior information includes: determining the category 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; wherein the indication information is used to instruct the big model to extract the knowledge of the category from the historical behavior information.

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

[0182] Exemplarily, 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", and personalized knowledge may be specific to the target user, such as "the target user likes spicy food".

[0183] Different types of knowledge may correspond to different prompt information. For example, the instruction information for common sense knowledge may be "This is a conversation between users: ...; please analyze which information is worth learning?", and the instruction information for personalized knowledge may be "This is a conversation between users: ...; please analyze which information is relevant to the user?".

[0184] In this way, common sense knowledge and personalized knowledge can be extracted through the large model. Common sense knowledge and personalized knowledge can be stored in the memory bank as short-term memory later. Optionally, common sense knowledge and personalized knowledge can also be distinguished in the memory bank. Different users can share common sense knowledge, that is, common sense knowledge can be set to be used by one user multiple times, or by multiple users separately. As long as the total usage behavior meets the preset conditions, it can be converted into long-term memory. Personalized knowledge is designed for each user individually and is not shared.

[0185] 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 in the embodiment of the present application is more in line with actual needs and improves the accuracy of memory.

[0186] Alternatively, the categories may also be divided in other ways. For example, the categories may include: diet, dressing, medical, emotion, etc. The categories may match the application scenarios. For example, when the embodiment of the present application is applied to the intelligent customer service of a catering APP, the relevant knowledge of the diet category may be mainly recorded.

[0187] Optionally, the categories of knowledge that need 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; the target category selected by the target user or configuration personnel from the multiple candidate categories is obtained to extract the knowledge corresponding to the target category from the historical behavior information corresponding to the target user.

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

[0189] Figure 6 A schematic diagram of an interactive interface for memory generation provided in an embodiment of the present application. Figure 6 As shown, the interactive interface can be used to display which categories of knowledge can be selected by the target user or the configuration personnel, such as diet, clothing, medical, emotion, etc. The selection permissions of the target user and the configuration personnel can be the same or different.

[0190] The target user or configuration personnel can select the knowledge category they want to extract from the displayed list. For example, in a personalized chat scenario, the target user wants the large model to remember more emotional content, so they can select the emotional category as the target category to meet the user's emotional communication needs.

[0191] Different indication information may be set in advance for different categories. After the target category is acquired, 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.

[0192] By inputting instruction information, the large model can extract relevant categories of knowledge to meet the actual usage needs in 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 to improve the user experience.

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

[0194] Generally, the extracted knowledge will be stored in the short-term memory bank when the memory conditions are met. In a few 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 are first described below.

[0195] 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, the number of occurrences of the matching knowledge will be updated; if the number of occurrences of any piece of 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.

[0196] Among them, if a certain knowledge has been extracted (learned) many times recently, it can be stored in the short-term memory library as short-term memory. In this embodiment, a cache library is designed accordingly, wherein the cache library can be a storage space for caching the knowledge extracted by the large model. For each historical behavior information, one or more pieces of knowledge extracted therefrom will be temporarily stored in the cache library. After each historical behavior information is extracted, the cache library will be refreshed once, and the cache library is only used to cache knowledge. The memory usage process does not support directly obtaining knowledge from the cache library.

[0197] The number of times the knowledge is stored in the cache will be recorded. 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.

[0198] Optionally, when a piece of knowledge is to be stored in the cache, it can be determined whether there is already matching knowledge in the cache, where matching can mean that the substantive content is the same or related. It can be determined whether two pieces of knowledge are matching knowledge by means of semantic similarity, etc. Alternatively, it can be determined whether two pieces of knowledge are matching by means of a large model.

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

[0200] 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.

[0201] Through 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.

[0202] 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: if the number of occurrences of any knowledge in the cache library reaches an occurrence threshold, the knowledge reaching the occurrence threshold is stored in the short-term memory library corresponding to the target user.

[0203] 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 of knowledge occurrence can quickly and accurately improve processing efficiency.

[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 is stored in the short-term memory library corresponding to the target user, which may include: for any knowledge in the cache library, the knowledge and the number of occurrences of the knowledge are input into the big model to determine whether the knowledge meets the short-term memory condition through the big model; if so, the knowledge is stored in the short-term memory library corresponding to the target user.

[0205] Specifically, the knowledge, the number of occurrences of the knowledge and the prompt information can be input into the large model, and the prompt information is used to instruct the large model to judge whether the knowledge is suitable as short-term memory based on the knowledge and its number of occurrences. If the processing result of the large model is yes, the knowledge can be stored in the short-term memory bank.

[0206] In actual applications, different knowledge may have different conditions for becoming short-term memory. For example, some knowledge may become short-term memory after appearing twice, while some knowledge may become short-term memory after appearing more times. The big model can comprehensively judge whether the knowledge needs to be used as short-term memory based on the content of the knowledge itself and the number of times the knowledge appears, so as to realize personalized memory of different knowledge and improve the accuracy of building a memory library.

[0207] 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. In addition, in practical applications, two pieces of knowledge with the same substantial 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.

[0208] 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 matching 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 matching the knowledge stored in the preset storage space to obtain the fused knowledge, and using the fused knowledge to replace the knowledge in the cache library.

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

[0210] Before storing a certain knowledge in the cache library into the short-term memory library, a fusion operation can be performed on the knowledge. The fusion operation includes: fusing the knowledge and the knowledge stored in the preset storage space that matches the knowledge. As shown in the figure, for the knowledge A1 in the cache library, if the number of occurrences of A1 meets the short-term memory condition, the knowledge A1 can be fused with the knowledge A2 and A3 stored in the preset storage space that match A1 to obtain the fused knowledge A, which is stored in the short-term memory library.

[0211] 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.

[0212] 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.

[0213] In practical applications, historical behavior information can be obtained in real time, or it can be obtained and processed every certain period of time. For example, obtaining at least one historical behavior information corresponding to the target user can include: obtaining at least one historical behavior information of the target user within the preset period every preset period. Correspondingly, the method also includes: after storing the knowledge in the cache library that meets the memory condition into the memory library, clearing the cache library.

[0214] Optionally, when initially constructing the memory library, multiple historical behavior information of the target user may be obtained, and the knowledge in the multiple historical behavior information may 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 may be cleared.

[0215] In the subsequent use process, the historical behavior information within the preset period can be obtained every preset period, and the 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.

[0216] 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 time to achieve regular updating of the short-term memory and improve the effect of using the short-term memory library.

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

[0218] Specifically, if the extracted knowledge is important, it can be used as long-term memory even if it only appears once. For example, "diabetes" and "scalds" often leave a deep impression when they appear for the first time in practical applications, and this knowledge is very important in the subsequent interaction with users, so it will be stored as long-term memory.

[0219] Correspondingly, if any extracted knowledge meets the memory conditions, the knowledge meeting the memory conditions is stored in the memory library, which may include: if any extracted knowledge matches the knowledge in the preset knowledge base, or, if it is judged through the large model that the knowledge meets the long-term memory conditions, the knowledge is stored in the long-term memory library.

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

[0221] 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 the big model can be asked whether the knowledge is important knowledge, or whether the knowledge is suitable for long-term memory. If the big model determines that the knowledge is yes, the knowledge is stored in the long-term memory library, thereby using the rich capabilities of the big model to assist in the judgment of long-term memory.

[0222] 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 base 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.

[0223] 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 building 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.

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

[0225] Optionally, knowledge in the long-term memory bank will not be forgotten in general, but a deletion mechanism can also be set to allow long-term memory to be deleted under certain circumstances or by the target user.

[0226] The personalized fine-tuning solution provided in the embodiment of the present application is described in detail below. Figure 8 A flowchart of a personalized fine-tuning method provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the process of personalized fine-tuning may include:

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

[0228] Step 802: Train the target model according to 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.

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

[0230] In practical applications, it is difficult to understand the user's personal conversation preferences without training a large model that only uses instructions, and complete retraining will bring huge computing resource pressure. Based on this, this embodiment uses parameter-friendly PEFT technology to build a target model for the target user through a pre-trained large model and a bypass model. Given multiple historical behavior information of the target user, the target model tends to understand the conversation preferences of the target user.

[0231] 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.

[0232] 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, and the 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.

[0233] 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.

[0234] The personalized fine-tuning method provided in this embodiment will freeze most of the parameters in the target model during training, and a small number of parameters will be 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 better understanding of the user's interaction method to meet the personalized needs of different users.

[0235] 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.

[0236] The behavior style may be used to represent the 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.

[0237] The corresponding behavior style can be determined based on the historical behavior information, where the behavior style can be obtained through manual annotation, model analysis, etc. 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, and the target user's conversation style can be learned through self-supervised training.

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

[0239] By explicitly informing the target model of the style of the target user's historical behavior information, after multiple rounds of learning the historical behavior information, the target model will be able to distinguish the style based on the historical behavior information. In addition, when processing the information to be processed subsequently, the target model will pay more attention to the style of 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.

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

[0241] Fig. 9 A schematic diagram of a personalized fine-tuning interactive interface provided in an embodiment of the present application. Fig. 9 As shown, multiple candidate behavior styles may be displayed on the interactive interface, such as concise, detailed, and polite, allowing the target user or configuration personnel to select a desired behavior style from the multiple candidate behavior styles.

[0242] Different behavioral styles can correspond to different initialization parameters, where the initialization parameters can be obtained through pre-training. The bypass model is initialized with the corresponding parameters, and the target model is trained based on the initialization. For example, the three styles of concise, detailed, and polite correspond to different initialization parameters. When the target user or configuration personnel expects to interact in a polite style, the initialization parameters corresponding to the polite style can be obtained, and the bypass model can be initialized using the obtained parameters.

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

[0244] 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.

[0245] For example, in terms of model input, users can adjust the input format and input mode, add, modify, filter, etc. historical behavior information. In terms of model output, users can adjust the output strategy, etc. In terms of model structure, users can adjust the specific structure and parameter quantity of the model, add, reduce or modify one or more modules in the model. In terms of the model training process, users can plan the model training stage, loss function, training stop condition, etc.

[0246] Optionally, relevant information to assist the user in making a choice may be displayed on the interface, such as various information available for selection, or detailed content of various information available for selection. In addition, various dynamic information during the model training process may be displayed to the user, such as the intermediate results of the model training, so that the user can update the strategy in a timely manner.

[0247] In practical applications, the three stages provided in the embodiments of the present application can be continuously executed. Exemplarily, for a certain target user, when the target user's pending information such as a question is obtained, the memory use operation of stage three can be executed according to the question, the 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 according to 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 according to the target user's questions and answers. In this way, by continuously executing memory generation, personalized fine-tuning and memory use operations, different memory banks and target models can be maintained for different users and updated in a timely manner, thereby improving the accuracy of the memory banks and target models.

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

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

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

[0251] 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;

[0252] 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.

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

[0254] 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 improve the user experience.

[0255] The solution provided by the embodiment of the present application can be applied to a variety of scenarios. In an intelligent customer service scenario or a personalized chat scenario, the embodiment of the present application provides an intelligent dialogue method based on a memory mechanism, including:

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

[0257] 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;

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

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

[0260] 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.

[0261] 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 processing results. The specific implementation principles and processes can be referred to in the above embodiments, which will not be repeated here. In intelligent customer service scenarios or personalized chat scenarios, the input information of the target user can be processed using the short-term memory library and the long-term memory library, and the short-term memory library and the long-term memory library can be continuously updated to improve the accuracy of the memory library, so that the generated reply information is more in line with the actual needs of the target user and improve the user experience.

[0262] In an intelligent customer service scenario or a personalized chat scenario, the present application embodiment further provides a knowledge construction method based on a memory mechanism, including:

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

[0264] 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;

[0265] 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.

[0266] 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 referred to in the above embodiments, which will not be repeated here. In intelligent customer service scenarios or personalized chat scenarios, knowledge can be extracted based on the historical conversations of the target user, and when certain conditions are met, the knowledge can be stored in the memory bank as memory, so as to conduct conversations with the target user based on the knowledge in the memory bank, improve the accuracy of the constructed memory bank, and enhance the interaction effect with the target user.

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

[0268] An acquisition module is used to obtain the to-be-processed information corresponding to the target user;

[0269] A processing module, used to search 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;

[0270] A recording module, used for recording the use behavior of the knowledge when the knowledge being used is the knowledge in the short-term memory bank;

[0271] 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.

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

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

[0274] An updating module, for updating the number of occurrences of any extracted knowledge if there is matching knowledge in the cache library corresponding to the target user;

[0275] A determination module is used to determine whether to store the knowledge in the memory library corresponding to the target user according to 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.

[0276] On the other hand, the embodiment of the present application further provides an intelligent dialogue device based on a memory mechanism, comprising:

[0277] An acquisition module is used to obtain input information of a target user;

[0278] A search module, used 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;

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

[0280] A recording module, used for recording the use behavior of the knowledge when the knowledge being used is the knowledge in the short-term memory bank;

[0281] 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.

[0282] On the other hand, the embodiment of the present application further provides a knowledge construction device based on a memory mechanism, including:

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

[0284] An updating module, for updating the number of occurrences of any extracted knowledge if there is matching knowledge in the cache library corresponding to the target user;

[0285] A determination module is used to determine whether to store the knowledge in the memory library corresponding to the target user according to 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 according to the knowledge in the memory library.

[0286] The specific implementation principle and effects of the device provided in the embodiments of the present application can be found in the aforementioned embodiments and will not be repeated here.

[0287] Fig.10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.10 As shown, the electronic device of this embodiment may include:

[0288] At least one processor 1001; and a memory 1002 in communication with 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 so that the electronic device executes the method as described in any of the above embodiments. Optionally, the memory 1002 can be independent or integrated with the processor 1001.

[0289] 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.

[0290] An embodiment of the present application 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.

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

[0292] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.

[0293] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application.

[0294] It should be understood that the above-mentioned processor can be a processing unit (Central Processing Unit, referred to as CPU), or 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 executed by a combination of hardware and software modules in the processor. The memory may include a high-speed RAM memory, and may also include a 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 disk or an optical disk, etc.

[0295] The above storage medium can be implemented by any type of volatile or non-volatile storage 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 memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0296] 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 a component 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.

[0297] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

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

[0299] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, 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 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 application.

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

Claims

1. An information processing method based on a memory mechanism, characterized in that: 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, characterized in that 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, characterized in that 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, characterized in that: 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, characterized in that 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, characterized in that: Before searching the memory library corresponding to the target user for knowledge related to the information to be processed, the method further includes: Acquire at least one historical behavior information corresponding to the target user, and extract at least one knowledge from the historical behavior information; 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, characterized in that 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, characterized in that 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, characterized in that: 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, characterized in that 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, characterized in that 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, characterized in that 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, characterized in that 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, characterized in that 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, characterized in that 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, characterized in that: 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, characterized in that 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, characterized in that 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 21 is implemented.

Citation Information

Cited By

  • Conversation processing method and device, program product and electronic equipment

    CN120632022A

  • Memory-based man-machine interaction method, electronic equipment, medium and program product

    CN121560166A

  • Memory-based human-computer interaction method, electronic device, medium and program product

    CN121560166B

  • Multi-mode intelligent health management method and system based on continuous memory

    CN122291041A