AI assistant autonomous learning method based on key value pair storage and vector retrieval

By using a key-value pair storage and vector retrieval method, task summaries are generated and key-value pairs are constructed. Vector transformation and database indexing are performed using an embedding model, which solves the shortcomings of traditional AI assistants in task semantic matching and enables the AI ​​assistant to learn autonomously and continuously evolve its capabilities.

CN121835848APending Publication Date: 2026-04-10CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-07
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Traditional AI assistants struggle to quickly match relevant historical experiences when faced with tasks that have different expressions but similar semantics, resulting in insufficient self-learning ability and an inability to flexibly retrieve and efficiently reuse task knowledge.

Method used

A key-value pair storage and vector retrieval method is adopted. By generating task summaries and constructing {task summary, execution flow} key-value pairs, vector transformation is performed using an embedding model, and a vector database index is established to achieve semantic similarity calculation and efficient retrieval, forming a closed-loop mechanism of task processing-knowledge storage-retrieval reuse-update iteration.

Benefits of technology

It enables the autonomous accumulation and dynamic updating of task knowledge for AI assistants, significantly reducing operation and maintenance costs, improving the processing efficiency of repetitive and similar tasks, and promoting the continuous evolution of AI assistant capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121835848A_ABST
    Figure CN121835848A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of artificial intelligence, and particularly relates to an AI assistant autonomous learning method based on key value pair storage and vector retrieval. Comprising the following steps: an AI assistant generates a corresponding task abstract for a task submitted by a user, constructs a key value pair associated with the task abstract and an execution process, and completes storage; the embedded model carries out vector conversion on the stored key value pairs to generate vector data containing task knowledge features; the vector database performs efficient index construction and management on the vector data; when a new task request is received, the AI assistant generates a new task abstract, and after vector conversion, similarity retrieval is executed in the vector database to match historical task knowledge; reusing a historical execution process based on a matching result and combining with new task demand optimization adjustment, and updating a key value pair storage and vector database while completing new task processing; the autonomous learning of the AI assistant is realized through a closed loop mechanism of task processing, knowledge storage, retrieval multiplexing and updating iteration; according to the method, the problems that task experience of a traditional AI assistant is difficult to continuously accumulate, repeated task instructions are redundant, and a learning process has no closed loop are solved, autonomous precipitation of task knowledge is realized, the efficiency and accuracy of knowledge reuse are improved, and continuous evolution of AI assistant ability is promoted.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Technical Field This invention belongs to the field of artificial intelligence and data processing technology, specifically relating to a key-value pair-based storage method.

[0002] A self-learning method for AI assistants in vector retrieval. Background Technology

[0003] With the rapid development of artificial intelligence technology, AI assistants have been widely applied in various fields such as office collaboration, intelligent customer service, and home control. Users have placed higher demands on the efficiency of task processing, the accuracy of command response, and the continuous evolution of capabilities. Especially in high-frequency repetitive task scenarios, the ability of AI assistants to quickly reuse historical experience and autonomously accumulate task knowledge directly determines user experience and service efficiency. Traditional AI assistant task processing modes are mostly based on preset rule bases or single model reasoning. Their knowledge accumulation relies on manual rule updates or large-scale data retraining, which has significant technical limitations. In existing technologies, some AI assistants attempt to store historical task data through databases, but they mostly adopt traditional structured storage methods, which can only achieve precise matching based on keywords and cannot perform flexible retrieval and knowledge reuse based on task semantics. When faced with tasks with different expressions but similar semantics, it is still difficult to quickly match relevant historical experience, resulting in insufficient self-learning capabilities. Therefore, the industry urgently needs an AI assistant technology solution that can achieve autonomous accumulation of task knowledge and efficient retrieval and reuse to solve the pain points of traditional AI assistants, such as difficulty in accumulating experience, tedious handling of repetitive tasks, and lack of a closed-loop learning process. This solution can drive AI assistants to leap from "mechanical response" to "intelligent evolution" in order to meet increasingly complex user needs. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention proposes an AI assistant autonomous learning method based on key-value pair storage and vector retrieval, which includes:

[0005] Step S1: The AI ​​assistant generates a task summary and constructs key-value pairs {task summary, execution flow}, which are then written to the key-value pair storage system using distributed storage technology to ensure data security and traceability. This step achieves structured accumulation of task knowledge, significantly improving the targeting of knowledge extraction and the convenience of subsequent reuse compared to traditional indiscriminate storage.

[0006] Step S2: The embedded model performs vector transformation on the stored key-value pairs to generate vector data containing task knowledge features;

[0007] Step S3: The vector database performs efficient index construction and management of vector data;

[0008] Step S4: When a new task request is received, the AI ​​assistant generates a new task summary and performs vector transformation to ensure that the new task vector and the historical vector are in the same feature space, thus guaranteeing the accuracy of similarity calculation. A unified processing standard avoids feature space offset issues, providing a reliable basis for comparing new and old task knowledge and improving the credibility of the matching results.

[0009] Step S5 involves performing a similarity search in the vector database to match historical task knowledge. The vector database quickly locates candidate similar vectors through index navigation, calculates the semantic relevance between the target vector and candidate vectors using a cosine similarity algorithm, outputs the Top N results in descending order of similarity, and returns the corresponding historical task key-value pairs. This step achieves a "semantic similarity equals matching" retrieval effect, solving the pain point of "matching fails when expressions differ" in traditional keyword retrieval, and significantly improving the coverage of knowledge reuse.

[0010] Step S6 involves reusing the historical execution process based on the matching results and optimizing it to meet the requirements of the new task, thus completing the new task processing. This method achieves efficient reuse of historical experience and personalized adaptation, reducing redundant development costs while ensuring the accuracy of new task processing.

[0011] Step S7 updates the key-value pair storage and vector database, forming a closed loop of task processing – knowledge storage – retrieval and reuse – update iteration. A new key-value pair is constructed by combining the "optimized execution flow" of the new task with its corresponding "task summary," and written to the key-value pair storage system for incremental updates. Simultaneously, the new key-value pair is vectorized and inserted into the vector database, with the index updated synchronously. This step ensures that the optimization experience from each task processing is accumulated into new knowledge, forming a self-learning closed loop. Compared to the traditional "one-time processing" model, this achieves continuous knowledge accumulation.

[0012] Step S8 continues the above process in a loop. As users input tasks, the AI ​​assistant repeats the complete process from S1 to S7. The task experience in the knowledge storage system is continuously enriched, the retrieval and matching accuracy of the vector database is continuously improved, and the optimization efficiency and adaptability of task processing are gradually enhanced. This iterative mechanism enables the AI ​​assistant's capabilities to dynamically evolve with the frequency of use, breaking through the limitations of the traditional AI assistant's "fixed functions" and achieving the effect of "becoming smarter the more it is used."

[0013] Preferably, the process of generating a task summary and constructing {task summary, execution flow} key-value pairs includes:

[0014] The AI ​​assistant summarizes the user's input of the target action and generates a task summary;

[0015] The AI ​​assistant performs tasks and records the execution process;

[0016] The AI ​​assistant uses the task summary as the key and the execution flow as the value to construct key-value pairs {task summary, execution flow} and stores them.

[0017] Preferably, the process of generating vector data containing task knowledge features includes:

[0018] The embedding model generates corresponding context vectors for task summary-execution flow key-value pairs through word vector lookup, context awareness, and feature fusion.

[0019] The embedding model performs aggregation operations on the context vectors to generate a batch of fixed-length numerical arrays, which are the final vectors containing task knowledge features.

[0020] These final vectors, combined with their original key-value pair IDs, are stored together in a vector database.

[0021] Preferably, the process of generating a new task summary and transforming it into a vector includes:

[0022] The process is the same as S1 ~ S3.

[0023] Preferably, the process of matching historical task knowledge includes:

[0024] Vector database index for keyword retrieval;

[0025] The vector database calculates the similarity index between the selected candidate historical vectors and the target vector.

[0026] The candidate historical vectors are sorted in descending order based on the similarity index. The top few most similar historical vectors are selected, and the original {task summary, execution process} key-value pairs corresponding to these vectors are returned to the AI ​​assistant.

[0027] Preferably, the process of reusing historical execution flows and optimizing them to meet the needs of new tasks includes:

[0028] The AI ​​assistant first extracts common steps from the historical execution process that are strongly related to the task type and have no differences, and then reuses them directly.

[0029] AI assistants precisely adjust the reuse process based on the differences between new and historical tasks, including parameter replacement, condition supplementation, and output adaptation.

[0030] The AI ​​assistant automatically verifies the adjusted process to avoid logical conflicts or execution failures.

[0031] The AI ​​assistant executes the task according to the adjusted new task flow.

[0032] Preferably, the process of updating the key-value pair store and vector database includes:

[0033] The AI ​​assistant writes more valuable new task knowledge (key-value pairs of {new task summary--optimized execution flow}) into the underlying storage system;

[0034] If the vector database finds highly similar old key-value pairs in the database, it can choose to overwrite or incrementally store them; if it is a completely new scenario, it can directly add new storage.

[0035] Preferably, the process of enabling AI assistants to learn autonomously and continuously evolve their capabilities includes:

[0036] The logical chain of this closed loop is as follows: new task request → generate target vector → vector database retrieval (matching historical knowledge) → reuse and optimize execution process → complete task → build new key-value pairs → update storage and vector library → new knowledge can be retrieved in the next task;

[0037] First cycle (basic ability): Handle a completely new task with no prior experience, accumulate the first key-value pair and vector, and complete the knowledge accumulation from 0 to 1;

[0038] The second cycle (capability reuse): Process similar tasks, retrieve the first piece of knowledge and optimize it, accumulate more detailed new knowledge, and complete the capability expansion from 1 to N;

[0039] The Nth iteration (capability iteration): handle more complex derivative tasks, retrieve multiple related historical knowledge, integrate and optimize to form a more comprehensive execution process, and achieve capability iteration from N to N+1.

[0040] The beneficial effects of this invention are as follows: By constructing a linkage mechanism of {task summary, execution flow} key-value pair storage, embedding model vector transformation, and vector database retrieval, this invention achieves efficient accumulation and accurate reuse of task knowledge in the context of AI assistant autonomous learning. The AI ​​assistant is responsible for task parsing, summary generation, and key-value pair construction; the embedding model transforms the semantic and logical features contained in the key-value pairs into high-dimensional vectors, providing a quantitative basis for cross-representation similarity matching; through a dynamic adaptation mechanism of "historical process reuse + new requirement optimization," it avoids instruction redundancy and process reconstruction for repetitive tasks, and can make accurate adjustments for new tasks. The synchronous update strategy of key-value pair storage and vector database ensures that the optimization experience of each task processing can be injected into the knowledge system in real time, forming a complete closed loop of "task processing - knowledge storage - retrieval reuse - update iteration." This invention realizes the autonomous accumulation and dynamic updating of task knowledge for AI assistants, significantly reducing operation and maintenance costs and effectively improving the processing efficiency of repetitive and similar tasks; the closed-loop iteration mechanism promotes the continuous evolution of the AI ​​assistant's task processing capabilities, greatly enhancing its adaptability to complex scenarios. Attached Figure Description

[0041] Figure 1This is a flowchart of the AI ​​assistant autonomous learning method based on key-value pair storage and vector retrieval in this invention;

[0042] Figure 2 This is a diagram illustrating the experience replay and feedback mechanism of task key-value pairs and vector database in this invention;

[0043] Figure 3 This is a schematic diagram illustrating a specific implementation process and corresponding algorithm of the present invention. Detailed Implementation

[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] This invention proposes an AI assistant autonomous learning method based on key-value pair storage and vector retrieval, aiming to solve the problem that AI assistants cannot flexibly retrieve and reuse knowledge based on task semantics. This method enables the AI ​​assistant to autonomously accumulate and dynamically update task knowledge, significantly reducing operational costs and improving the efficiency of handling repetitive and similar tasks. Furthermore, it drives the continuous evolution of the AI ​​assistant's task processing capabilities, ultimately greatly enhancing its adaptability to complex scenarios. Figure 1 As shown, the method includes:

[0046] S1: The AI ​​assistant generates a task summary and constructs key-value pairs {task summary, execution flow}, and then stores them.

[0047] The AI ​​assistant first summarizes the user's input target operation to generate an accurate task summary; then it executes the task and records the detailed execution process in real time; finally, it constructs a {task summary, execution process} key-value pair with the task summary as the key and the execution process as the value and completes persistent storage.

[0048] S2: The embedding model performs vector transformation on the stored key-value pairs to generate vector data containing task knowledge features.

[0049] Complete transformation of task key-value pairs as follows Figure 2 As shown, the entire process forms a stable cycle starting with "user input" and ending with "capability evolution." The key cycle links can be divided into two stages: "initial knowledge accumulation" and "cyclic reuse iteration." Each stage is closely connected and continuously reinforced.

[0050] First, the AI ​​assistant cleans the text content in the key-value pairs (removing invalid characters and standardizing the format) and performs word segmentation. Then, it is fed into pre-trained embedding models such as Sentence-BERT. The models, combined with contextual semantics, transform the text into a fixed-dimensional high-dimensional vector. The vector dimension and feature weights accurately map the semantic logic and operational features of the task. This method overcomes the limitations of traditional text matching, transforming task knowledge into a machine-quantifiable and comparable form, laying the foundation for matching tasks with similar expressions.

[0051] S3: Vector database for efficient indexing and management of vector data.

[0052] The vector database uses the HNSW indexing algorithm to construct a hierarchical graph structure for the generated vector data. The upper sparse graph enables fast coarse screening, while the lower dense graph completes precise positioning. It also supports incremental insertion, tag deletion, and version management of vector data, and improves the large-scale data processing capability through data sharding and load balancing technologies.

[0053] S4: When a new task request is received, the AI ​​assistant generates a new task summary and performs vector transformation.

[0054] After a new task request is triggered, the AI ​​assistant uses the task summary generation logic of S1 to extract the core semantics of the new task, and then performs vector transformation through the same embedding model parameters and process as S2 to ensure that the new task vector and the historical vector are in the same feature space, thus ensuring the accuracy of similarity calculation.

[0055] S5: Perform similarity retrieval in the vector database, matching historical task knowledge.

[0056] Using the new task vector as the retrieval target, the vector database quickly locates candidate similar vectors through index navigation. A cosine similarity algorithm is then used to calculate the semantic relevance between the target vector and candidate vectors. The Top N results are output in descending order of similarity, and the corresponding historical task key-value pairs are returned. This step achieves a "semantic similarity equals matching" retrieval effect, significantly improving the coverage of knowledge reuse.

[0057] S6: Based on the matching results, reuse the historical execution process and optimize and adjust it in combination with the requirements of new tasks to complete the processing of new tasks.

[0058] S61: Extract the core parameters of the new / old task summary, through... Figure 3 The "difference comparison" markers are different. The AI ​​assistant extracts the historical execution flow with the highest similarity as the basic framework and compares the differences between the new and old task summaries (such as parameters, constraints, output format, etc.).

[0059] S62: Press Figure 3The "Parameter Replacement" category results retain common nodes from the historical process, replacing only the differing parameters. The rule engine automatically replaces variable parameters in the process and adds processing logic for new constraints; if there are new constraints, filtering logic is added.

[0060] S63: via Figure 3 "Process validation" performs legality checks on the adjusted process (such as parameter validity and resource availability checks) to ensure that the process can be executed before completing the new task.

[0061] S7: Update the key-value pair storage and vector database to form a closed loop of task processing -- knowledge storage -- retrieval and reuse -- update iteration.

[0062] This stage is the core of the cycle, corresponding to Figure 3 The feedback loop is "optimized process → vector database". After a new task is completed, a new key-value pair is constructed by "new task summary + Flow_new" and written to the storage system for incremental updates. At the same time, the new key-value pair is vectorized and inserted into the vector database, and the index is updated, realizing a closed loop of "knowledge reuse-optimization-update". The corresponding process nodes are: vector database → index search keywords → vector data containing task features → update optimized key-value pairs → execute task → AI assistant output → new task request, forming a perpetual loop.

[0063] The "optimized execution flow" of the new task is used to construct a new key-value pair with the corresponding "task summary", which is then written to the key-value pair storage system to achieve incremental updates. At the same time, the new key-value pair is converted into a vector and inserted into the vector database, and the index is updated synchronously.

[0064] S8: Continuously cycle through the above process to enable the AI ​​assistant to learn autonomously and continuously evolve its capabilities.

[0065] As users continuously input tasks, the AI ​​assistant repeats the complete process from S1 to S7. The task experience in the knowledge storage system is continuously enriched, the retrieval and matching accuracy of the vector database is constantly improved, and the optimization efficiency and adaptability of task processing are gradually enhanced. Through three dimensions—"retrieval result feedback," "process optimization feedback," and "knowledge update feedback"—the loop is ensured not only to "keep spinning" but also to "spin well," achieving capability evolution.

[0066] The above-described embodiments further illustrate the purpose, technical solution, and advantages of the present invention. It should be understood that the above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made to the present invention within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A self-learning method for AI assistants based on key-value pair storage and vector retrieval, characterized in that, include: Step S1: The AI ​​assistant generates a task summary and constructs key-value pairs {task summary, execution flow}, and completes storage. Step S2: The embedded model performs vector transformation on the stored key-value pairs to generate vector data containing task knowledge features; Step S3: The vector database performs efficient index construction and management of vector data; Step S4: When a new task request is received, the AI ​​assistant generates a new task summary and performs vector transformation. Step S5: Perform similarity retrieval in the vector database to match historical task knowledge; Step S6: Based on the matching results, reuse the historical execution process and optimize and adjust it in combination with the new task requirements to complete the new task processing; Step S7: Update the key-value pair storage and vector database to form a closed loop of task processing -- knowledge storage -- retrieval and reuse -- update iteration; Step S8: Continue the above process in a loop to enable the AI ​​assistant to learn autonomously and continuously evolve its capabilities.

2. The AI ​​assistant autonomous learning method based on key-value pair storage and vector retrieval according to claim 1, characterized in that, The process of generating a task summary and constructing {task summary, execution flow} key-value pairs includes: The AI ​​assistant summarizes the user's input of the target action and generates a task summary; The AI ​​assistant performs tasks and records the execution process; The AI ​​assistant uses the task summary as the key and the execution flow as the value to construct key-value pairs {task summary, execution flow} and stores them.

3. The AI ​​assistant autonomous learning method based on key-value pair storage and vector retrieval according to claim 1, characterized in that, The process of generating vector data containing task-specific knowledge features includes: The embedding model generates corresponding context vectors for key-value pairs {task summary, execution flow} by word vector lookup, context awareness and feature fusion. The embedding model performs aggregation operations on the context vectors to generate a batch of fixed-length numerical arrays, which are the final vectors containing task knowledge features. These final vectors, combined with their original key-value pair IDs, are stored together in a vector database.

4. The AI ​​assistant autonomous learning method based on key-value pair storage and vector retrieval according to claim 1, characterized in that, The process of generating a new task summary and transforming it into a vector includes: The process is the same as S1 ~ S3.

5. The AI ​​assistant autonomous learning method based on key-value pair storage and vector retrieval according to claim 1, characterized in that, The process of matching historical task knowledge includes: Vector database index for keyword retrieval; The vector database calculates the similarity index between the selected candidate historical vectors and the target vector. The candidate historical vectors are sorted in descending order based on the similarity index. The top few most similar historical vectors are selected, and the original {task summary, execution process} key-value pairs corresponding to these vectors are returned to the AI ​​assistant.

6. The AI ​​assistant autonomous learning method based on key-value pair storage and vector retrieval according to claim 1, characterized in that, The process of reusing historical execution processes and optimizing them to meet the needs of new tasks includes: The AI ​​assistant first extracts common steps from the historical execution process that are strongly related to the task type and have no differences, and then reuses them directly. AI assistants precisely adjust the reuse process based on the differences between new and historical tasks, including parameter replacement, condition supplementation, and output adaptation. The AI ​​assistant automatically verifies the adjusted process to avoid logical conflicts or execution failures. The AI ​​assistant executes the task according to the adjusted new task flow.

7. The AI ​​assistant autonomous learning method based on key-value pair storage and vector retrieval according to claim 1, characterized in that, The process of updating key-value store and vector database includes: The AI ​​assistant writes more valuable new task knowledge (key-value pairs of {new task summary, optimized execution flow}) into the underlying storage system; If the vector database finds highly similar old key-value pairs in the database, it can choose to overwrite or incrementally store them; if it is a completely new scenario, it can directly add new storage.

8. The AI ​​assistant autonomous learning method based on key-value pair storage and vector retrieval according to claim 1, characterized in that, The process of enabling AI assistants to learn autonomously and continuously evolve their capabilities includes: The logical chain of this closed loop is as follows: new task request → generate target vector → vector database retrieval (matching historical knowledge) → reuse and optimize execution process → complete task → build new key-value pairs → update storage and vector library → new knowledge can be retrieved in the next task; First cycle (basic ability): Handle a completely new task with no prior experience, accumulate the first key-value pair and vector, and complete the knowledge accumulation from 0 to 1; The second cycle (capability reuse): Process similar tasks, retrieve the first piece of knowledge and optimize it, accumulate more detailed new knowledge, and complete the capability expansion from 1 to N; The Nth iteration (capability iteration): handle more complex derivative tasks, retrieve multiple related historical knowledge, integrate and optimize to form a more comprehensive execution process, and achieve capability iteration from N to N+1.