Agent memory adaptive retrieval method and system based on feature separation

CN122733937BActive Publication Date: 2026-10-27GUANGZHOU SKYLAND INFORMATION TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202611168841.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-10-27
Estimated Expiration
2046-08-04

AI Technical Summary

Technical Problem

[0007]本发明的目的在于克服现有技术的缺点,解决现有技术中大模型智能体在长时程交互中关键细节遗忘、级联计算开销大以及隐性人设漂移的技术问题,提供一种基于特征分离的智能体记忆自适应检索方法及系统

Benefits of technology

1、通过时间戳信息和初始检索关联度得分校正候选历史事件节点的最终情景相关性权重,并根据情景信息熵分布控制候选节点的筛选范围,能够优先保留与当前查询相关且具有参考价值的历史信息,减少瞬时噪声和低价值数据进入后续装配过程;由此可降低输入数据规模和模型解码开销,缓解历史会话数据持续增加造成的注意力分散问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122733937B_ABST
    Figure CN122733937B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of large model intelligent agent memory retrieval, and relates to an intelligent agent memory adaptive retrieval method and system based on feature separation, comprising: converting a query text into a feature vector and activating a three-path channel, obtaining situational features, semantic features and procedural features, and combining historical nodes into a to-be-assembled set; applying bit-by-bit logical arbitration to the situational features and the semantic features according to a gating threshold and a mask vector, and deleting corresponding data segments from the to-be-assembled set when logical exclusion occurs; converting the procedural features into a directed acyclic graph, filling residual data segments and state feature vectors into corresponding slots, serializing the directed acyclic graph into a matrix along a topological flow direction to construct a state tensor and write the state tensor into a buffer base address, and the application eliminates heterogeneous feature conflicts through gating threshold and mask arbitration, assembles a long context state tensor under topological constraints, and reduces resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of large-scale intelligent agent memory retrieval technology, and relates to an intelligent agent memory adaptive retrieval method and system based on feature separation. Background Technology

[0002] Currently, using large language models to dynamically control the memory of historical conversation information in multi-turn, long-term interactions has become a core approach for building large-scale intelligent agents and role-based dynamic interactions. However, existing technologies still have limitations in handling cross-level contextual logic, adaptive flow of memory in multiple forms, and consistency constraints on the expression style of role personality.

[0003] First, there is the hierarchical retrieval technology based on temporal decay mechanism and static personality bias. For example, Chinese invention patent application CN121743515A discloses a hierarchical memory and context-aware retrieval method and related products for a large role model. It uses a short-term-medium-long-term memory architecture in conjunction with semantic vectors with personality bias to perform a two-stage retrieval. Its drawback is that the scheme is essentially an open-loop weight decay elimination based on relative time intervals. The decision logic lacks a rigid mechanism to highlight and retain sparse high-value plot information that is called infrequently but has a temporal locking effect on long-term causal chains. As the working context increases disorderly with the number of interaction rounds, the cumulative forgetting of key details and background is inevitable.

[0004] Second, there is the hybrid memory transfer technology based on multi-channel prediction models. For example, Chinese invention patent application CN121599075A discloses a hybrid memory management method and system for large model agents. It uses a multi-channel fully connected neural network to fuse semantic content and habitual features to predict the storage and upgrade of user memory items across multiple storage levels. Its drawbacks are: this technology focuses on using an external open-loop predictor to perform fine-grained segmentation, and introduces cascaded neural network models for forward computation on the core link of online real-time interaction. In high-concurrency and long-cycle scenarios, this can easily lead to computational overhead and response latency. Moreover, its operation of forcibly upgrading external high-frequency memory to the internal parameters of the large model without restriction lacks smooth control, which can easily cause catastrophic forgetting of the deep learning model at the physical level and undermine the stability of the basic capabilities of the base large model.

[0005] Third, context compression techniques based on single-parent path tree graph structure and token budget; for example, Chinese invention patent application CN121009188A discloses a large model context control system and method based on hierarchical memory and association graph, which uses tree graph hybrid topology combined with rolling compression and conclusion reconstruction algorithms to dynamically budget control the input context. Its shortcomings are: this scheme regards the interaction history as a physical folding and text pruning unit of pure token space, ignoring the soft continuous constraints of role setting and behavioral style in the long-term multi-turn output of generative models, which can easily induce implicit character drift after global reconstruction of the context; at the same time, the rigid constraint of single-parent path of child nodes imposed by its topological structure artificially severs the horizontal network cross-association between highly coupled sub-context topics in complex multi-threaded discussions, making it difficult for the system to support deep and divergent cross-path joint reasoning.

[0006] Therefore, the technical problem to be solved by this invention is how to construct a context control method and system with lightweight adaptive flow perception and persona consistency boundary constraints, so that historical conversation information can converge to a stable logic and style space while taking into account high-fidelity semantic compression. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of the prior art and solve the technical problems of forgetting key details, large cascade computation overhead, and implicit persona drift in long-term interactions of large model intelligent agents. It provides an intelligent agent memory adaptive retrieval method and system based on feature separation.

[0008] To achieve the above-mentioned objectives, this invention provides an intelligent agent memory adaptive retrieval method based on feature separation, comprising the following steps: Step S101, convert the query vector to obtain three features and combine them: convert the current original query text into a query feature vector, and activate three independent retrieval channels to obtain context features composed of multiple candidate historical event nodes, semantic features containing user status, and procedural features containing solutions, and combine multiple candidate historical event nodes into a set to be assembled. Step S102, apply bit-by-bit logical arbitration to complete conflict filtering: based on the information entropy of the scenario node, control the gate threshold and apply bit-by-bit logical arbitration to the scenario features and semantic features in conjunction with the binary semantic preference mask vector. When logical mutual exclusion is detected, the scenario data fragment of the corresponding mutually exclusive feature is deleted from the set to be assembled to complete the conflict filtering. Step S103, Constructing a state tensor and writing it into memory to drive inference: The filtered and retained procedural features are converted into a directed acyclic graph of procedural operations as a temporal constraint structure. The scenario data fragments remaining in the set to be assembled after filtering are filled into the data slots of the directed acyclic graph of procedural operations as local context variables. At the same time, the multi-dimensional state feature vector extracted from semantic features is injected into the global control attribute slot as a global configuration parameter. The feature matrix is ​​serialized along the topological flow of the directed acyclic graph of procedural operations to construct a context state tensor. The context state tensor is directly written into the base address of the memory buffer of the specific computational model to drive the specific computational model to reason under the constraints of logical dependency chains.

[0009] Step S102 of the present invention includes the following steps: Step S1021, calculate the context information entropy distribution value of each candidate historical event node, and activate the filtering channel when the context information entropy distribution value is lower than or equal to the context node information entropy control gate threshold; Step S1022, when the filtering channel is activated, perform a bitwise logical AND operation on the state feature matrix and binary semantic preference mask vector of each candidate historical event node, activate the conflict flag bit when logical mutual exclusion occurs, and delete the candidate historical event node whose conflict flag bit is in the active state from the set to be assembled.

[0010] Step S101 of the present invention includes the following steps: Step S1011, binding the conversational content, the external tool flow information called, and the returned result data in the interactive content together to assemble them into candidate historical event nodes; Step S1012, writing the candidate historical event nodes completely into the local relational database to establish a conversation memory for preserving historical event details, which serves as the data source for subsequent extraction of local context variables.

[0011] Step S101 of the present invention includes the following steps: Step S1013, extracting user coding preference features, project file structure habit data, and work time pattern parameters from cross-session historical interaction records; Step S1014, applying inference to the coding preference features, project file structure habit data, and work time pattern parameters through the user modeling module to extract the user's implicit preference state, so as to construct a multi-dimensional state feature vector and store it in the persistent memory management component.

[0012] Step S103 of the present invention includes the following steps: Step S1031, the syntax tree parsing operator performs lexical and syntactic analysis on the task solution specification file contained in the programmatic features, and parses out the discrete nodes representing operation steps and the directional edges representing logical flow, and constructs a directed acyclic graph of programmatic operations.

[0013] Step S102 of the present invention includes the following steps: Step S1023, obtaining the timestamp information corresponding to each candidate historical event node, and calculating the time-series decay adjustment factor based on the difference between the current system time and the timestamp information, wherein the value range of the time-series decay adjustment factor is 0.01 to 0.05; Step S1024, calculating the initial retrieval relevance score of each candidate historical event node, and applying a nonlinear penalty to reconstruct the initial retrieval relevance score using the time-series decay adjustment factor to generate the final scenario relevance weight of each candidate historical event node.

[0014] Step S103 of the present invention includes the following steps: Step S1032, under the topological constraints of the directed acyclic graph constructed by the procedural operation, the multidimensional state feature vector is mapped to the control parameter matrix; Step S1033, the control parameter matrix is ​​written into the global control attribute slot of the directed acyclic graph of the procedural operation to regulate the global attention bias of a specific computational model.

[0015] Step S103 of the present invention includes the following steps: Step S1034, determining the linear order of each discrete node in the directed acyclic graph of procedural operations according to the topological sorting algorithm; Step S1035, reading the node data structure filled with local context variables and global configuration parameters in the linear order, splicing them into a feature matrix, and constructing the context state tensor.

[0016] Step S103 of the present invention includes the following steps: Step S1036, after completing the serialization of the feature matrix, accurately locate the physical memory region allocated by the specific computing model; Step S1037, overwrite the context state tensor into the base address of the memory buffer corresponding to the physical memory region, directly provide an input stream with logical dependency chain constraints, and drive the specific computing model to complete inference.

[0017] This invention also provides an intelligent agent memory adaptive retrieval system based on feature separation, which is used to implement an intelligent agent memory adaptive retrieval method based on feature separation, including: The feature acquisition module is used to convert the current original query text into a query feature vector, and concurrently activate three independent retrieval channels to acquire contextual features composed of multiple candidate historical event nodes, semantic features containing user status, and procedural features containing solutions, and combine multiple candidate historical event nodes into a set to be assembled. The conflict filtering module is used to apply bit-by-bit logical arbitration to the context features and semantic features based on the context node information entropy control threshold and the binary semantic preference mask vector. When logical mutual exclusion is detected, the context data fragment of the corresponding mutually exclusive feature is deleted from the set to be assembled, thus completing the conflict filtering. The inference-driven module is used to convert the filtered and retained procedural features into a directed acyclic graph of procedural operations as a temporal constraint structure. It fills the data slots of the directed acyclic graph of procedural operations as local context variables by filtering the remaining scenario data fragments in the set to be assembled. At the same time, it injects the multi-dimensional state feature vector extracted from semantic features as global configuration parameters into the global control attribute slots. It serializes the feature matrix along the topological flow of the directed acyclic graph of procedural operations to construct the context state tensor. The context state tensor is then directly written into the base address of the memory buffer of the specific computational model, driving the specific computational model to infer under the constraints of logical dependency chains.

[0018] Compared with the prior art, the present invention has at least the following beneficial effects: 1. By correcting the final context relevance weight of candidate historical event nodes through timestamp information and initial retrieval relevance scores, and controlling the selection range of candidate nodes according to the context information entropy distribution, we can prioritize the retention of historical information that is relevant to the current query and has reference value, reducing instantaneous noise and low-value data from entering the subsequent assembly process. This can reduce the scale of input data and model decoding overhead, and alleviate the attention distraction problem caused by the continuous increase of historical session data.

[0019] 2. By performing bit-by-bit logical arbitration on candidate historical event nodes through binary semantic preference mask vectors, historical data that conflicts with the current user state, coding preferences, or environmental constraints can be identified and deleted in a timely manner. This method ensures that the retrieved contextual features are consistent with the user's current semantic features, reduces inconsistencies in information caused by changes in user habits, and improves logical consistency across session contexts.

[0020] 3. By using a directed acyclic graph (DAG) to store the sequence and logical dependencies between operation steps, and assembling local context variables and global configuration parameters under this topological constraint, it is possible to avoid the disordered splicing of data from different sources. The resulting context state tensor has a clear content location and dependency relationship, enabling a specific computational model to complete reasoning according to a predetermined logical dependency chain, thereby improving the coherence of long context organization and the interpretability of the reasoning process. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the main steps of feature retrieval in this invention; Figure 2 This is a schematic diagram of the state machine logic evolution process of the present invention. Detailed Implementation

[0022] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments and accompanying drawings.

[0023] Example 1: This embodiment discloses an intelligent agent memory adaptive retrieval method based on feature separation, applicable to computer systems based on specific computational models, including the following steps: Step S101, convert the query vector to obtain three features and combine them: convert the current original query text into a query feature vector, and activate three independent retrieval channels to obtain context features composed of multiple candidate historical event nodes, semantic features containing user status, and procedural features containing solutions, and combine multiple candidate historical event nodes into a set to be assembled. Step S102, apply bit-by-bit logical arbitration to complete conflict filtering: based on the information entropy of the scenario node, control the gate threshold and apply bit-by-bit logical arbitration to the scenario features and semantic features in conjunction with the binary semantic preference mask vector. When logical mutual exclusion is detected, the scenario data fragment of the corresponding mutually exclusive feature is deleted from the set to be assembled to complete the conflict filtering. Step S103, Constructing a state tensor and writing it into memory to drive inference: The filtered and retained procedural features are converted into a directed acyclic graph of procedural operations as a temporal constraint structure. The scenario data fragments remaining in the set to be assembled after filtering are filled into the data slots of the directed acyclic graph of procedural operations as local context variables. At the same time, the multi-dimensional state feature vector extracted from semantic features is injected into the global control attribute slot as a global configuration parameter. The feature matrix is ​​serialized along the topological flow of the directed acyclic graph of procedural operations to construct a context state tensor. The context state tensor is directly written into the base address of the memory buffer of the specific computational model to drive the specific computational model to reason under the constraints of logical dependency chains.

[0024] Step S102 in this embodiment includes the following steps: Step S1021, calculate the scenario information entropy distribution value of each candidate historical event node, and activate the filtering channel when the scenario information entropy distribution value is lower than or equal to the scenario node information entropy control gate threshold; Step S1022, when the filtering channel is activated, perform a bitwise logical AND operation on the state feature matrix and binary semantic preference mask vector of each candidate historical event node, activate the conflict flag bit when logical mutual exclusion occurs, and delete the candidate historical event node whose conflict flag bit is in the active state from the set to be assembled.

[0025] Step S101 in this embodiment includes the following steps: Step S1011, binding the conversational content, the external tool flow information called, and the returned result data in the interactive content together to assemble them into candidate historical event nodes; Step S1012, writing the candidate historical event nodes completely into the local relational database to establish a conversation memory bank for preserving historical event details, which serves as the data source for subsequent extraction of local context variables.

[0026] Step S101 in this embodiment includes the following steps: Step S1013, extracting user coding preference features, project file structure habit data, and work time pattern parameters from cross-session historical interaction records; Step S1014, applying inference to the coding preference features, project file structure habit data, and work time pattern parameters through the user modeling module to extract the user's implicit preference state, so as to construct a multi-dimensional state feature vector and store it in the persistent memory management component.

[0027] Step S103 in this embodiment includes the following steps: Step S1031, the syntax tree parsing operator performs lexical and syntactic analysis on the task solution specification file contained in the procedural features, and parses out the discrete nodes representing operation steps and the directional edges representing logical flow, and constructs a directed acyclic graph of procedural operations.

[0028] Step S102 in this embodiment includes the following steps: Step S1023, obtaining the timestamp information corresponding to each candidate historical event node, and calculating the time-series decay adjustment factor based on the difference between the current system time and the timestamp information, wherein the value range of the time-series decay adjustment factor is 0.01 to 0.05; Step S1024, calculating the initial retrieval relevance score of each candidate historical event node, and applying a nonlinear penalty to reconstruct the initial retrieval relevance score using the time-series decay adjustment factor to generate the final scenario relevance weight of each candidate historical event node.

[0029] Step S103 in this embodiment includes the following steps: Step S1032, under the topological constraints of the directed acyclic graph constructed by the procedural operation, the multidimensional state feature vector is mapped to the control parameter matrix; Step S1033, the control parameter matrix is ​​written into the global control attribute slot of the directed acyclic graph of the procedural operation to regulate the global attention bias of a specific computational model.

[0030] Step S103 in this embodiment includes the following steps: Step S1034, determining the linear order of each discrete node in the directed acyclic graph of procedural operations according to the topological sorting algorithm; Step S1035, reading the node data structure filled with local context variables and global configuration parameters in the linear order, splicing them into a feature matrix, and constructing the context state tensor.

[0031] Step S103 in this embodiment includes the following steps: Step S1036, after completing the serialization of the feature matrix, accurately locate the physical memory region allocated by the specific computing model; Step S1037, overwrite the context state tensor into the base address of the memory buffer corresponding to the physical memory region, directly provide an input stream with logical dependency chain constraints, and drive the specific computing model to complete inference.

[0032] This embodiment also provides an intelligent agent memory adaptive retrieval system based on feature separation, including: The feature acquisition module is used to convert the current original query text into a query feature vector, and concurrently activate three independent retrieval channels to acquire contextual features composed of multiple candidate historical event nodes, semantic features containing user status, and procedural features containing solutions, and combine multiple candidate historical event nodes into a set to be assembled. The conflict filtering module is used to apply bit-by-bit logical arbitration to the context features and semantic features based on the context node information entropy control threshold and the binary semantic preference mask vector. When logical mutual exclusion is detected, the context data fragment of the corresponding mutually exclusive feature is deleted from the set to be assembled, thus completing the conflict filtering. The inference-driven module is used to convert the filtered and retained procedural features into a directed acyclic graph of procedural operations as a temporal constraint structure. It fills the data slots of the directed acyclic graph of procedural operations as local context variables by filtering the remaining scenario data fragments in the set to be assembled. At the same time, it injects the multi-dimensional state feature vector extracted from semantic features as global configuration parameters into the global control attribute slots. It serializes the feature matrix along the topological flow of the directed acyclic graph of procedural operations to construct the context state tensor. The context state tensor is then directly written into the base address of the memory buffer of the specific computational model, driving the specific computational model to infer under the constraints of logical dependency chains.

[0033] Example 2: In this embodiment, a continuously running distributed intelligent agent is employed. The system receives the current original query text containing multiple task instructions, divides the text into terms arranged in the original order using a word segmentation operator, and then converts each term into a numerical representation and combines them sequentially to form a query feature vector. The specific computational model employs a computational model with an addressable memory buffer and processes input features based on attention weights. The system then uses the query feature vector... Three independent retrieval channels are activated concurrently. The first channel reads the context features consisting of multiple candidate historical event nodes from the session memory established by the local SQLite relational database. The second channel reads the semantic features containing the user state from the persistent memory management component. The third channel reads the procedural features containing the solution from the independent Markdown task solution specification file and combines multiple candidate historical event nodes into a set to be assembled.

[0034] The system reads the timestamp information of each candidate historical event node. And the initial retrieval relevance score output by the full-text search operator. Calculate the current system time With timestamp information The differences are normalized according to the time span of the current candidate node and mapped to a value range of 0.01 to 0.05 to obtain the time decay adjustment factor of the corresponding node. In this embodiment The value is set to 0.03; subsequently, the initial retrieval relevance score is calculated according to the following formula. Apply nonlinear penalty to reconstruct the final scenario relevance weights. : ;in, Indicates the first The final context relevance weight of each candidate historical event node. This indicates the initial retrieval relevance score for this node. Indicates the current system time. This represents the timestamp information of the node. This represents the timing decay adjustment factor calculated based on the difference between the two; when Below 0.01, the temporal decay rate of historical events is slow, long-period transient noise data is difficult to filter, and the feature buffer is easily overloaded. When the value is higher than 0.05, the time series decay rate is relatively fast, and candidate historical event nodes with long-term reference value may be over-penalized. Therefore, through multiple sets of discrete comparison experiments, its value range was determined to be 0.01 to 0.05, and in this embodiment, it is taken as 0.03; the system is based on the final scenario relevance weight. Candidate historical event nodes are sorted in descending order. The relevance weights of each final scenario are normalized into relative confidence quantifications, and these relative confidence quantifications are used as statistical weights for the state distribution of the corresponding nodes. A probability distribution is formed according to the frequency of occurrence of each state feature. The scenario information entropy distribution value of each candidate historical event node is obtained using the Shannon information entropy calculation formula. Simultaneously, the system monitors the register idle status of a specific computational model, obtains the current processor hardware load ratio, and statistically analyzes the probability distribution of the retrieved output dataset to obtain the Shannon information entropy distribution value of the current scenario features. Then adjust the hardware load ratio and Input a preset linear mapping function, combined with the upper limit of the maximum controllable information entropy. With boundary adjustment coefficient Perform product and difference operations to obtain the scene node information entropy control gate threshold. The slope and intercept of the linear mapping function are calibrated based on the correspondence between the hardware load ratio, Shannon information entropy distribution value, and inference accuracy recorded under standard operating conditions, and the boundary adjustment coefficient. Used to adjust the information entropy control threshold of scene nodes The upper limit of the maximum controllable information entropy The proportion within the range, in this embodiment The value is set to 0.25. A value that is too high will cause the gating condition to exclude some valid scenario features, while a value that is too low will make it difficult to filter out transient noise. Therefore, based on the inference accuracy corresponding to different values ​​under standard operating conditions, 0.25 was determined. The gating threshold is set for scenarios where the scenario information entropy distribution value is lower than or equal to the scenario node information entropy. The system activates the filtering channel for candidate historical event nodes and sends the node to the subsequent bit-by-bit logical arbitration process.

[0035] The system extracts coding preference features, project file structure habits, and work time pattern parameters from cross-session historical interaction records. Through the user modeling module, it normalizes and combines these three types of data according to a preset correspondence between the data and vector dimensions, extracting the user's implicit preference states, constructing a multi-dimensional state feature vector, and storing it in the persistent memory management component. After the filtering channel is activated, the system compares the continuous feature values ​​of each dimension in the multi-dimensional state feature vector with the corresponding judgment thresholds. If the value exceeds the judgment threshold, the corresponding binary bit is assigned a value of 1; otherwise, it is assigned a value of 0, forming a binary semantic preference mask vector. The binary bits with a value of 1 indicate that the corresponding user state constraint is active. Before performing bit-by-bit logical arbitration, the system performs symbolic normalization processing on the state feature matrix of the candidate historical event nodes, extracts the positive or negative sign state or active state Boolean value of each element in the matrix, and converts it into a binary semantic preference mask vector. A discrete Boolean state array of the same dimension, where a state bit with a value of 1 indicates that there is a record in the candidate historical event node that is opposite to the corresponding user state constraint; the system calls the bitwise AND instruction of the underlying arithmetic logic unit to perform a bitwise AND operation on the discrete Boolean state array and the binary semantic preference mask vector. Apply a bitwise AND operation. When a non-zero conflicting bit appears in the result, it is determined that the corresponding state feature and the user state constraint are logically mutually exclusive. Set the conflict flag of the candidate historical event node to 1 and delete the corresponding candidate historical event node from the set to be assembled in its original position to complete the conflict filtering.

[0036] The system uses syntax tree parsing operators to perform lexical and syntactic analysis on the task solution specification file contained in the procedural features, parsing out discrete nodes representing operation steps and directional edges representing logical flow, constructing a directed acyclic graph of procedural operations as a temporal constraint structure. Under this topological constraint, the system fills the data slots of each discrete node with the filtered residual scenario data fragments in the set to be assembled as local context variables, and uses multidimensional state feature vectors as global configuration parameters. Following the preset row and column order of the global control attribute slots, the feature values ​​of each dimension are written to the corresponding positions, mapping to form a control parameter matrix. This control parameter matrix is ​​then written into the global control attribute slots of the directed acyclic graph of procedural operations. A specific computational model reads the control parameter matrix when calculating global attention weights and applies the corresponding control parameters to the attention score to regulate the global attention bias. The system sequentially reads the node data structures filled with local context variables and global configuration parameters along the topological flow of the directed acyclic graph of procedural operations, concatenates them into a one-dimensional continuous feature matrix, and constructs a context state tensor. Then, it calls the system's underlying memory management application interface function to locate the physical memory region based on the starting address of the physical memory requested and allocated by the operating system during the initialization phase according to the specific computing model. Then, it uses direct memory access write instructions to transfer the context state tensor. The input stream with logical dependency chain constraints is overwritten into the base address of the memory buffer corresponding to the physical memory region, providing an input stream for a specific computing model and driving the specific computing model to complete inference.

[0037] Example 3: This embodiment verifies the retrieval stability and resource scheduling performance of the proposed method under multi-task loads. A test case library containing 10,000 candidate historical event nodes was established. A sample group and a control group were set up, and user query sequences were simulated on an industrial-grade processor with 32GB of memory. The experimental parameters adopted a three-point support method, setting the node processing time boundaries for the directed acyclic graph of procedural operations to a lower limit of 0.05ms, a median of 0.12ms, and an upper limit of 0.25ms, respectively. A time-series decay adjustment factor was used. Gradient testing was conducted within the range of 0.01 to 0.05, and the scenario node information entropy control threshold was used. Corresponding boundary adjustment coefficient The signal-to-noise ratio (SNR) of background noise data with a range of 0.15 to 0.35 was simultaneously injected into the original input stream to observe the impact of transient interference on the retrieval process. Under the same query sequence pressure, the control group directly input historical data after linear concatenation into a specific calculation model. The sample group of this invention was based on the query feature vector. Three independent retrieval channels are activated concurrently to combine the retrieved candidate historical event nodes into a set to be assembled, and then the timestamp information of each node is read. Relevance score to initial search The system uses the current system time. With timestamp information The difference is used to calculate the timing decay adjustment factor. The initial retrieval relevance score By applying a nonlinear penalty to reconstruct the data, the final scenario relevance weights are obtained. And combine the information entropy of the scenario nodes to control the gate threshold. After screening candidate historical event nodes, under the same noise conditions, the average retrieval response latency of the sample group of this invention was 45.2 ms, while that of the control group was 182.7 ms; the query accuracy of the control group was 78.3%, while that of the sample group of this invention was 96.8%.

[0038] In the conflict filtering test, 1000 queries containing complex tool call processes were selected. After the filtering channel was activated, the system combined the state feature matrix of each candidate historical event node with the binary semantic preference mask vector. A bitwise AND operation is performed; when the tool call state in a node is logically mutually exclusive with the corresponding preference bit, the conflict flag is activated, and the system immediately removes the candidate historical event node from the assembly set in its original position; in the sample of this invention, the nodes that trigger the conflict flag are all in the context state tensor The code was deleted before construction; the control group did not have this bitwise logical arbitration process set up, resulting in 142 invalid tool calls caused by semantic conflicts during the experiment; in the parameter combination test, the time-decay adjustment factor was... Take 0.03, boundary adjustment coefficient When the value is 0.25, after time-series decay and information entropy gating, the system achieves the highest context state tensor assembly accuracy under the current computing resource load. When the time-series decay adjustment factor is lower than the lower limit of the test range, the final scenario relevance weights become less discriminative of old data, and a large number of invalid historical events enter the assembly set, causing the context state tensor to become less accurate. The increase in dimensions leads to a decrease in the inference performance of specific computational models; when the boundary adjustment coefficient is higher than the upper limit of the test interval, the information entropy control threshold of the scenario node increases, some candidate historical event nodes with long-term logical associations are deleted, and the query accuracy decreases accordingly.

[0039] Example 4: This embodiment combines Figures 1 to 2 This paper describes an agent-based adaptive retrieval method and system based on feature separation, such as... Figure 1As shown, the intelligent agent memory adaptive retrieval process based on feature separation includes steps S101, S102 and S103 in sequence. Step S101 transforms the query vector to obtain three features and combines them. Step S102 applies bit-by-bit logic arbitration to complete conflict filtering. Step S103 constructs a state tensor and writes it into memory to drive inference.

[0040] like Figure 2 As shown, the agent's memory adaptive retrieval process starts from the starting node, converts the current original query text into a query feature vector, activates three independent retrieval channels to obtain contextual features, semantic features, and procedural features, and combines them into a set to be assembled. This set consists of multiple candidate historical event nodes. When completing conflict filtering, bit-by-bit logical arbitration is applied based on the gating threshold and the joint mask vector. When logical mutual exclusion is detected, the contextual data fragment corresponding to the mutual exclusion feature is deleted from the set to be assembled. The data remaining in the set to be assembled after filtering, together with the procedural features retained after filtering, are used as local context variables to fill the data slots and the directed acyclic graph of procedural operations. They are serialized along the topological flow to form a feature matrix to construct a context state tensor. After accurately locating the physical memory region, the base address of the memory buffer corresponding to the physical memory region is overwritten and written to the end node, driving the specific computational model to infer under the constraints of logical dependency chains.

[0041] Example 5: In this embodiment, during the operation of a specific computational model, negative instructions and execution failure records in historical interaction logs enter the retrieval process along with candidate historical event nodes, causing semantic interference to the subsequently constructed context state tensor. For these implicit negative event records, this embodiment, after activating three independent retrieval channels and forming a set to be assembled, performs negative event feature separation on the interaction logs of candidate historical event nodes, injects the identification results into the node relevance calculation process, and performs dynamic filtering based on the calculation results. The system calls the negative event feature separation parsing operator to traverse the interaction logs of each candidate historical event node, using a preset negative semantic library for word segmentation and string matching. The negative semantic library stores keyword text with negative meanings; when the corresponding keyword appears in the interaction log, the record is marked as a negative interaction record. The system simultaneously counts the number of instruction failure returns and the total number of calls during the historical execution process of the candidate historical event node, using the ratio of the two as the negative event weight coefficient for that node. ,in, The larger the value, the more negative interaction records and execution failure records the candidate historical event node contains.

[0042] The system will assign negative event weighting coefficients. Final scenario relevance weights applied to candidate historical event nodes The final retrieval relevance score is reconstructed according to the following formula. : ;in, Indicates the first The final retrieval relevance score of each candidate historical event node. This indicates the final scenario relevance weight of the node. This represents the negative event weight coefficient of the node; the system sets the risk judgment threshold to 0.75, which is the negative event weight coefficient of the candidate historical event node. When the value exceeds this threshold, the node is identified as a high-risk disturbance source and removed from the assembly set in situ to prevent it from entering the subsequent context state tensor construction process. To ensure that negative event filtering changes with recent interaction states, the system uses a time sliding window to continuously count the frequency of negative commands in the most recent 100 interactions. and total frequency of interaction and according to and The ratio of the negative event weight coefficient is adjusted. The calibration benchmark; when the ratio reaches 0.4, the system triggers deep backtracking and cleaning, checks branch nodes along the correlation of candidate historical event nodes, and removes nodes with high negative event weight coefficients so that they no longer participate in the assembly of context state tensors; in the test of complex engineering fault diagnosis tasks, after adopting the above-mentioned negative event record targeted injection and dynamic filtering, the effective completion rate of multi-step reasoning tasks increased from 65% to 92%, and the reasoning path deviation rate decreased to below 4%.

[0043] Example 6: In this embodiment, before deploying the system to the runtime environment of a specific computing model, benchmark calibration and discretization calibration are performed first. The system offline loads a set of verification data samples with full coverage distribution characteristics, each sample carrying pre-labeled search tags and corresponding expected inference results. Subsequently, the benchmark running state of the specific computing model is started, and the verification data samples are read sequentially during processor idle cycles, recording the benchmark response latency under conditions of no external interference. and reasoning confidence score During the benchmark calibration process, the system gradually increases the processing load and simultaneously records the memory buffer base address offset and data processing throughput rate of a specific computational model, thereby generating curves showing how these two parameters change with the processing load. When the amount of data processed per unit time reaches 85% of the physical hardware bandwidth, the current data processing throughput rate is recorded as the critical processing saturation point. The system uses the critical processing saturation point. As a benchmark, continuously compare real-time data throughput rates. With critical processing saturation point When the real-time data throughput rate Exceeding the critical processing saturation point At the same time, reduce the sampling trigger frequency of the retrieval channel. Make the context state tensor The data flow density is kept within the effective transmission capacity of the hardware interface.

[0044] After benchmark calibration is completed, the system enters the field operation phase, and the output response deviation of specific computational models is continuously monitored; when the variance of the probability distribution of the inference output results... When the value remains consistently above the preset baseline by 0.12, an adaptive adjustment subroutine is triggered; the system determines the logical processing redundancy based on the difference between the current number of features to be processed and the available processing capacity. The deviation magnitude is obtained based on the difference between the current output and the baseline output. The weighted smoothing operator is calculated according to the following formula. : ;in, In response to the convergence scaling factor, this embodiment uses 0.08; the system will use the weighted smoothing operator. Linear action on the context state tensor The feature values ​​of the corresponding sequence are used to adjust the impact of outlier features on the inference output; the response convergence ratio coefficient is also considered. The variance of the output response deviation is determined based on a specific calculation model; when the deviation fluctuation exceeds the preset baseline, the system processes redundancy according to logic. and deviation amplitude Real-time update of weighted smoothing operator By adjusting Control weighted smoothing operator For context state tensor The strength of the influence of the characteristic values ​​is determined to keep the fluctuation of the output results within the allowable range of engineering.

[0045] Example 7: This embodiment provides an agent-based memory adaptive retrieval system based on feature separation, including a feature acquisition module, a conflict filtering module, and an inference-driven module. Each module is deployed in a computer system based on a specific computing model. Candidate historical event nodes are passed through a set to be assembled in memory, and data processing is performed in the order of feature acquisition, conflict filtering, and inference-driven processing. After receiving the current original query text, the feature acquisition module converts it into a query feature vector and activates three independent retrieval channels concurrently. The contextual retrieval channel reads contextual features composed of multiple candidate historical event nodes from the session memory bank, the semantic retrieval channel reads semantic features containing user state from the persistent memory management component, and the procedural retrieval channel reads procedural features containing the solution from the task solution specification file. The feature acquisition module writes the three retrieval results into the corresponding data area and combines multiple candidate historical event nodes into a set to be assembled before passing it to the conflict filtering module.

[0046] The conflict filtering module reads the context information entropy distribution value of each candidate historical event node and compares it with the context node information entropy control threshold. When the context information entropy distribution value is lower than or equal to the context node information entropy control threshold, the filtering channel is activated, and a bitwise logical AND operation is performed on the state feature matrix and binary semantic preference mask vector of the candidate historical event node. When the operation result shows logical mutual exclusion, the conflict filtering module activates the conflict flag bit of the corresponding node and removes the candidate historical event node from the assembly set in its original position. Candidate historical event nodes that do not show logical mutual exclusion remain in the assembly set. After completing the conflict filtering, the inference-driven module uses the syntax tree parsing operator to perform lexical and syntactic analysis on the task solution specification file in the procedural features, generating discrete nodes representing operation steps and directional edges representing logical flow, and constructing a directed acyclic loop for procedural operations accordingly. The inference-driven module uses the scenario data fragments retained in the set to be assembled as local context variables to fill the data slots of the corresponding discrete nodes. At the same time, it maps the multi-dimensional state feature vectors extracted from semantic features into control parameter matrices and writes the control parameter matrix as global configuration parameters into the global control attribute slots to regulate the global attention bias of the specific computing model. The inference-driven module determines the linear order of each discrete node according to the topological sorting algorithm, reads the node data structures filled with local context variables and global configuration parameters in sequence, concatenates them into a feature matrix, and constructs a context state tensor. Subsequently, the inference-driven module locates the physical memory region allocated to the specific computing model, overwrites the context state tensor into the base address of the memory buffer corresponding to the physical memory region, provides an input stream with logical dependency chain constraints for the specific computing model, and drives the specific computing model to complete inference.

Claims

1. An agent-based adaptive retrieval method based on feature separation, characterized in that, Includes the following steps: Step S101: Convert the current original query text into a query feature vector, and concurrently activate three independent retrieval channels to obtain context features composed of multiple candidate historical event nodes, semantic features containing user status, and procedural features containing solutions, and combine multiple candidate historical event nodes into a set to be assembled. Step S102: Based on the information entropy of the scenario node, control the gate threshold and combine the binary semantic preference mask vector to apply bit-by-bit logical arbitration to the scenario features and semantic features. When logical mutual exclusion is detected, the scenario data fragment corresponding to the mutual exclusion feature is deleted from the set to be assembled, thus completing the conflict filtering. Step S103: The filtered and retained procedural features are converted into a procedural operation directed acyclic graph as a temporal constraint structure. The scenario data fragments remaining in the set to be assembled after filtering are filled into the data slots of the procedural operation directed acyclic graph as local context variables. At the same time, the multi-dimensional state feature vector extracted from the semantic features is injected into the global control attribute slot as a global configuration parameter. The feature matrix is ​​serialized along the topological flow of the procedural operation directed acyclic graph to construct the context state tensor. The context state tensor is directly written into the base address of the memory buffer of the specific computing model to drive the specific computing model to reason under the constraints of the logical dependency chain. Step S102 includes the following steps: Step S1021, calculate the scenario information entropy distribution value of each candidate historical event node, and activate the filtering channel when the scenario information entropy distribution value is lower than or equal to the scenario node information entropy control gate threshold; Step S1022, when the filtering channel is activated, perform a bitwise logical AND operation on the state feature matrix and binary semantic preference mask vector of each candidate historical event node, activate the conflict flag bit when logical mutual exclusion occurs, and delete the candidate historical event node whose conflict flag bit is in the active state from the set to be assembled in situ. Step S103 includes the following steps: Step S1032, under the topological constraints of the directed acyclic graph constructed by the procedural operation, the multidimensional state feature vector is mapped to the control parameter matrix; Step S1033, the control parameter matrix is ​​written into the global control attribute slot of the directed acyclic graph of the procedural operation to regulate the global attention bias of the specific computational model.

2. The agent-based adaptive retrieval method based on feature separation according to claim 1, characterized in that, Step S101 includes the following steps: Step S1011, binding the conversational content, the external tool flow information called, and the returned result data in the interaction content together to assemble them into candidate historical event nodes; Step S1012, writing the candidate historical event nodes completely into the local relational database to establish a conversation memory bank for preserving historical event details, which serves as the data source for subsequent extraction of local context variables.

3. The agent-based adaptive retrieval method based on feature separation according to claim 1, characterized in that, Step S101 includes the following steps: Step S1013, extracting user coding preference features, project file structure habit data, and work time pattern parameters from cross-session historical interaction records; Step S1014, applying inference to the coding preference features, project file structure habit data, and work time pattern parameters through the user modeling module to extract the user's implicit preference state, so as to construct a multi-dimensional state feature vector and store it in the persistent memory management component.

4. The agent-based adaptive retrieval method based on feature separation according to claim 1, characterized in that, Step S103 includes the following steps: Step S1031, the syntax tree parsing operator performs lexical and syntactic analysis on the task solution specification file contained in the procedural features, parses out discrete nodes representing operation steps and directional edges representing logical flow, and constructs a directed acyclic graph of procedural operations.

5. The intelligent agent memory adaptive retrieval method based on feature separation according to claim 1, characterized in that, Step S102 includes the following steps: Step S1023, obtain the timestamp information corresponding to each candidate historical event node, and calculate the time-series decay adjustment factor based on the difference between the current system time and the timestamp information, wherein the value range of the time-series decay adjustment factor is 0.01 to 0.05; Step S1024, calculate the initial retrieval relevance score of each candidate historical event node, and apply a nonlinear penalty to the initial retrieval relevance score using the time-series decay adjustment factor to reconstruct the final scenario relevance weight of each candidate historical event node.

6. The agent-based adaptive retrieval method based on feature separation according to claim 1, characterized in that, Step S103 includes the following steps: Step S1034, determine the linear order of each discrete node in the directed acyclic graph of procedural operations according to the topological sorting algorithm; Step S1035, read the node data structure filled with local context variables and global configuration parameters in the linear order, concatenate them into a feature matrix, and construct the context state tensor.

7. The agent-based adaptive retrieval method based on feature separation according to claim 1, characterized in that, Step S103 includes the following steps: Step S1036, after completing the serialization of the feature matrix, accurately locate the physical memory region allocated by the specific computing model; Step S1037, overwrite the context state tensor into the base address of the memory buffer corresponding to the physical memory region, directly provide an input stream with logical dependency chain constraints, and drive the specific computing model to complete inference.

8. A feature-separation-based agent-memory adaptive retrieval system, used to implement the feature-separation-based agent-memory adaptive retrieval method of claim 1, characterized in that, include: The feature acquisition module is used to convert the current original query text into a query feature vector, and concurrently activate three independent retrieval channels to acquire contextual features consisting of multiple candidate historical event nodes, semantic features containing user status, and procedural features containing solutions, and combine multiple candidate historical event nodes into a set to be assembled. The conflict filtering module is used to apply bit-by-bit logical arbitration to scenario features and semantic features based on the scenario node information entropy control threshold and the binary semantic preference mask vector. When logical mutual exclusion is detected, the scenario data fragment with the corresponding mutually exclusive feature is deleted from the assembly set to complete the conflict filtering. Specifically, the scenario information entropy distribution value of each candidate historical event node is calculated. When the scenario information entropy distribution value is lower than or equal to the scenario node information entropy control threshold, the filtering channel is activated. When the filtering channel is activated, the state feature matrix of each candidate historical event node is subjected to a bit-by-bit logical AND operation with the binary semantic preference mask vector. When logical mutual exclusion occurs, the conflict flag is activated, and the candidate historical event node with the conflict flag activated is deleted from the assembly set in situ. The inference-driven module converts the filtered and retained procedural features into a directed acyclic graph (DAG) of procedural operations as a temporal constraint structure. It fills the data slots of the DAG as local context variables by filtering residual scenario data fragments from the assembly set. Simultaneously, it injects multi-dimensional state feature vectors extracted from semantic features as global configuration parameters into global control attribute slots. These vectors are serialized along the topological flow of the DAG into feature matrices to construct a context state tensor, which is then directly written into the base address of the memory buffer of a specific computational model, driving the model to infer under logical dependency chain constraints. Specifically, under the topological constraints constructed by the DAG, the multi-dimensional state feature vectors are mapped to control parameter matrices. These control parameter matrices are written into the global control attribute slots of the DAG to regulate the global attention bias of the specific computational model.

Citation Information

Patent Citations

  • Large model context control system and method based on hierarchical memory and association graph

    CN121009188A

  • Hybrid memory management method and system for large model agent

    CN121599075A

  • Hierarchical memory and context awareness retrieval method of role large model and related products

    CN121743515A

  • Construction method of agent management platform supporting knowledge retrieval, generation and optimization

    CN120371999A

  • Automatic function chain generation method and device based on graph database and medium

    CN120909559A