Information processing method and information updating method
Patent Information
- Application Number
- CN202611246257.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-10-30
AI Technical Summary
然而,采用上述方式,在存储历史记忆的过程中通常无差别提取会话内容,容易导致低价值弱记忆泛滥,进而稀释关键信息
[0013]根据本说明书提供的信息处理方法,通过将待处理回话文本准话为结构化记忆信息的操作,为后续自动化处理奠定了基础。在此基础上,在目标标志位和记忆内容字段满足预设质量条件的情况下,确定其对目标结构记忆信息的方式,实现了弱记忆从源头拒写,解决了长期记忆系统中低质量记忆泛滥、挤占上下文窗口的问题,进一步提升了存储资源利用率和记忆注入的信息密度。在此情况下,通过目标工作目录和目标作用域的双重属性标注,对目标结构化记忆信息进行整合的方式,生成了独立视图文件,避免了所存储的历史记忆质量较差,进而使得智能处理单元难以准确的实现跨会话复用历史经验的问题。据此,根据本说明书提供的信息处理方法,实现了高效且准确的提取并管理历史记忆。
Smart Images

Figure CN123011952A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of artificial intelligence technology, and in particular to information processing methods. This specification also relates to information updating methods, information processing apparatus, information updating apparatus, a computing device, a computer-readable storage medium, and computer program products. Background Technology
[0002] With the continuous development of artificial intelligence technology, intelligent processing units driven by large language models can maintain short-term memory within a single session using context windows, but the capacity of the context window is limited and it is lost after the session ends.
[0003] To enable intelligent processing units to reuse historical experiences across sessions, they typically store historical memories in long-term memory, session summary memory, or manually edited memory files. However, these methods often involve indiscriminate extraction of session content during storage, leading to a proliferation of low-value, weak memories and diluting key information. Furthermore, the lack of management over historical memory results in poor quality storage, making it difficult for intelligent processing units to accurately reuse historical experiences across sessions.
[0004] In view of this, how to efficiently and accurately extract and manage historical memories has become an urgent problem to be solved. Summary of the Invention
[0005] In view of the above, embodiments of this specification provide an information processing method. This specification also relates to an information updating method, an information processing apparatus, an information updating apparatus, a computing device, a computer-readable storage medium, and a computer program product, to solve the aforementioned problems existing in the prior art.
[0006] According to a first aspect of the embodiments of this specification, an information processing method is provided, comprising: Get the text of the session to be processed; Extract the structured memory information corresponding to the session text to be processed, wherein the structured memory information includes a memory content field and a target flag bit; The structured memory information is identified as target structured memory information and stored in the state database. The target structured memory information is structured memory information whose memory content fields and target flags meet preset quality conditions. The state database includes at least one historical structured memory information. The target structured memory information includes a target working directory and a target scope. By integrating the target structured memory information and each historical structured memory information, a target memory view file is obtained. The target memory view file is determined based on the target working directory and the target structured memory information of the target scope that meet the preset integration trigger conditions.
[0007] According to a second aspect of the embodiments of this specification, an information updating method is provided, comprising: Identify the current pending request and output the current session text corresponding to the current pending request based on the information processing model; Obtain the current structured memory information corresponding to the current session text; If no historical structured memory information corresponding to the current structured memory information is found in the state database, the current structured memory information is updated in the state database.
[0008] According to a third aspect of the embodiments of this specification, an information processing apparatus is provided, comprising: The acquisition unit is configured to acquire the text of the session to be processed. The extraction unit is configured to extract the structured memory information corresponding to the session text to be processed, wherein the structured memory information includes a memory content field and a target flag bit; The storage unit is configured to identify the structured memory information as target structured memory information and store it in a state database. The target structured memory information is structured memory information whose memory content fields and target flags meet preset quality conditions. The state database includes at least one historical structured memory information. The target structured memory information includes a target working directory and a target scope. The integration unit is configured to integrate the target structured memory information and each historical structured memory information to obtain a target memory view file, wherein the target memory view file is determined based on the target working directory and the target structured memory information of the target scope that meet the preset integration trigger conditions.
[0009] According to a fourth aspect of the embodiments of this specification, an information updating apparatus is provided, comprising: The determining unit is configured to determine the current request to be processed and output the current session text corresponding to the current request to be processed based on the information processing model; The parsing unit is configured to obtain the current structured memory information corresponding to the current session text; The update unit is configured to update the current structured memory information to the state database if the historical structured memory information corresponding to the current structured memory information is not found in the state database.
[0010] According to a fifth aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the above-described information processing method.
[0011] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the information processing method described above.
[0012] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the information processing method described above.
[0013] According to the information processing method provided in this manual, the process of converting the pending session text into structured memory information lays the foundation for subsequent automated processing. Based on this, when the target flag and memory content fields meet preset quality conditions, the method of accessing the target structured memory information is determined. This achieves the rejection of weak memories at the source, solving the problem of low-quality memories flooding and crowding out the context window in long-term memory systems, and further improving storage resource utilization and the information density of memory injection. In this case, by integrating the target structured memory information through dual attribute annotation of the target working directory and target scope, an independent view file is generated, avoiding the problem of poor-quality stored historical memories, which makes it difficult for intelligent processing units to accurately reuse historical experience across sessions. Therefore, according to the information processing method provided in this manual, efficient and accurate extraction and management of historical memories are achieved. Attached Figure Description
[0014] Figure 1 A flowchart of an information processing method according to an embodiment of this specification is shown; Figure 2 A flowchart of an information updating method provided in one embodiment of this specification is shown; Figure 3 This specification illustrates a system architecture diagram for an information processing system according to an embodiment of the present specification. Figure 4 This specification shows an information processing flowchart provided in one embodiment; Figure 5 This specification shows a schematic diagram of the structure of an information processing apparatus according to an embodiment of the present specification; Figure 6This specification shows a schematic diagram of the structure of an information updating device according to an embodiment of the present specification; Figure 7 This specification shows an architecture diagram of an information processing system provided in one embodiment; Figure 8 A structural block diagram of a computing device provided according to an embodiment of this specification is shown. Detailed Implementation
[0015] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0016] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0017] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0018] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0019] The information processing methods provided in this specification are applicable to scenarios involving the processing of conversational text. For example, they are applicable to scenarios involving the construction and management of historical conversational text.
[0020] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0021] "Responding to": "Responding to" generally refers to a reaction or response to a situation, problem, request, or event. In the technical field, it can refer to a system's reaction to input information or events. It can be understood as the system or software's perception and recognition of user input or operations, and the resulting corresponding actions or behaviors.
[0022] Triggered actions refer to actions such as clicking, swiping, or other interactive methods on content application platforms, published content, live streaming pages, and other display interfaces. These actions can trigger corresponding events and display the page or information associated with the triggered action. For example, clicking the recommendation information block on a product details page can display a list of recommended accounts.
[0023] Token: The basic discrete unit for the model to process and measure text, which may correspond to a single character, subword, punctuation mark, or special symbol. The input text is segmented into a token sequence by a token segmenter, and the model encodes, predicts, and generates tokens at the token level. Context length, billing, and computational overhead are usually measured in terms of the number of tokens.
[0024] Attention mechanism: A computational mechanism used in sequence modeling to dynamically assign "attention weights," enabling the model to aggregate information from different positions in the sequence based on relevance when processing the representation of a particular position. It typically manifests as a weighted aggregation of a set of candidate contexts, thereby highlighting content more relevant to the current task and suppressing irrelevant content.
[0025] Transformer: A type of neural network model architecture with attention mechanism at its core, commonly used for sequence modeling tasks such as natural language processing. It models the dependencies between positions in a sequence in parallel through self-attention, and excels at capturing long-range context. A typical structure consists of multiple stacked multi-head self-attention and feedforward networks, combined with residual connections and layer normalization to stabilize training. It usually also introduces positional encoding to represent the order information of tokens.
[0026] Autoregressive Large Language Models (ALMs): A type of language model that generates text sequentially, commonly used for tasks such as dialogue, writing, and question answering. Its basic objective is to predict the next token given the generated content, outputting a sequence progressively from left to right. It typically employs a Transformer structure with causal masking constraints to ensure that the current position can only utilize preceding information, thus achieving continuous and controllable generation. The model acquires general language capabilities through pre-training on large-scale corpora and can be adapted to specific business scenarios through fine-tuning with instructions.
[0027] Diffusion-based large language models typically utilize a Transformer architecture with bidirectional attention, incorporating the "stepwise noise addition-stepwise noise reduction" generation approach of diffusion models into text modeling. This involves progressively refining the generation process using discrete token controls. During inference, the diffusion-based large language model predicts masked tokens, transforming them into tokens with genuine semantic information, and obtaining the final output. Compared to autoregressive large language models, its advantages lie in stronger global consistency and controllable generation capabilities.
[0028] With the continuous development of artificial intelligence technology, intelligent processing units driven by large language models can maintain short-term memory within a single session using a context window. However, the context window has limited capacity and is lost after the session ends. To enable intelligent processing units to reuse historical experience (such as user preferences, project conventions, pitfalls encountered, and effective solutions) across sessions, a long-term memory-based implementation path is typically adopted. For example, based on vector retrieval, the original text of historical dialogues or its vector embeddings are stored in a database (vector retrieval / RAG-style memory), and then recalled and concatenated into prompts in new sessions based on similarity. Another approach is session summary-based memory, where the model generates a summary at the end of the session as the initial memory injection for the next session. Alternatively, a manually editable memory file can be used to maintain a user-editable rule file, with a fixed injection for each session.
[0029] However, the above approach often indiscriminately extracts every conversation (or even every round of dialogue) as a "memory" and writes it into storage, resulting in a large number of one-off, weak memories with little reuse value (such as temporary debugging outputs, irrelevant chatter, and temporary operations in specific environments). These weak memories not only consume storage and retrieval resources but also crowd out the limited context window during injection, causing an attention dilution effect and significantly reducing the model's sensitivity to key information. The system lacks a quality assessment and filtering mechanism based on "reusability potential, information density, and task criticality," failing to achieve "quality over quantity" write access control.
[0030] Furthermore, once a memory is written, it is permanently retained, lacking a feedback loop based on actual usage effectiveness. The system does not dynamically adjust based on actual usage frequency, effectiveness, or positive feedback. High-value memories and redundant memories coexist for a long time. This leads to the memory bank expanding infinitely over time, with the proportion of noise during retrieval continuously increasing, while truly useful experiences may be buried. The system cannot strengthen or eliminate memory entries based on usage feedback (such as whether they are repeatedly retrieved, whether they are adopted, or whether they lead to task success).
[0031] Furthermore, when participating in multiple projects simultaneously, using a single global memory pool can lead to the erroneous injection of experience from one project into sessions from unrelated projects. This introduces misleading context, causing model inference errors, biased recommendations, and even compilation or runtime failures. Moreover, intelligent processing units often perform web searches, web scraping, or document browsing within sessions, and the content from these external sources may contain inaccurate information, outdated solutions, or malicious misleading information. Indiscriminately retrieving memories from such sessions can easily solidify one-off, unreliable content into long-term memory, leading to memory contamination and the potential for the intelligent processing unit to continuously output erroneous or harmful recommendations in the future.
[0032] If memory content is directly incorporated into prompts and given high weight, attackers can inject malicious commands into historical conversations or external content (prompt injection), turning memories into a vehicle for executing attacker intent. In future sessions, the model may unconditionally execute hidden commands from memory (such as bypassing permission checks, leaking data, or executing dangerous commands).
[0033] The timeliness adjustment, error correction, and expiration of memories primarily rely on manual intervention or simple decay functions, lacking automated and traceable triggering mechanisms. The system cannot utilize auditable change events (such as code commit diffs, configuration file modifications, user error feedback, and environment version changes) as explicit signals to drive automatic memory updates or forgetting. This leads to a gradual deviation between memories and the current true state, and the deviation process is difficult to trace and repair.
[0034] Therefore, based on the above, it can be seen that long-term memory technology solutions have systemic technical defects in terms of memory writing quality control, lifecycle dynamic management, cross-project scope isolation, external pollution source defense, security attack protection, and auditable automatic forgetting.
[0035] In view of this, this specification provides an information processing method that extracts target structured memory information corresponding to the session text to be processed by means of compliance conditions and in combination with preset quality conditions. Based on this, according to preset integration trigger conditions, the target structured memory information and various historical structured memory information are integrated, thereby achieving efficient and accurate extraction and management of historical memory. This specification also relates to an information processing device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail in the following embodiments.
[0036] Figure 1 A flowchart of an information processing method according to an embodiment of this specification is shown, which specifically includes the following steps: Step 102: Obtain the text of the session to be processed.
[0037] The pending conversation text can be understood as the complete dialogue record generated by the intelligent processing unit during a conversation, including the questions or instructions entered by the user, the response content generated by the intelligent processing unit, and the intermediate output generated by the tools called during the conversation.
[0038] In one specific implementation provided in this specification, session events are monitored, and in response to being in a session idle state, the session text to be processed is obtained.
[0039] It should be understood that this manual can process multiple session texts in parallel. For ease of explanation, this manual uses a single session text as an example.
[0040] Furthermore, the information processing described in this specification can also be applied to information processing systems. These systems include an event hook module, an extraction module, an integration module, a retrieval / injection module, a reference tracking module, a state database, and memory artifact files.
[0041] In this case, the process of obtaining the session text to be processed can be to use the event hook module to monitor session events and buffer the current session text in response to being in a session idle state.
[0042] In one specific implementation, the event hook module listens to the timestamp of the last message in the session. When it detects that the session has entered an idle state and the idle time has reached a preset idle time threshold, it triggers a fetch operation. When the event hook module detects that a new session has started, it performs a batch fetch operation.
[0043] In one specific embodiment provided in this specification, before extracting the structured memory information corresponding to the session text to be processed, steps S1022-S1026 are further included: S1022. Parse the session text to be processed and determine at least one tool call type corresponding to the session text to be processed.
[0044] The tool call type can be understood as the type identifier or category name of the external functional module called by the intelligent processing unit during the session. It's important to understand that the tool call type is used to determine whether the session text to be processed has been exposed to untrusted external information sources, in order to indirectly infer whether the session content may have been contaminated by external information.
[0045] In one specific embodiment provided in this specification, the session text to be processed is structurally decomposed and information is extracted. For example, each message in the session text to be processed and its accompanying metadata are traversed to extract relevant information about all tools called by the intelligent processing unit during the session.
[0046] S1024. If each tool call type meets the tool call conditions, determine whether the session text to be processed meets the compliance conditions.
[0047] Here, compliance conditions can be understood as the set of judgment rules used when performing admission checks on the session text to be processed. These rules are used to filter out sessions that lack extraction value, ensuring that only sessions meeting the conditions are included in subsequent extraction processes. For example, compliance conditions could be eligibility gating conditions.
[0048] In one specific implementation, before the extraction module performs memory retrieval, the session text to be processed is parsed to determine the type of tool invoked in the session text. The session text to be processed is then checked to see if it meets the admission criteria.
[0049] In one specific embodiment provided in this specification, the compliance conditions include at least one of the following: Whether the session text to be processed is a temporary session or a sub-intelligent processing unit session; Whether the duration or idle time of the pending session text reaches a preset time threshold; Does the batch processing quantity of the pending session text exceed the preset upper limit? Is the memory mode of the session text to be processed enabled?
[0050] Temporary sessions can be understood as sessions created for one-time testing, debugging, or temporary verification purposes. The system identifies such sessions through metadata carried during session creation (such as the is_ephemeral flag), and their content has no long-term storage value.
[0051] A sub-intelligent processing unit session can be understood as an intermediate session generated by a sub-task execution unit derived from the main intelligent processing unit to complete a complex task. The dialogue content of such sessions belongs to the intermediate reasoning process, rather than a formal record of interaction with the end user.
[0052] The batch processing limit can be understood as the upper limit of the number of sessions that can be processed in a single extraction task. This parameter is used to control concurrency and prevent resource exhaustion. That is, when processing multiple pending session texts in parallel as described in this specification, the batch processing limit can be controlled.
[0053] The memory mode can be understood as the storage permission status of the session thread, with values of enabled or polluted. This mode is set by the pollution detection module.
[0054] In one specific embodiment provided in this specification, if the session text to be processed is a temporary session or a sub-intelligent processing unit session, it indicates that the session to be processed does not have long-term storage value, and in this case, it is considered that it does not meet the compliance conditions.
[0055] In one specific embodiment provided in this specification, if the duration or idle time of the pending session text does not reach a preset time threshold, it indicates that the duration of the pending session is short, and the session may only be a one-time question-and-answer interaction, where the user has not fully developed the discussion, making it difficult to extract reusable experience. In this case, compliance conditions are not met. Furthermore, the idle time is used to determine whether the session has "ended" or "entered a pause period." If the user has not entered new content for a long time, it indicates that the current discussion has come to an end, making it suitable to trigger memory retrieval processing. In this case, compliance conditions can be considered met.
[0056] In one specific embodiment provided in this specification, if the number of pending session texts exceeds a preset limit, it is considered to fail to meet compliance conditions in order to avoid resource exhaustion. It should be noted that the batch processing limit is used to determine the number of pending session texts.
[0057] In one specific implementation provided in this specification, if the storage permission status of the session text to be processed is contaminated, it is considered that the compliance conditions are not met.
[0058] According to a specific implementation provided in this specification, a multi-dimensional qualification gating mechanism is implemented. Through four checks—temporary / sub-agent filtering, time threshold, batch limit, and contamination status—it ensures that only sessions meeting compliance conditions can enter the memory retrieval process. Furthermore, this multi-layered filtering significantly reduces the invalid call rate of sessions awaiting processing.
[0059] S1024. If each tool call type meets the tool call conditions, extract the structured memory information corresponding to the session text to be processed.
[0060] S1026. If a tool call type does not meet the tool call conditions, execute the default workflow.
[0061] The default workflow can be understood as the fallback operation path performed when a session is marked as "polluted". In this specification, the default workflow may be to prohibit any memory retrieval process (including compliance checks, desensitization, model calls, etc.) from being performed on the session, and to record the pollution count for subsequent auditing.
[0062] In one specific embodiment provided in this specification, if a tool that introduces untrusted external content is detected, the session thread corresponding to the session text to be processed is marked as contaminated, and the subsequent memory extraction operation performed by the extraction module is terminated.
[0063] In one specific embodiment provided in this specification, when each tool call type meets the tool call conditions, the operation shown in step 104 of this specification is performed.
[0064] According to a specific implementation method provided in this specification, by performing a pre-emptive tool call detection mechanism before the session text enters any extraction process, hard isolation is achieved, which invalidates the entire session once an external network is checked. This ensures the certainty of protection and avoids the computational overhead caused by complex content identification.
[0065] Step 104: Extract the structured memory information corresponding to the session text to be processed, wherein the structured memory information includes memory content fields and target flag bits.
[0066] Structured memory information can be understood as memory data pairs with a uniform field format, including preset field names and data types. It should be noted that in this specification, the preset fields are memory content fields, and the data type includes a target flag, which can also be understood as a persistence flag. Its value is used to characterize whether the structured memory information has persistent storage value.
[0067] In one specific implementation, structured memory information can be a memory data object with a uniform field format output by a first language model (lightweight LLM) according to a preset JSON Schema. Unlike unstructured raw dialogue text, this information includes preset field names and data types, facilitating subsequent computer programmatic processing. Specifically, it includes memory content fields and target flags.
[0068] The memory content field can be understood as a data field within structured memory information, used to carry a reusable summary of experience extracted from the conversational text. The content of this field is empirical knowledge described in natural language.
[0069] The target flag can be understood as a Boolean or enumerated data field in structured memory information, used to characterize whether the memory content has persistent storage value. It should be noted that in this specification, this flag is denoted as `is_durable`, and is determined by the first language model based on factors such as the information density and reusability potential of the session content. `true` indicates persistence, and `false` indicates that it should be discarded.
[0070] In one specific implementation provided in this specification, non-formal conversations are filtered out according to compliance conditions, and then a first language model (lightweight LLM) is called to perform structured extraction, converting the natural language dialogue into JSON format data containing memory content fields and target flags.
[0071] In one specific embodiment provided in this specification, extracting the structured memory information corresponding to the session text to be processed includes: Based on a preset regular expression pattern, at least one target string in the session text to be processed is identified, and each target string is replaced with a target placeholder to obtain the desensitized session text; The desensitized conversation text is input into a first language model, and the corresponding structured memory information is output according to a preset structured format based on the first language model. The structured memory information includes memory content fields and target flag bits.
[0072] The pre-defined regular expression patterns can be understood as a pattern description language for string matching. This specification uses several pre-defined regular expression patterns to facilitate the identification of sensitive information formats. It is important to understand that a regular expression is a formal language for string pattern matching, capable of describing string structures with specific formats using concise syntax.
[0073] The target string can be understood as the raw sensitive character substring in the session text to be processed that matches a preset regular expression pattern. It can be at least one of a key string, a token string, or a password string.
[0074] A target placeholder can be understood as a safe string with no actual semantics used to replace the target string. This string itself does not contain any clues that can restore the original sensitive information.
[0075] The first language model can be understood as a lightweight large language model used in the single-threaded extraction phase.
[0076] De-identified session text can be understood as a clean version of the session text to be processed after sensitive string replacement. This version still retains the complete semantic structure, but no longer contains any exploitable sensitive credentials.
[0077] Predefined structured formats can be understood as predefined data output format specifications that require the output of the first language model to follow a unified field structure, data type, and value constraints.
[0078] In one specific implementation provided in this specification, a preset regular expression pattern is used to replace the key, tokens, and password in the session text to be processed with target placeholders, thereby facilitating the de-identification of the session text. The resulting de-identified session text is then input into a lightweight large language model, which performs structured extraction to obtain experience summary attribute information (structured memory information). For example, the de-identified session text can be input into a lightweight large language model, which is required to output according to a strict JSON schema, with fields including raw_memory (experience summary), rollout_summary (session summary), and is_durable (durability).
[0079] In one specific implementation, after obtaining the qualified gating session text to be processed, the text is traversed character by character or word by word, and each substring in the text is matched against multiple preset regular expression patterns. When a match is successful, the substring is identified as the target string and replaced with the corresponding target placeholder. This process traverses the entire text until all matches have been processed, resulting in de-identified session text. The de-identified session text is used as input to the first language model, and the inference interface of the first language model is called. The call request includes a constraint instruction of a preset structured format (JSON Schema), requiring the model to output structured memory information according to this format. After receiving the de-identified session text, the first language model identifies the core problem scenario in the session; extracts effective solutions or avoidance experience; judges the generality of the experience; and then organizes the obtained content into structured data conforming to the preset JSON Schema format.
[0080] According to a specific implementation method provided in this specification, by using pre-defined regular expression patterns for desensitization, the security risks of sensitive information being leaked to the memory or exposed to third-party large language models are avoided. Furthermore, by employing a first language model (lightweight) for structured extraction, the cost of the single-threaded extraction stage is kept low, and by forcing JSON Schema output, the consistency of subsequent programmatic processing is ensured, providing feasibility for large-scale engineering deployment.
[0081] In one specific embodiment provided in this specification, after obtaining the structured memory information, the method further includes: Determine whether the memory content field and the target flag bit meet the preset quality conditions; If the memory content field and the target flag do not meet the preset quality conditions, the reason for the non-compliance is analyzed, and the processing operation is determined based on the reason for the non-compliance.
[0082] The preset quality conditions can be understood as the set of judgment rules used to screen structured memory information for quality. It should be noted that, in this specification, the preset quality conditions can be understood as a quality gating system used to ensure that reusable memory is stored. Specifically, this includes checking the `is_durable` flag and checking the minimum threshold for the length of the memory content text.
[0083] The reasons for non-compliance can be understood as the triggering factors that cause the quality gate to fail. These factors may include: a false flag, insufficient text length, or the model determining that "no reusable experience" is available. Different reasons for non-compliance correspond to different handling operations.
[0084] In one specific embodiment provided in this specification, after receiving the structured memory information output by the first language model, the value of the target flag (is_durable) is read, and it is determined whether it is true. The text length of the memory content field (raw_memory) is then calculated, and it is determined whether it exceeds a preset minimum length threshold. If the determination result is unsatisfactory, the process of analyzing the reason for non-compliance begins. For example, the actual value of is_durable (true or false) and the actual length value of raw_memory are read. By comparing these two actual values with a preset standard, the specific reason for non-compliance is determined.
[0085] In one specific embodiment provided in this specification, the reasons for non-compliance are analyzed, and based on the reasons for non-compliance, processing operations are determined, including: If the target flag indicates that the information is not persistent, and / or the text length of the structured memory information is less than a preset minimum length threshold, the structured memory information is discarded. If the first language model determines that there is no reusable experience in the session text to be processed, it is recorded as a memoryless state.
[0086] The preset minimum length threshold can be understood as the minimum requirement for the text length of the content field to be stored. If the summary is too short, it indicates insufficient information density and a lack of storage significance.
[0087] In one specific embodiment provided in this specification, determining whether the memory content field and the target flag meet preset quality conditions includes: if the target flag indicates non-persistence, then discarding the structured memory information; and / or, If the text length of the memory content field is less than a preset minimum length threshold, the structured memory information is discarded; and / or, If the first language model determines that there is no reusable experience in the conversation text to be processed, it is recorded as a memoryless state and the extraction process is exited.
[0088] According to a specific implementation method provided in this specification, filtering is completed before writing, fundamentally preventing weak memories from entering the database. Furthermore, when the first language model determines that there is no reusable experience, it forces a blank entry, preventing the generation of meaningless memories. In addition, both flag bits and text length are checked simultaneously to ensure that only high-value memories are entered into the database, based on both the model's subjective judgment and objective information density.
[0089] Step 106: Identify the structured memory information as the target structured memory information and store it in the state database.
[0090] The target structured memory information is structured memory information whose memory content fields and target flags meet preset quality conditions. The state database includes at least one historical structured memory information. The target structured memory information includes the target working directory and the target scope.
[0091] The target structured memory information can be understood as structured memory information that has passed the pre-defined quality criteria. This information is deemed to have storage value and is used for subsequent persistent storage operations.
[0092] A state database can be understood as a relational database (e.g., SQLite) used to persistently store structured memory information. This database maintains all structured memory information that passes compliance and preset quality criteria, providing a data source for subsequent integration, selection, and reference tracking operations. It's important to understand that this state database stores the continuous evolution state of each structured memory information, including attributes such as memory content, usage frequency, last used time, scope, and working directory. For ease of explanation, this specification refers to existing structured memory information in the state database as historical structured memory information, and the structured memory information corresponding to the currently being processed session text that meets preset quality criteria as target structured memory information.
[0093] The target working directory can be understood as the absolute path to the current working directory (cwd) of the user's operating system when the session text to be processed was generated. This path is used for subsequent scope isolation and path matching. This field is written to the state database along with the structured memory information during the structured extraction process.
[0094] The target scope can be understood as a logical range label used to classify and categorize structured memory information. The target scope can be project-level, global-level, or unknown / old data. It's important to understand that a project-level scope indicates the need to bind to a specific working directory. A global-level scope indicates it's applicable across projects. In the case of an unknown / old data scope, this field is backfilled when generating structured information and is overwritten or corrected by semantic analysis during integration.
[0095] In one specific implementation provided in this specification, quality gating is performed. By checking the is_durable flag and the length of the memorized content text, only high-quality memories are allowed to enter the database.
[0096] In one specific implementation, after receiving the structured memory information output by the first language model, the value of the target flag (is_durable) is read, and it is determined whether it is true. The text length of the memory content field (raw_memory) is calculated, and it is determined whether it exceeds a preset minimum length threshold. If the determination result is satisfactory, the state of the structured memory information is changed from candidate to qualified, i.e., it is assigned a target state identifier. After being identified as target structured memory information, this information automatically inherits the target working directory and target scope attribute fields. The target structured memory information is written into the stage1_outputs table of the state database, including its complete field content: memory content (raw_memory), target flag (is_durable), session summary (rollout_summary), session identifier (rollout_slug), target working directory (cwd), and target scope (scope). The usage count field (usage_count=0) and the last usage time field (last_usage is empty) are initialized.
[0097] Furthermore, simultaneously or sequentially with the storage in the state database, the core content of the target structured memory information (raw_memory text) is appended to the original evidence file (raw_memories.md) in readable Markdown format. It's important to understand the relationship between the two: the database record is structured and machine-readable, containing dynamic weighted fields (such as usage_count) for subsequent programmatic processing; the original evidence file is plain text that is naturally readable and only appended, used for auditing and tracing. Its content is a static copy of the raw_memory field in the database and does not include dynamic fields such as usage_count.
[0098] Step 108: Integrate the target structured memory information and the historical structured memory information to obtain the target memory view file.
[0099] The target memory view file is determined based on the target working directory and the target scope's structured memory information that meet the preset integration trigger conditions.
[0100] The preset integration trigger conditions can be understood as the combination of conditions that need to be met to trigger the global and project integration phases. Specifically, these include: successfully acquiring the lease lock (to prevent concurrent conflicts), exceeding the preset cooldown time since the last integration completion (to prevent high-frequency operation), and the number of newly added memories in the state database exceeding the preset change threshold (to prevent idle operation).
[0101] The target memory view file can be understood as an integrated product generated after in-depth processing by a second language model (a strong LLM). This file includes: a global general memory view file (MEMORY.md) and a project-specific memory view file (PROJECT_MEMORY.md). The view is used to illustrate a refined presentation of the optimized and reorganized structured memory information, which differs from the structured memory information itself.
[0102] In one specific implementation provided in this specification, integration is performed during idle periods. Based on a triple throttling control system of lease locks, cooldown time, and minimum change amount, deduplication is performed on the target structured memory information and each historical structured memory information, followed by semantic sorting, to generate a target memory view file containing both a globally common view file and a project-specific view file.
[0103] In one specific implementation, based on a triple throttling control mechanism of lease lock, cooldown time control, and minimum change threshold, when system resources are sufficient and triggering conditions are met, the target structured memory information and various historical structured memory information stored in the state database undergo deduplication and merging, contradiction resolution, and semantic sorting to generate a target memory view file containing a globally applicable view file and a project-specific view file. The information processing method is deployed in the host process of the large language model intelligent processing unit, running as a single-process plug-in. The persistent storage carriers of the information processing system include a state database using SQLite and memory artifact files in a hard disk file system. The state database includes a thread table (threads), a phase 1 output table (stage1_outputs), a job table (jobs), and a metrics table (metrics_events). The phase 1 output table stores all target structured memory information that has passed quality gating review, as well as each historical structured memory information. Each structured memory information includes a memory content field (raw_memory), a target flag (is_durable), a target working directory (cwd), a target scope (scope), a usage count field (usage_count), and a last usage time field (last_usage).
[0104] The information processing system continuously monitors the idle state of the host process. When it detects that the user stops input, the session enters an idle state, and the idle state continues for a preset idle time threshold, the information processing system triggers a conditional judgment process before integration. However, integration is not performed during every idle period. The information processing system needs to check three throttling control conditions in sequence and trigger integration only when all three are met.
[0105] The lease lock implementation process can be understood as follows: a task record is created in the `jobs` table of the state database. This record contains a task identifier, task type, lease acquisition timestamp, and lease expiration timestamp. The lease expiration timestamp is set to the current time plus a preset lease duration. When the system successfully inserts this record into the `jobs` table, it is considered to have successfully acquired the lease lock. If the insertion operation fails due to primary key conflicts or uniqueness constraints (indicating that other integration tasks are already running), the integration attempt is abandoned, and the system waits for the next idle period to make another judgment.
[0106] After successfully acquiring the lease lock, a further check is performed to see if the time interval between the current moment and the last successful completion of the integration task is greater than or equal to the preset cooldown time. The cooldown time is used to prevent excessive consumption of computing resources and input / output operation overhead due to frequent triggering of the integration task.
[0107] In one scenario, the information processing system stores the timestamp of the last integration completion in the status database. Each time an integration trigger is determined, the information processing system reads this timestamp, calculates the difference between the current time and the timestamp, and compares it with the preset cooldown time.
[0108] If the difference is less than the preset cooling time, it indicates that the preset cooling time has not been met since the end of the last integration. The information processing system actively releases the lease lock, abandons this integration attempt, and the process terminates. If the difference is greater than or equal to the preset cooling time, it indicates that the cooling time requirement has been met, and the process enters the third level of control condition judgment.
[0109] After the cooldown period check, it is further determined whether the number of new target structured memory information added to the state database since the last integration is greater than the preset minimum change threshold. The minimum change threshold is used to prevent integration from being triggered when there are only a few new memories, avoid reducing system efficiency due to too frequent rewrite operations, and ensure that each integration provides sufficient information for the second language model to perform meaningful deduplication, disambiguation, and generalization processing.
[0110] In one specific implementation, the information processing system queries the stage1_outputs table in the status database, counts the number of target structured memory information records that have been added since the last integration completion timestamp and have passed the quality gating audit, and compares them with the preset minimum change threshold.
[0111] If the number of newly added memories is less than the preset minimum change threshold, it indicates that there are fewer than 5 new memories. The information processing system will proactively release the lease lock, abandon this integration attempt, and terminate the process. If the number of newly added memories is greater than or equal to the preset minimum change threshold, it indicates that the change threshold has been met, all three throttling control conditions are satisfied, and the information processing system will officially trigger the integration operation.
[0112] In one specific embodiment provided in this specification, the target structured memory information and each historical structured memory information are integrated to obtain a target memory view file, including S1082-S10810: S1082. Based on the target structured memory information and each historical structured memory information, determine the integration candidate set.
[0113] The integrated candidate set can be understood as a subset of structured memory information selected from the state database according to preset selection rules, which is to be input into the second language model for in-depth processing.
[0114] In one specific embodiment provided in this specification, based on the target structured memory information and each historical structured memory information, a candidate set for integration is determined, including: Obtain the preset selection rules; Based on the preset selection rules, at least one piece of historical structured memory information is selected from the state database as an integration candidate set.
[0115] To facilitate understanding, the preset selection rules are explained in the following manner in this manual.
[0116] In one specific embodiment provided in this specification, the preset selection rule includes sorting based on the usage frequency of each historical structured memory information and determining a preset number of historical structured memory information.
[0117] In other words, the preset selection rules can be understood as a set of sorting and truncation rules for filtering high-value memories from the massive records in the state database. For example, sorting by usage frequency in descending order and most recent usage time in descending order, and then truncating the top N entries.
[0118] Accordingly, the frequency of use of each historical structured memory information is determined in the following way: Retrieve historical conversation text; The historical conversation text is parsed to determine the reference markers, wherein the reference markers are used to determine whether historical structured memory information is used; Based on the reference tag, the usage count field of the historical structured memory information is incrementally updated to obtain the usage frequency.
[0119] Usage frequency can be understood as the number of times a piece of structured memory information has been actually referenced and adopted by the intelligent processing unit throughout history. This frequency is stored as an integer value (usage_count) in the state database.
[0120] A reference tag can be understood as a structured tag that the intelligent processing unit actively appends to the end of the output content to declare that a memory was actually used in this answer, and at least includes the unique identifier of the referenced memory.
[0121] Incremental updates can be understood as an atomic database update that increments the usage count field of the corresponding memory record in the state database after a reference tag is parsed. Simultaneously, the most recently used time field is refreshed to reflect the current time.
[0122] In one specific embodiment provided in this specification, the complete reply content generated by the intelligent processing unit in historical sessions is obtained. The reply text is scanned, all structured tags conforming to a set format are extracted, and the unique identifier of each referenced memory is parsed out. For each referenced memory record, its usage count field is atomically incremented.
[0123] In one specific embodiment provided in this specification, after obtaining the usage frequency of each historical structured memory information, an integrated candidate set is obtained according to a preset selection rule.
[0124] S1084. Input the integrated candidate set into the second language model, and perform deduplication and merging, contradiction resolution and abstract generalization processing on each structured memory information in the integrated candidate set based on the second language model to obtain the integrated content.
[0125] The second language model can be understood as a powerful, large language model used in the global and project integration phases.
[0126] Deduplication and merging can be understood as the operation of merging multiple memory entries that describe the same or highly similar experiences into a single concise expression.
[0127] Conflict resolution can be understood as a decision-making process that, when different memory entries offer different solutions to the same problem, retains the latest / most correct solution and discards outdated or incorrect solutions based on information such as timestamps, frequency of use, and user feedback.
[0128] Abstract generalization can be understood as refining and elevating experience from specific code snippets or scenarios into general principles applicable to a wider range of scenarios.
[0129] The integrated content can be understood as a collection of refined knowledge units generated after in-depth processing by the second language model, which has been deduplicated, disambiguated, and generalized. This is the direct material written into the view file.
[0130] In one specific implementation provided in this specification, a stronger model is invoked to perform deduplication, disambiguation, and generalization processing on the candidate set, resulting in highly refined integrated content.
[0131] S1086. Based on the second language model, perform semantic analysis on the integrated content to determine the knowledge attribution, wherein the knowledge attribution includes globally general knowledge or project-specific knowledge.
[0132] Knowledge attribution can be understood as the process of logically classifying integrated knowledge units to determine whether they should be globally universal knowledge (applicable to all projects) or project-specific knowledge (applicable only to projects within a specific working directory). This determination is based on semantic analysis of knowledge content using a second language model, rather than mechanically reading preset scope fields from a database.
[0133] In one specific implementation provided in this specification, by reading and understanding the substantive semantics of the memorized content, it is determined whether each piece of knowledge should be classified as "globally applicable" or "project-specific".
[0134] S1088. If the knowledge belongs to the global general knowledge, write the global general knowledge into the global memory view file.
[0135] The global memory view file can be understood as a deluxe Markdown file (MEMORY.md) containing all globally common knowledge, located in the user's home directory (~ / .agent_memory / ). This file is unconditionally loaded during new session injection.
[0136] In one specific embodiment provided in this specification, when the knowledge belongs to global general knowledge, the global general knowledge is written into a global memory view file.
[0137] S10810. If the knowledge belongs to the project-specific knowledge, write the project-specific knowledge into the project memory view file.
[0138] The project memory view file can be understood as a high-quality Markdown file (project_memory.md) that stores project-specific knowledge, located in the .project_memory / subdirectory under the project's root directory. This file is only loaded if the current working directory path matches.
[0139] In one specific embodiment provided in this specification, when the knowledge belongs to the project-specific knowledge, the project-specific knowledge is written into the project memory view file.
[0140] In one specific implementation, after triggering the integration operation, the information processing system retrieves a set of candidate memory information to participate in this integration from the state database. This candidate set does not contain all historical structured memory information from the state database, but rather a high-value subset selected and ranked based on preset selection rules.
[0141] In one scenario, the structured memory information is sorted in descending order by its usage count field (usage_count); if the usage count field values are the same, it is sorted in descending order by its most recent usage time field (last_usage). The information processing system selects the top N structured memory information from the sorting results as an integration candidate set.
[0142] The candidate set is then integrated and input into the second language model for in-depth processing. The second language model is a more powerful, larger language model used in the integration phase, unlike the lightweight first language model.
[0143] An integration instruction is sent to the second language model. This instruction includes the following: integrating all structured memory information in the candidate set (including raw_memory content, rollout_summary, write timestamps, and other metadata for each memory), and an explicit deduplication and merging instruction. Specifically, the instruction requires the second language model to perform semantic similarity evaluation on the memory content in the candidate set, identify multiple memory entries describing the same or highly similar technical problems, and merge them into a refined, higher-information-density integrated content.
[0144] In addition to merging, the second language model also performs contradiction resolution. Contradiction resolution refers to the process where, when different memories in the candidate set provide contradictory or incompatible solutions to the same technical problem, the model uses weighted information such as the timestamp (write time), usage count field (usage_count), and last usage time field (last_usage) of each memory to determine and retain the most credible and up-to-date solution, while eliminating outdated or falsified solutions.
[0145] The second language model also performs abstract generalization processing on the memory content in the integration candidate set. Here, abstract generalization refers to refining and elevating concrete operational descriptions for specific code snippets, versions, or environments into general technical principles or design patterns applicable to a wider range of scenarios.
[0146] After completing deduplication, merging, contradiction resolution, and abstract generalization, the information processing system performs semantic analysis on the integrated content based on a second language model and performs knowledge attribution classification, that is, determines whether each integrated knowledge unit belongs to global general knowledge or project-specific knowledge.
[0147] After writing the target memory view file, the information processing system also generates a version control-style workspace diff file. This diff file records the additions, modifications, and deletions made in this integration operation relative to the previous integration operation across all view files (including the global memory view file and project-specific memory view files), using a Git-style change tag format.
[0148] According to a specific implementation provided in this specification, by deduplication and merging, repetitive experiences scattered across hundreds of original memories are compressed into a concise expression, improving storage efficiency and information density during injection. Through contradiction resolution, it is ensured that there is no self-contradictory knowledge in the view file, guaranteeing that the agent will not receive conflicting instructions simultaneously. Through abstraction and generalization, the solution of specific scenarios is characterized as a universal principle, increasing the probability of cross-scenario reuse. Through semantic sorting of knowledge attribution and dual-path writing, the separation of physical path (CWD) and logical domain of application is achieved, enabling general knowledge to be shared across projects, while project-specific knowledge is physically isolated in its respective directory, laying the foundation for subsequent path matching and injection.
[0149] In one specific embodiment provided in this specification, as can be seen from the above, the structured memory information maintained by the state database is structured memory information that meets preset quality conditions. Furthermore, the target memory view file corresponding to the state database contains a global memory view file applicable to each structured memory information, and a project memory view file applicable to projects with project-specific knowledge.
[0150] Furthermore, if the target memory view file includes a global memory view file, after obtaining the target memory view file, the method further includes: After obtaining the target memory view file, the method further includes: Obtain the current query request and the global memory view file; Based on the current query request and the global memory view file, a preset prompt word is constructed; The preset prompt words are input into the information processing model, and the information processing model outputs the query results corresponding to the current query request.
[0151] The information processing model can be understood as the intelligent processing unit mentioned above in this specification, which is used to generate corresponding query results based on the user's request.
[0152] In one specific embodiment provided in this specification, in response to the initiation of a new session, the current working directory of the new session is obtained, the target memory view file is scope-filtered according to the current working directory, and the filtered memory view is injected into the prompt of the new session.
[0153] Furthermore, in a specific embodiment provided in this description, based on the current query request and the global memory view file, a preset prompt word is constructed, including: Determine the current working directory corresponding to the current query request; Retrieve the project memory view file corresponding to the current working directory; Based on the current query request, the global memory view file, and the project memory view file, a preset prompt word is constructed.
[0154] In one specific implementation, at any subsequent time after integration is complete, when a new session is started, the information processing system executes a memory injection process. This injection process follows the principle of scope isolation. Specifically, the information processing system first unconditionally loads the entire contents of the global memory view file (MEMORY.md) and appends it to the current session's preset prompt (System Prompt). This makes globally common knowledge such as the "useEffect empty array dependency" knowledge and the "build tool common path configuration" available in every new session.
[0155] Subsequently, the information processing system obtains the working directory of the current session. If the current working directory is the root directory of project A, the information processing system attempts to read the project memory view file in that directory. If the file exists, its contents are appended to the preset prompt. At this time, the configuration memory corresponding to project A is injected into the current session.
[0156] If the session for project A is subsequently closed, and a new session is started in the working directory of project B, the information processing system will first unconditionally load the global memory view file during injection, and then attempt to read the project memory view file for project B. However, at this time, the project memory view file for project A is completely invisible because it is located in a different directory, and the information processing system will not load the project-specific memory view file across directories. Therefore, physical isolation of cross-project memory pollution is achieved.
[0157] According to a specific implementation method provided in this specification, a differentiated injection strategy, employing global unconditional loading and project-based path-based loading, achieves comprehensive sharing of globally common knowledge and physical isolation of project-specific knowledge, thus preventing cross-project memory contamination. Replacing the original fragmented memory injection with a pre-generated target memory view file saves context window space, allowing the model to allocate more computational resources to processing the current task.
[0158] Based on the information processing methods provided in this specification, during the single-threaded extraction phase, weak memories are filtered out before writing by using quality gating with target flags and minimum length thresholds, ensuring quality over quantity. Furthermore, meaningless memories are prevented from being created at the source by recording empty data. Further, hard detection of tool call types intercepts entire sessions accessing external content during the pre-extraction phase, ensuring the purity of the memory bank. Automatic desensitization using pre-defined regular expression patterns prevents leakage of keys / tokens / passwords during intelligent processing unit calls or memory persistence. During the global and project integration phase, the intelligent processing unit actively declares references, guiding the system to update usage counts in real time. This closed-loop mechanism, which selects based on count, prioritizes high-frequency memories based on actual usage value, enabling the state database to self-evolve. Reference tags are actively generated by the intelligent processing unit rather than analyzed in the background, avoiding misjudgments. The tags are also in a structured format, facilitating programmatic parsing and automated processing. In summary, based on the information processing method provided in this manual, the consumption of computing resources, I / O resources, and context window resources is comprehensively controlled through qualification gating, integration of trigger conditions, and on-demand loading of view files.
[0159] In one specific embodiment provided in this specification, Figure 2 A flowchart illustrating an information updating method provided in one embodiment of this specification is shown. Figure 2 The steps shown are as follows: Step 202: Determine the current request to be processed, and output the current session text corresponding to the current request to be processed based on the information processing model.
[0160] The currently pending requests can be understood as query requests during a real-time session.
[0161] The current conversation text can be understood as the complete dialogue record generated by the intelligent processing unit during the current conversation, including the questions or instructions entered by the user, the response content generated by the intelligent processing unit, and the intermediate output generated by the tools called during the conversation.
[0162] Step 204: Obtain the current structured memory information corresponding to the current session text.
[0163] The current structured memory information can be understood as structured memory information that meets the preset quality conditions. This structured memory information includes memory content fields and target flag bits.
[0164] Step 206: If no historical structured memory information corresponding to the current structured memory information is found in the state database, update the current structured memory information to the state database.
[0165] In one specific embodiment provided in this specification, a current request to be processed is obtained, and the corresponding current session text is determined based on the current request using an information processing model. The corresponding structured memory information is obtained by parsing the current session text. It is then determined whether the structured memory information corresponding to the current session text meets preset quality conditions. If the preset quality conditions are met, the structured memory information corresponding to the current session text is determined as the current structured memory information.
[0166] Furthermore, based on the reference markers in the current memory information, it is determined whether the current structured memory information is the same as the historical structured memory information stored in the state database. If the current structured memory information is the same as the existing historical structured memory information in the state database, an incremental update operation is performed on the usage count field of the corresponding historical structured memory information. If the current structured memory information is different from the existing historical structured memory information in the state database, the current structured memory information is updated in the state database so that it can be used as historical structured memory information in subsequent request processing.
[0167] It should be noted that after updating the current structured memory information to the state database, this specification further integrates the current structured memory information with the existing historical structured memory information in the state database to facilitate updating the target memory view file. The integration process is detailed in step 108 mentioned above in this specification, and will not be repeated here.
[0168] The following is in conjunction with the appendix Figure 3 Taking the application of the information processing method provided in this specification in an information processing system as an example, the information processing method will be further explained. Among other things, Figure 3 This specification illustrates a system architecture diagram for an information processing system according to an embodiment of the present specification.
[0169] like Figure 3 As shown, the information processing system includes an event hook module, an extraction module, an integration module, a retrieval / injection module, a reference tracking module, a state database, and memory artifact files.
[0170] The event hook module can be understood as a tool used to listen for session events (such as idle / start) of the intelligent processing unit, buffer session text, and serve as a trigger source for memory retrieval.
[0171] The extraction module can be understood as performing structured memory extraction on a single session thread.
[0172] The integration module can be understood as the periodic integration, selection, and rewriting of global and project-level memories.
[0173] The retrieval / injection module can be understood as retrieving relevant memories in a new session and injecting system prompts.
[0174] The reference tracking module can be understood as parsing the reference markers in the agent's output and updating the memory usage count and the most recent usage time.
[0175] A state database can be understood as a structured database that records the output of threads and single-threaded extraction stages, tasks, metrics, and other states.
[0176] Memory product files can be understood as including the integrated memory view and the original evidence files.
[0177] In one specific embodiment provided in this specification, the information processing system is deployed as a single-process plug-in within the host program of the large language model intelligent processing unit. The host program interacts with the information processing system through the host's event hook mechanism and tool invocation mechanism.
[0178] In one specific implementation provided in this specification, an event hook module is used to monitor session events and, in response to being in a session idle state, buffer the current session text and trigger the extraction module to perform memory retrieval.
[0179] The pollution handling module parses the session text to be processed and determines that the corresponding tool call type contains web_search.
[0180] In one scenario, if a tool call type does not meet the tool call conditions, the pollution handling module marks the session's memory mode as "polluted" and records the pollution count.
[0181] If the session's memory mode is "polluted," then according to the compliance requirements regarding "whether the memory mode is enabled," the session does not meet the compliance conditions. Therefore, the pending session text for this session is excluded and will not proceed to the subsequent extraction process.
[0182] In another scenario, if no external tools are invoked, it is assumed that each tool invocation type meets the tool invocation conditions. In this case, the event hook module listens for session events and obtains the session text to be processed.
[0183] The extraction module performs compliance checks on the pending session text that meets the tool invocation conditions, including a)-e): a) Confirm that the session is not a temporary session (is_ephemeral=false); b) Confirm that the session is not a subagent session (is_subagent=false); c) Confirm that the idle time of the session has reached the preset time threshold (e.g., set to 2 seconds). d) Confirm that the current batch processing quantity has not exceeded the preset limit; e) Confirm that the memory mode for this session is enabled.
[0184] If the session text to be processed meets all compliance conditions, the extraction module identifies at least one of the key string, token string or password string in the session text according to the preset regular expression pattern, and replaces each target string with a target placeholder without actual semantics to obtain the de-identified session text.
[0185] Input the anonymized session text into a lightweight first language model, requiring it to output according to a strict JSON schema, with fields including raw_memory (experience summary), rollout_summary (session summary), and is_durable (whether it is persistent).
[0186] In the extraction module, quality gating filtering is performed, specifically: determining whether the memory content field and the target flag meet the preset quality conditions.
[0187] For example, check the is_durable field in the memory content field. If the is_durable field is negative, discard the experience summary attribute information.
[0188] Determine the length of the text corresponding to the memorized content field. If it is less than or equal to the preset minimum length threshold, discard the memorized content field.
[0189] Based on the analysis results of the lightweight first language model, determine whether there is any experience to reuse. If not, record it as blank.
[0190] If the quality gating screening passes, the structured memory information is identified as the target structured memory information and stored in the stage1_outputs table of the state database. The target structured memory information includes the target working directory (the working directory cwd of the current session) and the target scope (filled with project or unknown depending on whether cwd is empty).
[0191] Furthermore, in subsequent sessions, the retrieval and injection module injects the integrated target memory view file into the prompts of the intelligent processing unit, enabling the intelligent processing unit to acquire historical experience across sessions.
[0192] When the intelligent processing unit actually references a memory in its output, the intelligent processing unit actively appends a structured reference mark to the end of its output. <mem-citation>The citation tag contains a unique identifier for the referenced memory (rollout_ids) and line-level location information (citation_entries).
[0193] The reference tracking module parses the reference tags, performs an incremental update on the usage count field of the historical structured memory information corresponding to the unique identifier (usage_count = usage_count + 1), refreshes the last usage time field (last_usage = NOW()), and writes the update results back to the status database.
[0194] Based on the above, and according to the lease mechanism and cooldown period, a global and project-wide integration phase is triggered for structured experience summaries that meet the eligibility gates. It's important to understand that before the global and project-wide integration phase, the top-N (e.g., a default upper limit of 256) of each structured experience summary that meets the eligibility gates are selected in descending order of usage count and most recent usage time to construct a candidate integration set for further integration.
[0195] The candidate set is input into the second language model, which is then used to perform deduplication and merging, contradiction resolution (replacing old with new), and abstract generalization (concrete to general principles). Based on the substantive semantics of the memorized content, it is determined whether it belongs to "globally general knowledge" or "project-specific knowledge".
[0196] If the knowledge is globally universal, it is written to the global memory view file. If the knowledge is project-specific, it is written to the project memory view file (.project_memory / PROJECT_MEMORY.md).
[0197] At the same time, an audit difference file (phase2_workspace_diff.md) is generated to record the addition, modification and deletion operations of the global workspace view file or the project workspace view file.
[0198] In response to a user initiating a new session, the retrieval and injection module retrieves the current query request and determines the current working directory (cwd) corresponding to it.
[0199] Specifically, in the retrieval and injection module, the global memory view file (MEMORY.md) is retrieved, and its content is appended to the preset prompt word. The project memory view file in the current working directory is retrieved, and its existence is checked. If it exists, its content is appended to the preset prompt word; otherwise, injection is not performed. It should be noted that this manual will not report errors if injection is not performed.
[0200] Subsequently, the retrieval and injection module inputs the preset prompts (which already contain the loaded memory view content) into the intelligent processing unit, which then outputs the query results corresponding to the current query request.
[0201] According to the information processing system architecture diagram provided in this manual, multiple quality gating mechanisms, including compliance conditions, flag checks, and length thresholds, suppress the inclusion of weak memories in the database from the source, thereby improving the overall signal-to-noise ratio of the database. By using usage count updates driven by reference tags and selection sorting based on usage frequency, frequently used memories are given priority for inclusion in the final view, achieving a natural selection of memory value. Semantic sorting categorizes knowledge into global or project memory view files, and during injection, path matching based on the current working directory (cwd) determines whether to load the project memory view file, achieving a coexistence of global knowledge sharing and physical isolation of project knowledge. Pre-detection of tool call types and pollution status marking ensure that sessions calling untrusted external tools are intercepted by compliance conditions, thus preventing untrusted content from being solidified into long-term memory. Version control style difference files generated during the integration phase record every addition, modification, and deletion operation of memories, providing a data foundation for automated updates and traceable eviction of memories.
[0202] Furthermore, corresponding to the system architecture diagram of the information processing system, this specification also provides an information processing flowchart. Figure 4 A flowchart illustrating an information processing procedure provided in one embodiment of this specification is shown. Figure 4 As shown, it includes: In one specific embodiment provided in this specification, The event hook module listens for session events and retrieves the session text to be processed.
[0203] In the tool call type monitoring, the session text to be processed is parsed to determine at least one tool call type corresponding to the session text to be processed.
[0204] In one scenario, if an external content tool (such as web_search, fetch, or browse) is detected in the tool call type, meaning that the tool call type does not meet the tool call conditions, then the memory pattern of that session is marked as "polluted," and the thread is skipped, meaning that the session is excluded from the subsequent retrieval process. Its memory pattern is then determined to be in a polluted state.
[0205] In another scenario, if no external content tool is detected in the tool invocation type, meaning all tool invocation types meet the tool invocation conditions, the pending session text is then transmitted to the eligibility gating node.
[0206] At the qualification gating node, qualification gating detection includes: detecting whether the session text to be processed is a temporary session or a sub-intelligent processing unit session; detecting whether the duration or idle time of the session text to be processed reaches a preset time threshold; detecting whether the batch processing quantity of the session text to be processed exceeds a preset upper limit; and detecting whether the memory mode of the session text to be processed is enabled.
[0207] If the qualification gating detection is passed, sensitive information desensitization is performed, including identifying the key string, token string or password string in the session text to be processed according to a preset regular expression pattern, and replacing the identified string with a target placeholder without actual semantics.
[0208] After desensitizing sensitive information, a single-threaded extraction phase is initiated to perform structured extraction, resulting in structured memory information. Specifically: In one specific implementation, the desensitized conversation text to be processed is input into a first language model so that the first language model outputs the corresponding structured memory information according to a preset structured format, wherein the structured memory information includes memory content fields and persistence flag bits.
[0209] The structured memory information is input into the quality gating node. In the quality gating node, it is determined whether the memory content field and the target flag meet the preset quality conditions.
[0210] If the persistence flag indicates that the memory is not persistent, then the structured memory information is discarded. If the text length of the structured memory information is less than the preset minimum length threshold, the structured memory information is discarded. If the first language model determines that there is no reusable experience in the current session, it records it as a no-memory state and exits the extraction process, prohibiting the fabrication of false memories.
[0211] In one scenario, if the target flag indicates non-persistence (is_durable=false), or the text length of the memory content field is less than or equal to a preset minimum length threshold, or the first language model determines that the session text to be processed does not have reusable experience, the system discards the structured memory information or records it as a memoryless state (recorded as empty). The process terminates on that session, and no content is written to the state database.
[0212] In another scenario, when the target flag indicates persistence (is_durable=true) and the text length exceeds a preset minimum length threshold, the structured memory information meets the preset quality conditions and is identified as the target structured memory information. The data stream then enters the state database write node.
[0213] In the write node, the target structured memory information is stored in the output table (stage1_outputs) of the state database. The target structured memory information includes the target working directory (cwd) and the target scope, and initializes the usage count field (usage_count=0) and the last usage time field (last_usage is empty).
[0214] Upon entering the integration trigger node, if the lease lock is successfully acquired, the time since the last integration completion exceeds the preset cooldown time, and the number of newly added memories in the state database exceeds the preset change threshold, then the preset integration trigger conditions are considered met.
[0215] Upon entering the usage count-based sorting node, a preset selection rule is obtained from the usage count-based sorting node. Based on the preset selection rule, historical structured memory information is selected from the state database as an integration candidate set. The selection rule includes: sorting each historical structured memory information in descending order of usage frequency (usage_count) and most recent usage time (last_usage), and selecting the top N structured memory information in the sorting as the integration candidate set.
[0216] Optionally, the preset selection rules also include: multi-level sorting by usage count in descending order, most recent usage time in descending order, and creation time in descending order; during the retrieval scoring stage, a logarithmic factor is applied to the usage count, wherein the logarithmic factor is the logarithm of the usage count plus one, which is base 2.
[0217] The candidate set for integration is input into the integration node. Within the integration node, the candidate set is then input into the second language model. The second language model performs deduplication, contradiction resolution, and abstract generalization processing on the structured memory information within the candidate set to obtain the integrated content. Furthermore, semantic analysis is performed on the integrated content based on the second language model to determine its knowledge attribution (globally applicable knowledge or project-specific knowledge), and this is written to the corresponding memory view file. Simultaneously, the original evidence file is preserved, and a workspace discrepancy file (i.e., the audit discrepancy file) is generated.
[0218] In the new session, the retrieval and injection module performs scope filtering according to the current working directory (cwd), unconditionally injects the global memory view file, injects the project memory view file that matches the path, and inputs the preset prompt words into the information processing model.
[0219] When the intelligent processing unit actually uses the injected memory in its output, the intelligent processing unit actively appends a structured reference tag to the end of the output.
[0220] The information processing system enters the reference resolution node, parses the reference tag, performs an incremental update on the usage count field of the historical structured memory information corresponding to the reference tag (usage_count = usage_count + 1), refreshes the last usage time field (last_usage = NOW()), and writes the update result back to the status database.
[0221] It should be noted that the difference file in this manual is used to drive memory learning and forgetting. Specifically, it includes: recording the additions, modifications, and deletions made to the global memory view file and the project memory view file during this integration process using a version control style; and inputting the previously generated difference file into the second language model when the next integration is triggered, so that the second language model can identify invalid memories and update or discard them based on the difference file.
[0222] According to the specific implementation methods provided above in this specification, the lease lock mechanism ensures that only one integration task is executed at a time in multi-threaded or concurrent triggering scenarios of the host process, avoiding data overwriting, content interleaving, or file corruption caused by concurrent writing to the target memory view file. Simultaneously, the heartbeat renewal mechanism solves the lease deadlock problem caused by abnormal process crashes, improving the system's robustness and self-healing capabilities. Through dual throttling control of cooldown time and minimum change threshold, the integration task is effectively prevented from being frequently triggered in a short period, controlling the calling frequency and input / output operations of the second language model, thereby significantly reducing the system's computational resource consumption and operating costs.
[0223] The deduplication and merging operation performed by the second language model compresses a large amount of fragmented and redundant original memories describing the same problem into highly refined knowledge units, significantly reducing the redundancy of memory storage. Simultaneously, through conflict resolution operations, the integrated memory view file no longer contains conflicting knowledge, ensuring the consistency and reliability of the reference information received by the agent. Through abstract generalization operations, concrete operational experiences are elevated to universal technical principles, enhancing the cross-scenario reuse value of these experiences.
[0224] By classifying knowledge based on content semantic analysis, rather than mechanically reading preset scope fields from the database, more accurate and reasonable knowledge sorting is achieved. This allows globally common knowledge (such as React Hooks specifications and build tool configuration principles) to be shared by all projects, while project-specific knowledge (such as business component configurations and proprietary API addresses for a specific project) is physically isolated in their respective project directories, achieving the design goal of "fully sharing what can be shared and resolutely isolating what needs to be isolated."
[0225] By generating version control-style workspace diff files, an auditable and traceable change log is established for each integration operation. This diff file details the additions, modifications, and deletions made to global and project view files during the integration, enabling system operators and developers to review the specific changes made in any integration at any time. This solves the core problem in the background technology of "lack of auditable driving signals for memory updates and forgetting."
[0226] By using hierarchical storage of global and project views and scope-isolated injection based on working directory, the following specific effects are achieved: General knowledge in the global view is available across all projects, improving the efficiency of cross-project knowledge reuse; specific knowledge in the project view is only available within the matching working directory, fundamentally eliminating cross-project memory pollution. In the example scenario of this implementation, when a developer switches projects, the agent will not incorrectly apply front-end configuration experience from project A to back-end development tasks in project B, thus avoiding the introduction of misleading context.
[0227] Corresponding to the above method embodiments, this specification also provides embodiments of an information processing apparatus. Figure 5 A schematic diagram of the structure of an information processing apparatus according to an embodiment of this specification is shown. Figure 5 As shown, the device includes: Acquisition unit 502 is configured to acquire the text of the session to be processed; Extraction unit 504 is configured to extract structured memory information corresponding to the session text to be processed, wherein the structured memory information includes memory content fields and target flag bits; Storage unit 506 is configured to determine the structured memory information as target structured memory information and store it in a state database. The target structured memory information is structured memory information whose memory content fields and target flag bits meet preset quality conditions. The state database includes at least one historical structured memory information. The target structured memory information includes a target working directory and a target scope. Integration unit 508 is configured to integrate the target structured memory information and each historical structured memory information to obtain a target memory view file, wherein the target memory view file is determined based on the target working directory and the target structured memory information of the target scope that meet the preset integration trigger conditions.
[0228] Furthermore, the acquisition unit 502 is also configured as follows: Parse the session text to be processed and determine at least one tool call type corresponding to the session text to be processed; If each tool call type meets the tool call conditions, determine whether the session text to be processed meets the compliance conditions; If each tool call type meets the tool call conditions, extract the structured memory information corresponding to the session text to be processed; If a tool call type does not meet the tool call conditions, the default workflow will be executed.
[0229] Furthermore, the compliance requirements include at least one of the following: Whether the session text to be processed is a temporary session or a sub-intelligent processing unit session; Whether the duration or idle time of the pending session text reaches a preset time threshold; Does the batch processing quantity of the pending session text exceed the preset upper limit? Is the memory mode of the session text to be processed enabled?
[0230] Furthermore, the extraction unit 504 is further configured as follows: Based on a preset regular expression pattern, at least one target string in the session text to be processed is identified, and each target string is replaced with a target placeholder to obtain the desensitized session text; The desensitized conversation text is input into a first language model, and the corresponding structured memory information is output according to a preset structured format based on the first language model. The structured memory information includes memory content fields and target flag bits.
[0231] Furthermore, the extraction unit 504 is also configured as follows: Determine whether the memory content field and the target flag bit meet the preset quality conditions; If the memory content field and the target flag do not meet the preset quality conditions, the reason for the non-compliance is analyzed, and the processing operation is determined based on the reason for the non-compliance.
[0232] Furthermore, the extraction unit 504 is further configured as follows: If the target flag indicates that the information is not persistent, and / or the text length of the structured memory information is less than a preset minimum length threshold, the structured memory information is discarded. If the first language model determines that there is no reusable experience in the session text to be processed, it is recorded as a memoryless state.
[0233] Furthermore, the integration unit 508 is further configured as follows: Based on the target structured memory information and the historical structured memory information, a candidate set for integration is determined; The integrated candidate set is input into the second language model, and based on the second language model, the structured memory information in the integrated candidate set is subjected to deduplication and merging, contradiction resolution and abstract generalization processing to obtain the integrated content; Based on the second language model, semantic analysis is performed on the integrated content to determine the knowledge attribution, wherein the knowledge attribution includes globally general knowledge or project-specific knowledge; If the knowledge is classified as global general knowledge, the global general knowledge is written into the global memory view file; If the knowledge is classified as project-specific knowledge, the project-specific knowledge will be written into the project memory view file.
[0234] Furthermore, the integration unit 508 is further configured as follows: Obtain the preset selection rules; Based on the preset selection rules, at least one piece of historical structured memory information is selected from the state database as an integration candidate set.
[0235] Furthermore, the preset selection rules include sorting based on the usage frequency of each historical structured memory information and determining a preset number of historical structured memory information. Accordingly, the integration unit 508 is further configured as follows: Retrieve historical conversation text; The historical conversation text is parsed to determine the reference markers, wherein the reference markers are used to determine whether historical structured memory information is used; Based on the reference tag, the usage count field of the historical structured memory information is incrementally updated to obtain the usage frequency.
[0236] Furthermore, the integration unit 508 is also configured as follows: Obtain the current query request and determine the current working directory corresponding to the current query request; Obtain the global memory view file and append its contents to the preset prompt words; Obtain the project memory view file in the current working directory. If the project memory view file exists, append its content to the preset prompt word. The preset prompt words are input into the information processing model, and the information processing model outputs the query results corresponding to the current query request.
[0237] The above is an illustrative scheme of an information processing device according to this embodiment. It should be noted that the technical solution of this information processing device and the technical solution of the information processing method described above belong to the same concept. For details not described in detail in the technical solution of the information processing device, please refer to the description of the technical solution of the information processing method described above.
[0238] Corresponding to the above method embodiments, this specification also provides embodiments of an information updating device. Figure 6 A schematic diagram of an information updating device according to an embodiment of this specification is shown. Figure 6 As shown, the device includes: The determining unit 602 is configured to determine the current request to be processed and output the current session text corresponding to the current request to be processed based on the information processing model.
[0239] The parsing unit 604 is configured to obtain the current structured memory information corresponding to the current session text.
[0240] The update unit 606 is configured to update the current structured memory information to the state database when the historical structured memory information corresponding to the current structured memory information is not found in the state database.
[0241] The above is an illustrative scheme of an information updating device according to this embodiment. It should be noted that the technical solution of this information updating device and the technical solution of the information updating method described above belong to the same concept. For details not described in detail in the technical solution of the information updating device, please refer to the description of the technical solution of the information updating method described above.
[0242] See Figure 7 , Figure 7 This specification illustrates an architecture diagram of an information processing system according to one embodiment of the present specification. The information processing system may include a client 100 and a server 200. Client 100 is used to send the pending session text to server 200; Server 200 is used to acquire the session text to be processed; extract the structured memory information corresponding to the session text to be processed, wherein the structured memory information includes a memory content field and a target flag; determine the structured memory information as target structured memory information and store it in a state database, wherein the target structured memory information is structured memory information whose memory content field and target flag satisfy a preset quality condition, the state database includes at least one historical structured memory information, and the target structured memory information includes a target working directory and a target scope; integrate the target structured memory information and each historical structured memory information to obtain a target memory view file, wherein the target memory view file is determined based on the target structured memory information of the target working directory and target scope that satisfy a preset integration trigger condition; send the target memory view file to client 100; client 100 is also used to receive the target memory view file sent by server 200.
[0243] The information processing system may include multiple clients 100 and a server 200. Clients 100 can be referred to as end-side devices, and the server 200 can be referred to as cloud-side devices. Multiple clients 100 can establish communication connections through the server 200. In the information processing scenario, the server 200 is used to provide information processing services between the multiple clients 100. Each client 100 can act as a sender or receiver, communicating through the server 200.
[0244] Users can interact with server 200 through client 100 to receive data sent by other clients 100, or send data to other clients 100, etc. In information processing scenarios, users can publish data streams to server 200 through client 100, server 200 can generate target memory view files based on the data streams, and push the target memory view files to other clients that have established communication.
[0245] In this system, client 100 and server 200 establish a connection via a network. The network provides the medium for communication between client 100 and server 200. The network can include various connection types, such as wired or wireless communication links or fiber optic cables. Data transmitted by client 100 may need to undergo encoding, transcoding, compression, or other processing before being published to server 200.
[0246] Client 100 can be a browser, an app (application), a web application such as an H5 (HyperText Markup Language 5) application, a lightweight application (also known as a mini-program), or a cloud application. Client 100 can be developed based on the software development kit (SDK) of the corresponding service provided by server 200, such as a real-time communication (RTC) SDK. Client 100 can be deployed on a computing device and depends on the device or certain apps on the device to run. The computing device may have a display screen and support information browsing, such as a personal mobile terminal like a mobile phone, tablet, or personal computer. Various other types of applications can also be configured on the computing device, such as human-computer interaction applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, and social media platform software.
[0247] Server 200 may include servers providing various services, such as servers providing communication services to multiple clients, servers supporting backend training of models used on clients, and servers processing data sent by clients. It should be noted that server 200 can be implemented as a distributed server cluster composed of multiple servers, or as a single server. The server can also be a server in a distributed system, or a server integrated with blockchain. The server can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0248] It is worth noting that the information processing methods provided in the embodiments of this specification are generally executed by the server. However, in other embodiments of this specification, the client may also have similar functions to the server, thereby executing the information processing methods provided in the embodiments of this specification. In other embodiments, the information processing methods provided in the embodiments of this specification may also be executed jointly by the client and the server.
[0249] Figure 8 A structural block diagram of a computing device according to an embodiment of this specification is shown. The components of the computing device 800 include, but are not limited to, a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and a database 850 is used to store data.
[0250] The computing device 800 also includes an access device 840, which enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 840 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0251] In one embodiment of this specification, the above-described components of the computing device 800 and Figure 8 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 8 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0252] The computing device 800 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 800 can also be a mobile or stationary server.
[0253] The processor 820 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-described information processing method.
[0254] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the information processing method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the information processing method described above.
[0255] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the information processing method described above.
[0256] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the information processing method described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the information processing method described above.
[0257] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the information processing method described above.
[0258] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the information processing method described above belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the information processing method described above.
[0259] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0260] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0261] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this specification is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this specification. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this specification.
[0262] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0263] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. These embodiments have been selected and specifically described in this specification to better explain the principles and practical applications of this specification, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. An information processing method, characterized in that, include: Get the text of the session to be processed; Extract the structured memory information corresponding to the session text to be processed, wherein the structured memory information includes a memory content field and a target flag bit; The structured memory information is identified as target structured memory information and stored in the state database. The target structured memory information is structured memory information whose memory content fields and target flags meet preset quality conditions. The state database includes at least one historical structured memory information. The target structured memory information includes a target working directory and a target scope. By integrating the target structured memory information and each historical structured memory information, a target memory view file is obtained. The target memory view file is determined based on the target working directory and the target structured memory information of the target scope that meet the preset integration trigger conditions.
2. The method as described in claim 1, characterized in that, Before extracting the structured memory information corresponding to the session text to be processed, the process also includes: Parse the session text to be processed and determine at least one tool call type corresponding to the session text to be processed; If each tool call type meets the tool call conditions, determine whether the session text to be processed meets the compliance conditions; If each tool call type meets the tool call conditions, extract the structured memory information corresponding to the session text to be processed; If a tool call type does not meet the tool call conditions, the default workflow will be executed.
3. The method as described in claim 2, characterized in that, The compliance requirements include at least one of the following: Whether the session text to be processed is a temporary session or a sub-intelligent processing unit session; Whether the duration or idle time of the pending session text reaches a preset time threshold; Does the batch processing quantity of the pending session text exceed the preset upper limit? Is the memory mode of the session text to be processed enabled? 4. The method as described in claim 1, characterized in that, Extracting the structured memory information corresponding to the session text to be processed, including: Based on a preset regular expression pattern, at least one target string in the session text to be processed is identified, and each target string is replaced with a target placeholder to obtain the de-identified session text; The desensitized conversation text is input into a first language model, and the corresponding structured memory information is output according to a preset structured format based on the first language model. The structured memory information includes memory content fields and target flag bits.
5. The method as described in claim 1, characterized in that, The method further includes: Determine whether the memory content field and the target flag bit meet the preset quality conditions; If the memory content field and the target flag do not meet the preset quality conditions, the reason for the non-compliance is analyzed, and the processing operation is determined based on the reason for the non-compliance.
6. The method as described in claim 5, characterized in that, Analyze the reasons for non-compliance, and based on the reasons for non-compliance, determine the processing operations, including: If the target flag indicates that the information is not persistent, and / or the text length of the structured memory information is less than a preset minimum length threshold, the structured memory information is discarded. If the first language model determines that there is no reusable experience in the session text to be processed, it is recorded as a memoryless state.
7. The method as described in claim 1, characterized in that, By integrating the target structured memory information and the historical structured memory information, a target memory view file is obtained, including: Based on the target structured memory information and the historical structured memory information, a candidate set for integration is determined; The integrated candidate set is input into the second language model, and based on the second language model, the structured memory information in the integrated candidate set is subjected to deduplication and merging, contradiction resolution and abstract generalization processing to obtain the integrated content; Based on the second language model, semantic analysis is performed on the integrated content to determine the knowledge attribution, wherein the knowledge attribution includes globally general knowledge or project-specific knowledge; If the knowledge is classified as global general knowledge, the global general knowledge is written into the global memory view file; If the knowledge is classified as project-specific knowledge, the project-specific knowledge will be written into the project memory view file.
8. The method as described in claim 7, characterized in that, Based on the target structured memory information and each historical structured memory information, a candidate set for integration is determined, including: Obtain the preset selection rules; Based on the preset selection rules, at least one piece of historical structured memory information is selected from the state database as an integration candidate set.
9. The method as described in claim 8, characterized in that, The preset selection rules include sorting based on the frequency of use of each historical structured memory information and determining a preset number of historical structured memory information. Accordingly, the frequency of use of each historical structured memory information is determined in the following way: Retrieve historical conversation text; The historical conversation text is parsed to determine the reference markers, wherein the reference markers are used to determine whether historical structured memory information is used; Based on the reference tag, the usage count field of the historical structured memory information is incrementally updated to obtain the usage frequency.
10. The method as described in claim 1, characterized in that, The target memory view file includes a global memory view file; After obtaining the target memory view file, the method further includes: Obtain the current query request and the global memory view file; Based on the current query request and the global memory view file, a preset prompt word is constructed; The preset prompt words are input into the information processing model, and the information processing model outputs the query results corresponding to the current query request.
11. The method as described in claim 10, characterized in that, Based on the current query request and the global memory view file, preset prompt words are constructed, including: Determine the current working directory corresponding to the current query request; Retrieve the project memory view file corresponding to the current working directory; Based on the current query request, the global memory view file, and the project memory view file, a preset prompt word is constructed.
12. An information updating method, characterized in that, include: Identify the current pending request and output the current session text corresponding to the current pending request based on the information processing model; Obtain the current structured memory information corresponding to the current session text; If the historical structured memory information corresponding to the current structured memory information is not found in the state database, the current structured memory information is updated to the state database.
13. An information processing device, characterized in that, include: The acquisition unit is configured to acquire the text of the session to be processed. The extraction unit is configured to extract the structured memory information corresponding to the session text to be processed, wherein the structured memory information includes a memory content field and a target flag bit; The storage unit is configured to identify the structured memory information as target structured memory information and store it in a state database. The target structured memory information is structured memory information whose memory content fields and target flags meet preset quality conditions. The state database includes at least one historical structured memory information. The target structured memory information includes a target working directory and a target scope. The integration unit is configured to integrate the target structured memory information and each historical structured memory information to obtain a target memory view file, wherein the target memory view file is determined based on the target working directory and the target structured memory information of the target scope that meet the preset integration trigger conditions.
14. An information updating device, characterized in that, include: The determining unit is configured to determine the current request to be processed and output the current session text corresponding to the current request to be processed based on the information processing model; The parsing unit is configured to obtain the current structured memory information corresponding to the current session text; The update unit is configured to update the current structured memory information to the state database if the historical structured memory information corresponding to the current structured memory information is not found in the state database.
15. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 12.
16. A computer-readable storage medium storing a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1 to 12.
17. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1 to 12.
