Memory-based intelligent decision-making methods, devices, equipment, and media
By constructing a three-layer memory hierarchy and adaptive semantic compression intelligent decision-making method, the problem of the lack of memory mechanism in intelligent agent systems is solved, realizing continuous personalized services and efficient decision-making for intelligent agents, and improving the continuity and accuracy of services.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-02
AI Technical Summary
Existing intelligent agent systems lack effective memory mechanisms, resulting in a lack of service continuity and personalization. They are unable to remember the elderly’s personal habits, health status changes, and service history across sessions and cycles, causing each interaction to start almost from scratch.
We construct a memory-based intelligent decision-making method, which achieves efficient storage, compression, indexing, and accurate retrieval of long-term elderly care and health interaction information through three-layer memory hierarchies, adaptive semantic compression, and confidence-aware recall. This enables the intelligent agent to have continuous personalized service capabilities and experience-learning and evolutionary capabilities.
It improves the accuracy and efficiency of intelligent decision-making, achieves service continuity and personalization, reduces repeated inquiries and trial and error, and improves the average decision accuracy rate in health event handling.
Smart Images

Figure CN122132554A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, applicable to the financial and medical fields, and particularly to a memory-based intelligent decision-making method, device, or medium. Background Technology
[0002] In the field of artificial intelligence, intelligent agent systems can interact with users. For example, in the smart elderly care scenario within the financial sector, intelligent agents can recommend financial products and services to the elderly and their families based on their personal habits, changes in health status, and service history. Similarly, in the smart elderly care scenario within the healthcare sector, intelligent agents can provide services such as health monitoring, medication management, and vital sign monitoring based on the elderly's personal habits, changes in health status, and service history.
[0003] Currently, existing intelligent agent systems lack effective memory mechanisms: for example, they only have limited short-term context windows, which means that each interaction has to start almost from scratch, resulting in a lack of service continuity and personalization. Summary of the Invention
[0004] The main objective of this application is to propose a memory-based intelligent decision-making method, apparatus, device, and medium that can solve the technical problems of lack of service continuity and personalization, and improve the accuracy and efficiency of intelligent decision-making.
[0005] To achieve the above objectives, a first aspect of this application proposes a memory-based intelligent decision-making method applied to an intelligent agent, the method comprising: In response to the detection of a target object triggering a target event, the target event is semantically compressed to obtain a sparse semantic vector of the event; The target long-term memory index is obtained by matching the long-term memory index in the target knowledge base with the sparse semantic vector of the event; wherein, the target knowledge base is constructed based on the daily interaction data between the agent and the target object; Based on the target long-term memory index, the long-term memory content of the target knowledge base is extracted to obtain candidate long-term memory content; The candidate long-term memory content is filtered based on the target event to obtain the target long-term memory content; Decisions are made based on the target event and the target's long-term memory content to arrive at a target action in response to the target object.
[0006] Optionally, after extracting candidate long-term memory content from the target knowledge base based on the target long-term memory index, the method further includes: The target event is semantically encoded to obtain an event-dense semantic vector; Semantic encoding is performed on the candidate long-term memory content to obtain a content-dense semantic vector; Semantic similarity is obtained by calculating the similarity between the event-dense semantic vector and the content-dense semantic vector. The candidate long-term memory content is filtered based on the semantic similarity.
[0007] Optionally, before matching the long-term memory index in the target knowledge base according to the event sparse semantic vector to obtain the target long-term memory index, the method further includes: Collect daily interaction data generated during interactions with the target object, and transform the daily interaction data to obtain short-term memory content; The short-term memory content is summarized to obtain conversation-level memory content, and the conversation-level memory content is indexed to obtain a conversation-level memory index. The session-level memory content is aggregated according to the session-level memory index to obtain long-term memory content, and an index is generated on the long-term memory content to obtain a long-term memory index. The target knowledge base is obtained by constructing a knowledge base based on the long-term memory index and the long-term memory content.
[0008] Optionally, the step of indexing the long-term memory content to obtain a long-term memory index includes: The long-term memory content is semantically encoded using a semantic encoder to obtain a semantic vector of the long-term memory content; The long-term memory content semantic vector is subjected to sparse activation processing to obtain the long-term memory index.
[0009] Optionally, a knowledge base is constructed based on the long-term memory index and the long-term memory content to obtain the target knowledge base, including: Create a node that stores the long-term memory index; The association degree is calculated for any two of the long-term memory indexes to obtain the semantic association strength, and an edge is created between the nodes based on the semantic association strength; The long-term memory content is bound to the node to construct the target knowledge base.
[0010] Optionally, the candidate long-term memory content is filtered based on the target event to obtain the target long-term memory content, including: The target event and the candidate long-term memory content are evaluated using a large language model to obtain the fit confidence score. The candidate long-term memory content is filtered based on the adaptability confidence level to obtain the target long-term memory content.
[0011] Optionally, before evaluating the target event and the candidate long-term memory content using a large language model to obtain the fit confidence, the method further includes: Matching the session-level memory content with the candidate long-term memory content yields associated session-level memory content; Matching the short-term memory content with the candidate long-term memory content yields associated short-term memory content; The candidate long-term memory content, the associated session-level memory content, and the associated short-term memory content are merged to obtain the updated candidate long-term memory content.
[0012] To achieve the above objectives, a second aspect of this application proposes a memory-based intelligent decision-making device applied to an intelligent agent, the device comprising: The event triggering module is used to perform semantic compression on the target event in response to the detection of a target object triggering a target event, and obtain a sparse semantic vector of the event; The index matching module is used to match the long-term memory index in the target knowledge base according to the event sparse semantic vector to obtain the target long-term memory index; wherein, the target knowledge base is constructed based on the daily interaction data between the agent and the target object; The content extraction module is used to extract the long-term memory content of the target knowledge base according to the target long-term memory index to obtain candidate long-term memory content; The content filtering module is used to filter the candidate long-term memory content according to the target event to obtain the target long-term memory content; The action decision module is used to make decisions based on the target event and the target's long-term memory content to obtain the target action to respond to the target object.
[0013] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the memory-based intelligent decision-making method described in the first aspect.
[0014] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the memory-based intelligent decision-making method described in the first aspect.
[0015] This application proposes a memory-based intelligent decision-making method, a memory-based intelligent decision-making device, an electronic device, and a computer-readable storage medium. The intelligent agent first constructs a target knowledge base based on daily interaction data with the target object. After detecting that the target object has triggered a target event, the agent first matches the target long-term memory index from the target knowledge base based on the sparse semantic vector of the target event. Then, candidate long-term memory content is obtained based on the target long-term memory index—this is the first content selection. Next, the target long-term memory content is selected from the candidate long-term memory content based on the target event—this is the second content selection. This significantly improves the correlation between events and content and is highly efficient. Finally, a decision is made based on the target event and the target long-term memory content to obtain the target action to respond to the target object. In summary, this application, by using target long-term memory content constructed based on daily interaction data and associated with the target event for decision-making, can solve the technical problems of lack of service continuity and personalization, and improve the accuracy and efficiency of intelligent decision-making.
[0016] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0017] Figure 1 This is a flowchart of the memory-based intelligent decision-making method provided in the embodiments of this application; Figure 2 This is a flowchart of a memory-based intelligent decision-making method provided in another embodiment of this application; Figure 3 yes Figure 2 The flowchart for step 203 in the text; Figure 4 yes Figure 2 The flowchart for step 204 in the text; Figure 5 This is a flowchart of a memory-based intelligent decision-making method provided in another embodiment of this application; Figure 6 yes Figure 1 The flowchart for step 104 in the document; Figure 7 This is a block diagram of the module structure of the memory-based intelligent decision-making device provided in the embodiments of this application; Figure 8 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0019] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0021] First, let's analyze some of the terms used in this application: Artificial intelligence (AI) is a new branch of computer science that studies, develops, and applies theories, methods, technologies, and systems to simulate, extend, and expand human intelligence. It aims to understand the essence of intelligence and produce intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thought. Furthermore, AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results.
[0022] Natural Language Processing (NLP): NLP uses computers to process, understand, and utilize human language (such as Chinese and English). It is a branch of artificial intelligence and an interdisciplinary field of computer science and linguistics, often referred to as computational linguistics. NLP includes syntactic analysis, semantic analysis, and discourse understanding. It is commonly used in machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information and image processing, information extraction and filtering, text classification and clustering, sentiment analysis, and opinion mining. It involves data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computation.
[0023] An AI Agent is an application that can autonomously plan and invoke external tools to execute tasks based on objectives and external information, and reflect on the results. AI Agents are designed around task objectives and business processes in terms of implementation, operational form, and behavioral characteristics.
[0024] Large Language Models (LLMs) are a class of deep learning models that utilize massive amounts of text data for autoregressive or self-supervised learning. They are capable of generating, understanding, translating, and summarizing complex natural language tasks. Common underlying frameworks are often based on the Transformer architecture, with core elements including attention mechanisms, multi-layer stacking, and positional encoding. Typical capabilities include text generation, question answering, dialogue, summarization, translation, code completion, and sentiment analysis.
[0025] In the field of artificial intelligence (such as smart elderly care), intelligent agent systems that provide continuous health monitoring, emotional companionship, and daily assistance to users (such as the elderly) are becoming a research hotspot. However, existing intelligent agent systems have significant shortcomings in long-term operation and multi-round complex interactions: 1. Lack of effective memory mechanism: Most intelligent agent systems only have a limited short-term context window and cannot remember the elderly’s personal habits, health status changes and service history across sessions and cycles, resulting in each interaction starting almost from scratch and lacking continuity and personalization in services.
[0026] 2. Inefficient storage and retrieval of historical information: Simple solutions for storing raw dialogue or sensor data will generate massive amounts of redundant data over time, leading to the curse of dimensionality during retrieval, making it impossible to quickly and accurately locate relevant knowledge and affecting real-time response.
[0027] 3. Weak ability to reuse experience: The agent cannot effectively learn and utilize past successful service experiences or learn from mistakes. When dealing with repetitive or similar elderly health events, it still needs to repeatedly explore or rely on artificial rules, and cannot achieve ability evolution.
[0028] Existing technologies neglect the importance of memory and continuous learning for open-ended intelligent agents, and lack a systematic memory system design for the continuous and personalized characteristics of elderly care scenarios, especially efficient semantic compression and accurate recall mechanisms.
[0029] Based on this, embodiments of this application propose a memory-based intelligent decision-making method, a memory-based intelligent decision-making device, an electronic device, and a computer-readable storage medium, with the aim of efficiently storing, compressing, indexing, and accurately recalling long-term elderly care and health interaction information, enabling the intelligent agent to have continuous personalized service capabilities and experience learning and evolution capabilities.
[0030] This application belongs to the field of artificial intelligence and smart elderly care technology. Its core innovation lies in constructing a hierarchical semantic memory architecture and a learnable indexing mechanism designed for long-term companionship agents. Through three major technological breakthroughs—three-level memory hierarchy, adaptive semantic compression, and confidence-aware recall—it solves the key challenges in elderly care and health scenarios, such as poor service continuity, insufficient utilization of historical experience, and decision-making reliant on repeated inquiries, caused by the lack of an effective memory mechanism. Technical highlights include: three-layer memory lifecycle management, handling immediate dialogue, single service sessions, and long-term health knowledge respectively; a trainable semantic compressor that compresses high-dimensional interaction sequences into sparse semantic index key-value pairs; and two-level recall and confidence verification to achieve accurate and efficient historical experience retrieval and suitability assessment.
[0031] The memory-based intelligent decision-making method provided in this application can be applied to terminals and servers, or it can be software running on the server. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The software can be an application that implements the memory-based intelligent decision-making method, but it is not limited to the above forms.
[0032] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include server computers, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0033] This application provides a memory-based intelligent decision-making method, a memory-based intelligent decision-making device, an electronic device, and a computer-readable storage medium, which are specifically described through the following embodiments. First, the memory-based intelligent decision-making method in the embodiments of this application is described.
[0034] It should be noted that in each specific implementation of this application, when it is necessary to process data related to the user's identity or characteristics, such as the user's voice, the user's permission or consent will be obtained first. Moreover, the collection, use and processing of this data will comply with relevant laws, regulations and standards.
[0035] Reference Figure 1 , Figure 1 This is an optional flowchart of a memory-based intelligent decision-making method provided in the embodiments of this application. The method is applied to an intelligent agent and may include, but is not limited to, steps 101 to 105.
[0036] Step 101: In response to the detection of a target object triggering a target event, perform semantic compression on the target event to obtain a sparse semantic vector of the event; Step 102: Match the long-term memory index in the target knowledge base with the event sparse semantic vector to obtain the target long-term memory index; wherein, the target knowledge base is constructed based on the daily interaction data between the agent and the target object; Step 103: Extract long-term memory content from the target knowledge base based on the target long-term memory index to obtain candidate long-term memory content; Step 104: Filter candidate long-term memory content based on the target event to obtain the target long-term memory content; Step 105: Make a decision based on the target event and the target long-term memory content to obtain the target action to respond to the target object.
[0037] In steps 101 to 105 of the embodiments of this application, the intelligent agent first constructs a target knowledge base based on daily interaction data with the target object. After detecting that the target object has triggered a target event, it first matches the target long-term memory index from the target knowledge base according to the sparse semantic vector of the target event, and then obtains candidate long-term memory content based on the target long-term memory index. This is the first content selection. Then, the target long-term memory content is obtained by filtering from the candidate long-term memory content according to the target event. This is the second content selection, which can greatly improve the correlation between events and content and is highly efficient. Finally, a decision is made based on the target event and the target long-term memory content to obtain the target action to respond to the target object. In summary, by using target long-term memory content constructed based on daily interaction data and associated with the target event for decision-making, this application can solve the technical problems of lack of service continuity and personalization, and improve the accuracy and efficiency of intelligent decision-making.
[0038] For example, in the smart elderly care scenario in the financial sector, intelligent agents can recommend financial products and services to the elderly and their families based on their personal habits, changes in health status, and service history.
[0039] For example, in the smart elderly care scenario in the medical field, intelligent agents can provide services such as health monitoring, medication management, and vital sign monitoring to the elderly based on their personal habits, changes in health status, and service history.
[0040] In step 101 of some embodiments, the agent, in response to detecting a target object triggering a target event, performs semantic compression on the target event to obtain a sparse semantic vector of the event. The target event typically refers to an event that is detected by the agent and triggers subsequent processing in relation to the target object (an elderly person or other care recipient) due to a change in some condition, behavior, or state.
[0041] For example, the target event is: After taking a nap one day, Grandpa Wang said again, "I feel a little dizzy." In one example, the agent turns on the microphone to collect speech and obtains the target speech; when the speaker of the target speech is identified as the target object, the target event is generated based on the speech content of the target speech and the context (time, place, physiological state) of the target object.
[0042] For example, the target event might be: standing up immediately after a prolonged period of lying in bed (such as taking a nap). In one example, the agent detects the target object's position using sensors, and when a positional shift occurs (such as from lying in bed to standing), the agent generates the target event based on the physiological state before and after the change.
[0043] In one embodiment, a semantic encoder semantically encodes the target event to obtain an event semantic vector; the event semantic vector is then subjected to sparse activation processing to obtain an event sparse semantic vector. Specifically, the semantic encoder can be trained based on a deep network of contrastive learning or variational autoencoder. The goal of this semantic encoder is to map an interaction sequence (such as dialogue text or event stream) into a low-dimensional, dense semantic vector, while ensuring, through training objectives, that semantically similar sequences have vectors that are close in distance in the embedding space. The event sparse semantic vector is a set of high-dimensional sparse binary codes.
[0044] In one embodiment, prior to step 101 or step 102, the memory-based intelligent decision-making method may further include: constructing a target knowledge base based on daily interaction data between the agent and the target object; wherein the target knowledge base includes long-term memory content and a long-term memory index generated based on the long-term memory content.
[0045] In one embodiment, reference is made to Figure 2 The steps for constructing a target knowledge base based on the daily interaction data between the intelligent agent and the target object may include: Step 201: Collect daily interaction data generated during interactions with the target object, and transform the daily interaction data to obtain short-term memory content; Step 202: Generate a summary of the short-term memory content to obtain the conversation-level memory content, and generate an index for the conversation-level memory content to obtain the conversation-level memory index; Step 203: Aggregate the session-level memory content according to the session-level memory index to obtain the long-term memory content, and generate an index for the long-term memory content to obtain the long-term memory index; Step 204: Construct a knowledge base based on the long-term memory index and long-term memory content to obtain the target knowledge base.
[0046] In step 201, daily interaction data, generated from regular interactions between humans and intelligent agents, is used to analyze behaviors, preferences, states, or service quality. Short-term memory content can be obtained by transforming daily interaction data. In one example, short-term memory content is obtained by caching the original dialogue sequence and intermediate states of the current interaction round (such as this health inquiry dialogue). This method has the characteristics of small capacity, fast turnover, and can maintain dialogue continuity.
[0047] In step 202, session-level memory content can be generated after a complete service session (such as handling a fall incident: from discovery and assessment to contacting family members) has concluded. Session-level memory content stores a preliminary abstracted summary of the session, including core events, key decisions, the final outcome, and the emotional tone.
[0048] In one embodiment, the step of generating an index for session-level memory content may include: semantically encoding the session-level memory content using a semantic encoder to obtain a semantic vector of the session-level memory content; and performing sparse activation processing on the semantic vector of the session-level memory content (using a sparse index key generator) to obtain the session-level memory index.
[0049] Trainable semantic encoder: Trained using a deep network based on contrastive learning or variational autoencoder. The goal of this semantic encoder is to map an interaction sequence (such as dialogue text or event stream) into a low-dimensional, dense semantic vector, while ensuring, through training objectives, that semantically similar sequences have vectors that are close in distance in the embedding space.
[0050] Sparse Index Key Generator: This generator performs sparsification activation on the encoded semantic vector to generate a set of high-dimensional sparse binary codes, which serve as the semantic index key for the memory segment. This representation is extremely space-efficient and supports efficient Boolean operations for initial filtering.
[0051] In step 203, the target knowledge base is formed by periodically aggregating and refining content from multiple conversational memories to create long-term personalized patterns (such as "Grandpa Zhang's blood pressure is usually low after his afternoon nap" and "Grandma Li has difficulty pronouncing the name of a certain drug") and universal domain health knowledge for specific elderly individuals. This layer of memory is persistently stored to support long-term accumulation.
[0052] In one embodiment, reference is made to Figure 3 Step 203, which involves generating an index for long-term memory content to obtain a long-term memory index, may include: Step 301: Semantically encode the long-term memory content using a semantic encoder to obtain a semantic vector of the long-term memory content; Step 302: (Through a sparse index key generator) perform sparse activation processing on the semantic vector of long-term memory content to obtain the long-term memory index.
[0053] The advantage of this embodiment is that it can save storage space and support efficient Boolean operations when filtering long-term memory content, thereby improving filtering efficiency.
[0054] In step 204, the target knowledge base is constructed based on the paired long-term memory index and long-term memory content.
[0055] The advantage of the embodiments of steps 201 to 204 above is that it can realize three-level memory management from short-term to session level to long-term, which helps to solve the lack of continuity and personalization.
[0056] In one embodiment, reference is made to Figure 4 Step 204 may include: Step 401: Create nodes; these nodes are used to store long-term memory indexes. Step 402: Calculate the association degree for any two long-term memory indexes to obtain the semantic association strength, and create an edge between nodes based on the semantic association strength; Step 403: Bind long-term memory content to the nodes to construct the target knowledge base.
[0057] The advantage of this embodiment is that by using nodes to store the index and edges to represent the semantic association strength, the target knowledge base can support fast semantic retrieval.
[0058] In one embodiment, the step of creating an edge between nodes based on semantic association strength may include: creating an edge between any two nodes and using the semantic association strength as the weight of the edge; In step 102 of some embodiments, the target long-term memory index is obtained by matching the long-term memory index in the target knowledge base according to the event sparse semantic vector. For example, when the agent responds to the detection of a target event (such as encountering "Grandpa said he was dizzy"), it first uses the event sparse semantic key of the target event to perform fast Hamming distance calculation or graph traversal in the long-term memory index of the long-term knowledge base to match the target long-term memory index.
[0059] In step 103 of some embodiments, the long-term memory content of the target knowledge base is extracted according to the target long-term memory index to obtain candidate long-term memory content. For example, a node in the target knowledge base is located according to the target long-term memory index, and the long-term memory content bound to the node is used as candidate long-term memory content. In this way, a batch of candidate memories can be initially recalled.
[0060] In one embodiment, see Figure 5 Memory-based intelligent decision-making methods may also include: Step 501: Semantically encode the target event to obtain a dense semantic vector of the event; Step 502: Semantically encode the candidate long-term memory content to obtain a content-dense semantic vector; Step 503: Calculate the semantic similarity based on the event-dense semantic vector and the content-dense semantic vector. Step 504: Filter candidate long-term memory content based on semantic similarity.
[0061] Specifically, cosine similarity is calculated using the dense semantic vectors of candidate long-term memory content and the dense semantic vectors of the target event. The content is then sorted by similarity, and the top K most relevant candidate long-term memory content is retained while the remaining candidate long-term memory content is deleted.
[0062] In step 104 of some embodiments, in order to further improve the correlation between the target event and the memory content, candidate long-term memory content is screened based on the target event to obtain the target long-term memory content.
[0063] In one embodiment, reference is made to Figure 6 Step 104 may include: Step 601: Evaluate the target event and candidate long-term memory content using a large language model to obtain the fit confidence. Step 602: Filter candidate long-term memory content based on fit confidence to obtain target long-term memory content.
[0064] Specifically, the target event and multiple candidate long-term memory contents are input into a lightweight large language model. The large language model determines which (or which) candidate long-term memory contents provide the greatest reference value for responding to the target event and outputs the fit confidence score. Only memory contents with a confidence score higher than a threshold are ultimately adopted to guide the current decision.
[0065] In one embodiment, step 601 may include: matching the session-level memory content with the candidate long-term memory content to obtain associated session-level memory content; matching the short-term memory content with the candidate long-term memory content to obtain associated short-term memory content; and merging the candidate long-term memory content, the associated session-level memory content, and the associated short-term memory content to obtain updated candidate long-term memory content.
[0066] Specifically, as mentioned above, long-term memory content is constructed based on conversation-level memory content, and conversation-level memory content is constructed based on short-term memory content. This embodiment updates candidate long-term memory content based on the association between these three layers of memory, which improves the accuracy of the large language model's generated adaptability confidence, thereby improving the accuracy of intelligent decision-making.
[0067] In step 105 of some embodiments, the agent makes a decision based on the target event and the target long-term memory content to obtain a target action for responding to the target object. For example, the agent combines the target event and the recalled target long-term memory content to generate a more accurate and personalized response or action.
[0068] In one example, a memory-based intelligent decision-making method may include the following steps: (1) In the daily interactions between the agent and the elderly, real-time data streams are transformed into short-term memory content.
[0069] (2) When the service session is detected to have ended naturally (such as the end of the conversation or the timeout of continuous no interaction), the short-term memory content is summarized and the semantic encoder is used to compress and generate an index key, which is then written into the session-level memory content and the session-level index.
[0070] (3) Run the memory aggregation process periodically (e.g., weekly) to extract long-term memory content and long-term memory index from multiple recent conversational memory contents in order to update the target knowledge base.
[0071] (4) When faced with a new decision event, the target long-term memory content with high confidence is retrieved from the target knowledge base through a three-level process of “sparse bond coarse screening (see steps 102 to 103) → dense vector fine sorting (see steps 501 to 504) → LLM judge verification (see steps 601 to 602)”.
[0072] (5) The agent makes decisions based on the target event and the recalled target long-term memory content, resulting in a more accurate and personalized response or action.
[0073] (6) Take the results and effects of this decision as new experience, and selectively update the target knowledge base through the process of steps (2) and (3) to form a closed loop of "practice-memory-learning".
[0074] In another example, the memory-based intelligent decision-making method of this application is illustrated through an embodiment of long-term abnormal blood pressure pattern detection and response. Scenario: An intelligent agent is monitoring Grandpa Wang's health for a long time and needs to handle his recurring blood pressure fluctuations. This may include the following steps: (1) Memory Writing: 1.1 Multiple Conversations: Over the past three months, the agent recorded five complete conversations of "Grandpa Wang complained of dizziness and then his blood pressure was found to be low." 1.2 Conversation Memory: After each conversation, the agent generated a summary: "Date X, complained of dizziness, blood pressure measured at 95 / 60 mmHg, occurred 1 hour after a nap, advised to lie down and rest and drink warm water, blood pressure was remeasured half an hour later and rose to 110 / 70 mmHg, symptoms were relieved." 1.3 Long-Term Knowledge Refinement: Periodic analysis revealed that all five events met the patterns of "time after nap" and "activity state from lying down to standing." 1.4 Target Knowledge Base Update: A long-term memory entry was formed: "Object: Grandpa Wang. Pattern: Orthostatic hypotension tendency. Triggering condition: standing up immediately after prolonged bed rest (such as a nap). Typical manifestations: dizziness, systolic blood pressure below 100 mmHg. Verified coping measures: reminding to get up slowly, lie down and rest, and replenish fluids. Effectiveness: High." (2) Memory Recall and Decision Making: 2.1 New Event: After a nap one day, Grandpa Wang said again, "I feel a little dizzy." 2.2 Retrieval: The sparse semantic keys of the current event ("after nap", "dizziness") quickly hit the memory content of "orthostatic hypotension" in the long-term knowledge base. 2.3 Verification: The LLM judge, combined with the current specific context (such as Grandpa just taking a new drug), judged that the historical memory was highly relevant, with a confidence level of 0.92. 2.4 Decision Making: The agent immediately took the verified effective measures: "Grandpa, don't rush to stand up. Please lie on the bed for a while longer. I'll check your blood pressure right away. Remember to sit on the edge of the bed for a few minutes after waking up in the future." At the same time, the agent actively started the blood pressure monitor to measure.
[0075] (3) Effects and Evolution: 3.1 This event is recorded as a successful experience reuse, which strengthens the weight of the memory content. 3.2 The agent may further discover that the pattern occurs more frequently in specific seasons (such as summer), thereby adding an association annotation to long-term knowledge, making future health reminders more accurate and proactive.
[0076] In summary, when an intelligent agent is an elderly care and health intelligent agent, it is no longer a forgetful, repetitive "one-time assistant," but has evolved into a long-term, reliable "electronic caregiver" with rich "nursing experience" and the ability to carry out "preventive intervention."
[0077] In summary, the present application can achieve at least the following beneficial effects: (1) Significantly enhanced service continuity and personalization: The system can accurately recall service details and elderly preferences from months or even earlier, making the agent more "thoughtful" and "remembering", and improving the service continuity evaluation index. (2) Significantly improved decision-making efficiency and quality: Through efficient indexing and accurate recall, the search time for relevant historical information is reduced from seconds to milliseconds, and decisions are made based on high-quality historical experience, reducing repeated inquiries and trial and error, and improving the average decision accuracy in health event handling. (3) Optimized storage and computing overhead: Semantic compression and sparse indexing technology reduce the storage space requirement for long-term memory compared to storing original data, while maintaining efficient retrieval capabilities. (4) Continuous evolution of agent capabilities: The continuous accumulation and refinement of the memory bank enables the agent to implicitly learn from all past interactions, and its ability to handle complex and rare elderly health scenarios increases with the length of service time.
[0078] Please see Figure 7 This application also provides a memory-based intelligent decision-making device, applied to an intelligent agent, which can realize the above-mentioned memory-based intelligent decision-making method. Figure 7 The block diagram of the memory-based intelligent decision-making device provided in this application embodiment is shown. The device includes: an event triggering module 701, an index matching module 702, a content extraction module 703, a content filtering module 704, and an action decision-making module 705. The event triggering module 701 is used to perform semantic compression on the target event in response to the detection of a target object triggering a target event, obtaining a sparse semantic vector of the event. The index matching module 702 is used to match the long-term memory index in the target knowledge base according to the sparse semantic vector of the event, obtaining a target long-term memory index. The target knowledge base is constructed based on the daily interaction data between the agent and the target object. The content extraction module 703 is used to extract long-term memory content from the target knowledge base according to the target long-term memory index, obtaining candidate long-term memory content. The content filtering module 704 is used to filter the candidate long-term memory content according to the target event, obtaining the target long-term memory content. The action decision-making module 705 is used to make a decision based on the target event and the target long-term memory content, obtaining a target action to respond to the target object.
[0079] In one embodiment, the memory-based intelligent decision-making device further includes a content filtering module, configured to: semantically encode the target event to obtain an event-dense semantic vector; semantically encode candidate long-term memory content to obtain a content-dense semantic vector; calculate the similarity between the event-dense semantic vector and the content-dense semantic vector to obtain a semantic similarity; and filter the candidate long-term memory content based on the semantic similarity.
[0080] In one embodiment, the memory-based intelligent decision-making device further includes a knowledge base construction module, configured to: collect daily interaction data generated during interactions with a target object; transform the daily interaction data to obtain short-term memory content; generate a summary of the short-term memory content to obtain session-level memory content; and generate an index for the session-level memory content to obtain a session-level memory index; aggregate the session-level memory content according to the session-level memory index to obtain long-term memory content; and generate an index for the long-term memory content to obtain a long-term memory index; and construct a knowledge base based on the long-term memory index and the long-term memory content to obtain a target knowledge base.
[0081] In one embodiment, the content filtering module is specifically used to: evaluate the target event and the candidate long-term memory content using a large language model to obtain a fit confidence score; and filter the candidate long-term memory content based on the fit confidence score to obtain the target long-term memory content.
[0082] In one embodiment, before evaluating the target event and the candidate long-term memory content using a large language model to obtain the fit confidence, the content filtering module is further configured to: match the conversation-level memory content with the candidate long-term memory content to obtain associated conversation-level memory content; match the short-term memory content with the candidate long-term memory content to obtain associated short-term memory content; and merge the candidate long-term memory content, associated conversation-level memory content, and associated short-term memory content to obtain updated candidate long-term memory content.
[0083] It should be noted that the specific implementation of this memory-based intelligent decision-making device is basically the same as the specific implementation of the memory-based intelligent decision-making method described above, and will not be repeated here.
[0084] This application also provides an electronic device, which includes: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communication between the processor and the memory. When the program is executed by the processor, it implements the aforementioned memory-based intelligent decision-making method. This electronic device can be any intelligent terminal, including tablet computers, in-vehicle computers, etc.
[0085] Please see Figure 8 , Figure 8The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 801 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 802 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 802 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 802 and is called and executed by the processor 801 to implement the memory-based intelligent decision-making method of the embodiments of this application. The 803 input / output interface is used to implement information input and output. The communication interface 804 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 805 transmits information between various components of the device (e.g., processor 801, memory 802, input / output interface 803, and communication interface 804); The processor 801, memory 802, input / output interface 803, and communication interface 804 are connected to each other within the device via bus 805.
[0086] This application also provides a computer-readable storage medium for computer-readable storage, wherein the storage medium stores one or more programs, which can be executed by one or more processors to implement the above-described memory-based intelligent decision-making method.
[0087] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0088] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0089] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0090] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0091] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0092] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0093] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0094] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0095] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0096] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0097] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0098] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A memory-based intelligent decision-making method, characterized in that, Applied to intelligent agents, the method includes: In response to the detection of a target object triggering a target event, the target event is semantically compressed to obtain a sparse semantic vector of the event; The target long-term memory index is obtained by matching the long-term memory index in the target knowledge base with the sparse semantic vector of the event; wherein, the target knowledge base is constructed based on the daily interaction data between the agent and the target object; Based on the target long-term memory index, the long-term memory content of the target knowledge base is extracted to obtain candidate long-term memory content; The candidate long-term memory content is filtered based on the target event to obtain the target long-term memory content; Decisions are made based on the target event and the target's long-term memory content to arrive at a target action in response to the target object.
2. The method according to claim 1, characterized in that, After extracting candidate long-term memory content from the target knowledge base based on the target long-term memory index, the method further includes: The target event is semantically encoded to obtain an event-dense semantic vector; Semantic encoding is performed on the candidate long-term memory content to obtain a content-dense semantic vector; Semantic similarity is obtained by calculating the similarity between the event-dense semantic vector and the content-dense semantic vector. The candidate long-term memory content is filtered based on the semantic similarity.
3. The method according to claim 1, characterized in that, Before matching the long-term memory index in the target knowledge base according to the event sparse semantic vector to obtain the target long-term memory index, the method further includes: Collect daily interaction data generated during interactions with the target object, and transform the daily interaction data to obtain short-term memory content; The short-term memory content is summarized to obtain conversation-level memory content, and the conversation-level memory content is indexed to obtain a conversation-level memory index. The session-level memory content is aggregated according to the session-level memory index to obtain long-term memory content, and an index is generated on the long-term memory content to obtain a long-term memory index. The target knowledge base is obtained by constructing a knowledge base based on the long-term memory index and the long-term memory content.
4. The method according to claim 3, characterized in that, The process of indexing the long-term memory content to obtain a long-term memory index includes: The long-term memory content is semantically encoded using a semantic encoder to obtain a semantic vector of the long-term memory content; The long-term memory content semantic vector is subjected to sparse activation processing to obtain the long-term memory index.
5. The method according to claim 3, characterized in that, The target knowledge base is constructed based on the long-term memory index and the long-term memory content, including: Create a node that stores the long-term memory index; The association degree is calculated for any two of the long-term memory indexes to obtain the semantic association strength, and an edge is created between the nodes based on the semantic association strength; The long-term memory content is bound to the node to construct the target knowledge base.
6. The method according to claim 3, characterized in that, Based on the target event, the candidate long-term memory content is filtered to obtain the target long-term memory content, including: The target event and the candidate long-term memory content are evaluated using a large language model to obtain the fit confidence score. The candidate long-term memory content is filtered based on the adaptability confidence level to obtain the target long-term memory content.
7. The method according to claim 6, characterized in that, Before evaluating the target event and the candidate long-term memory content using a large language model to obtain the fit confidence, the method further includes: Matching the session-level memory content with the candidate long-term memory content yields associated session-level memory content; Matching the short-term memory content with the candidate long-term memory content yields associated short-term memory content; The candidate long-term memory content, the associated session-level memory content, and the associated short-term memory content are merged to obtain the updated candidate long-term memory content.
8. A memory-based intelligent decision-making device, characterized in that, Applied to intelligent agents, the device includes: The event triggering module is used to perform semantic compression on the target event in response to the detection of a target object triggering a target event, and obtain a sparse semantic vector of the event; The index matching module is used to match the long-term memory index in the target knowledge base according to the event sparse semantic vector to obtain the target long-term memory index; wherein, the target knowledge base is constructed based on the daily interaction data between the agent and the target object; The content extraction module is used to extract the long-term memory content of the target knowledge base according to the target long-term memory index to obtain candidate long-term memory content; The content filtering module is used to filter the candidate long-term memory content according to the target event to obtain the target long-term memory content; The action decision module is used to make decisions based on the target event and the target's long-term memory content to obtain the target action to respond to the target object.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.