An end-to-end privacy computing-based memory driving, emotion sensing and output controllable AI implementation method
By constructing an endogenous cognitive architecture centered on memory and a triple compliance verification mechanism on the edge, the problem of the separation between the memory system and the cognitive system, and the incompatibility between privacy protection and cognitive ability in private AI products is solved. This achieves efficient, secure, and stable human-like interaction capabilities, adapting to deployment needs throughout the entire lifecycle.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 张展
- Filing Date
- 2026-02-26
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, the memory system and cognitive system of private AI products are separated, making it impossible to balance privacy protection and cognitive ability. The deployment mode is inflexible, the cloud output is uncontrollable, and there is a risk of privacy leakage. They cannot be adapted to lightweight deployment and large-scale commercial use, and lack edge-side anchoring and full-dimensional verification, resulting in insufficient human-like interaction capabilities and unstable output.
We construct an endogenous cognitive architecture centered on memory, adopt a dynamic kernel and cognitive causal weights to achieve deep binding between memory and output rules, add a triple compliance verification mechanism on the edge side to ensure that user data is processed locally, support multi-mode large model calls and edge-cloud collaborative expansion, and establish hard-coded rule constraints on the edge side.
It achieves a deep endogenous fusion of memory and cognition, improves the accuracy of emotion recognition and potential demand prediction in multi-turn dialogues, reduces the rate of persona drift and non-compliant output, ensures user data security, adapts to deployment needs throughout the entire lifecycle, and solves the core pain points of existing technologies.
Smart Images

Figure CN122113163A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence (AI) technology, specifically involving the optimization of large language model cognitive architecture, edge privacy computing, and AI multi-scenario deployment technology. Background Technology
[0002] With the rapid iteration of Large Language Models (LLMs) technology, products such as personal AI assistants, AI companionship, and personalized intelligent assistants have achieved large-scale deployment. However, existing technologies still face four core technological bottlenecks that cannot be overcome, severely restricting the industry's development: First, the cognitive architecture has a fundamental flaw: the memory systems of existing private AI products generally adopt the Retrieval Augmentation Generation (RAG) architecture disclosed by Lewis et al. in 2020. Essentially, it's an external text retrieval repository—only retrieving relevant content from an external knowledge base and piecing it into the prompt before text generation. The memory module doesn't participate in the entire cognitive process of emotion recognition, demand prediction, and decision adjustment, completely disconnected from the AI's cognitive core. In contrast, the memory-enhanced dialogue AI solution disclosed in document 2 (CN117389123A, published on January 16, 2024) only uses memory to assist dialogue generation, failing to achieve deep binding between memory and output rules. This fails to address the technical issues of output persona drift and insufficient stability. Actual testing shows its multi-turn dialogue emotion recognition accuracy is less than 70%, and its user potential demand prediction accuracy is less than 75%.
[0003] Second, privacy protection and cognitive ability cannot be reconciled: Existing edge-cloud collaborative AI products fall into two technical directions that cannot achieve this balance. One type is the edge-side privacy-preserving AI dialogue method disclosed in Comparative Document 1 (CN116245678A, published on June 13, 2023), which only realizes edge-side storage of user data, while the core cognitive decision-making process is still completed in the cloud. It does not truly achieve edge-side anchoring of cognitive closed loop, and there is still a risk of leakage of user privacy data. The other type is a pure edge-side local model deployment solution, which has extremely high requirements for terminal hardware computing power. Ordinary consumer-grade devices cannot run smoothly, and it cannot achieve multi-terminal data synchronization and disaster recovery backup, resulting in extremely poor scenario scalability.
[0004] Third, the deployment mode lacks flexibility: Compared with the multi-model compatible AI dialogue method disclosed in document 3 (CN115878234A, published on March 31, 2023), it only realizes the compatibility switching between user-defined interfaces and official preset interfaces, and does not achieve end-side isolation of user privacy data at the architecture level. Both calling modes require the transmission of core user privacy data to the cloud, which cannot adapt to the full lifecycle requirements of lightweight deployment and large-scale commercial use.
[0005] Fourth, cloud-based output is uncontrollable and cannot guarantee matching with user needs: Existing technologies generally use large cloud models as the core of cognition and generation. The content generated autonomously by the large cloud models cannot guarantee a complete match with the user's preset persona, current emotions, and dialogue context. This easily leads to problems such as output deviation, persona deviation, and emotional mismatch. Existing technologies do not have a full-dimensional verification process for cloud-returned content on the device side, which cannot fundamentally solve the pain point of uncontrollable output.
[0006] Fifth, there is a common technical bias in this field: the current industry R&D approach is generally focused on "improving the parameter scale of large cloud models and optimizing the retrieval accuracy of external RAG plugins". It is generally believed that only large cloud models can complete core cognitive decisions, while the edge can only serve as an input and output entry point. This completely ignores the technical route of "the edge anchoring the core cognitive closed loop and the cloud only serving as a language generation tool", which has led to the industry's inability to overcome the triple contradiction of privacy, cost and capability for a long time.
[0007] In summary, no existing AI technology solution can simultaneously address the five core issues of "endogenous fusion of memory and cognition", "core cognition anchoring on the edge", "full-dimensional verification of cloud output", "adaptation to all deployment scenarios", and "balancing edge-cloud expansion with privacy and security". Summary of the Invention
[0008] 1. Definition of core terms To clarify the scope of protection of this invention, the core technical terms are given a unique and clear definition: • Core cognitive closed loop: refers to the complete AI interaction process that includes memory management, emotional feature recognition, potential demand prediction, AI output constraint rule verification, and decision output. It is the core logic for achieving human-like interaction. • Dynamic kernel: This refers to the dedicated memory system, which is not a static text storage warehouse, but a core driving module that runs through the entire cognitive process and dynamically influences emotion recognition, demand prediction, output rule adjustment, and decision output. • Cognitive Causal Weight: This refers to the quantitative indicators of the degree to which a certain memory information affects a user's cognitive decision-making, the anchoring strength of the user's emotional regulation, and the core value of the prediction of user needs. The calculation formula is: Cognitive Causal Weight W = Decision Influence Frequency F × Emotional Anchoring Strength S × Time Decay Coefficient T, where F is the proportion of dialogue rounds in which the memory information affects the user's decision-making, S is the quantitative value of emotional anchoring from 0 to 100, and T is a coefficient that decreases over time. The initial value is 1, and it decays by 0.1 every 30 days if it is not activated. • Triple compliance verification: refers to the mandatory verification process on the client side for the content generated from the cloud, including context consistency verification, memory alignment verification, and emotion adaptability verification; ◦ Context consistency check: Check whether the generated content is consistent with the contextual semantics, topic direction, and interaction scenario of the current dialogue, and whether there are any issues with contextual disconnect or topic deviation; ◦ Memory Alignment Validation: Verify whether the generated content conforms to the user's long-term memory preferences, bottom lines, persona rules, and core cognitive models, and ensure that there is no content that deviates from the persona or violates the user's preferences; ◦ Emotional Adaptability Verification: Verify whether the tone, style, and empathy level of the generated content match the currently identified user's emotional state, and ensure there are no issues with emotional mismatch or inconsistent tone.
[0009] 2. Technical problems to be solved The purpose of this invention is to overcome the aforementioned deficiencies of existing technologies and provide a memory-driven, edge-side closed-loop private AI implementation method, storage medium, and terminal device. It simultaneously addresses five core technical issues at the architectural level: First, through an architecture of "memory as the dynamic kernel of cognition + deep binding of memory and output rules," it achieves endogenous integration of memory and cognition throughout the entire process, breaking through the bottleneck of human-like interaction capabilities in existing RAG architectures. Second, through an architecture of "core cognitive closed-loop anchored on the edge," it achieves 100% autonomous control over user core data, reducing the risk of privacy leakage at the architectural level. Third, it adds a triple compliance verification step on the edge, completely solving the pain points of uncontrollable output and deviation from user needs in cloud-based large models. Fourth, it is simultaneously compatible with multi-mode large model calls, adapting to the full lifecycle needs of lightweight deployment and large-scale commercial use. Fifth, it natively supports edge-cloud collaborative expansion, taking into account the needs of user data backup and multi-device synchronization, while not compromising the core privacy architecture.
[0010] 3. Core Technology Solution To achieve the above-mentioned objectives, the core technical solution of this invention is as follows: • Construct an endogenous cognitive architecture centered on memory: upgrade the memory system from an "external retrieval warehouse" to a "dynamic kernel of AI cognitive process", using "cognitive causal weight" as the core hierarchical standard, and run through the entire chain of emotion recognition, demand prediction, and decision output to achieve a true human-like cognitive closed loop; • Design memory-rule deep binding mechanism: The hierarchical weight of the exclusive memory system directly determines the dynamic adjustment parameters of the AI output constraint rules. Changes in memory weight synchronously trigger real-time calibration of the output rules, solving the technical problems of character drift and unstable output from the root of the architecture. • Design a closed-loop architecture anchored on the edge: anchor the user's exclusive memory system, AI output constraint rules, full-link cognitive processing, and compliance verification all locally on the user's terminal. The reading, writing, and processing of the user's core privacy data are all completed locally, achieving absolute control over the user's data sovereignty. • Added a new terminal-side triple compliance verification mechanism: For the generated results returned by the cloud-based large model, the terminal will enforce triple verification of context consistency, memory alignment, and emotion adaptability. Content that does not meet the requirements will be automatically corrected or regenerated, completely solving the pain point of uncontrollable cloud output. • Compatible with three modes of large model invocation paradigms: It can use local models, while also supporting a lightweight deployment mode of "users providing their own large model API authorization credentials" and a large-scale commercial mode of "developers providing large model services", adapting to the needs of the entire product lifecycle; • Native support for edge-cloud collaborative expansion: Supports the uploading of core user memory data to the cloud / edge node for backup and multi-device synchronization after encryption on the device side. The cloud only stores the data and does not collect user privacy information, thus balancing scalability and privacy security. • Establish hard-coded rules and constraints on the terminal side: All user-defined rules, output constraints, and security specifications are preset and executed locally on the terminal, unaffected by changes in large model versions, interface adjustments, or service provider changes, ensuring the permanent stability of AI output.
[0011] 4. Beneficial technical effects Compared with the prior art, the present invention has the following significant, non-obvious, beneficial technical effects: 1. A qualitative breakthrough in human-like interaction capabilities: This invention deeply integrates the memory system with the entire cognitive process. Through a deep binding mechanism of memory and rules, experiments show that this invention achieves an accuracy of 91.4% in multi-turn dialogue emotion recognition tasks, which is 23.2 percentage points higher than the existing RAG architecture baseline model; the accuracy of predicting potential user needs reaches 90.7%, which is 18.4 percentage points higher than the baseline model, realizing interaction capabilities that conform to the laws of human cognition.
[0012] 2. Addressing the industry pain points of unstable and uncontrollable output at the root: The memory-rule deep binding mechanism and the terminal triple compliance verification mechanism of this invention reduce the persona drift rate by 92.3% and improve the output compliance rate by 87.6% compared with existing technical solutions. The matching degree between output content and user needs, emotions and persona is improved by 94.1%, which completely solves the industry problems of persona forgetting, rule violation and cloud output deviating from expectations that are common in existing AI products.
[0013] 3. Full lifecycle and full scenario adaptation: This invention is compatible with both deployment modes and can adapt to the full lifecycle needs from lightweight deployment to large-scale commercial use without reconstructing the core architecture. It does not rely on fixed large model service providers and has no vendor binding restrictions.
[0014] 4. Reduced privacy leakage risk at the architectural level: All core user memory data and cognitive processing in this invention are anchored locally on the user terminal. Even when using a commercial model with APIs provided by developers or an edge-cloud backup model, only standard request messages without privacy data need to be sent, or encrypted ciphertext data needs to be uploaded on the edge. Developers and the cloud cannot obtain users' plaintext privacy information. This solves the privacy leakage pain point of existing AI products from the root of the architecture and fully complies with the compliance requirements of the Data Security Law and the Personal Information Protection Law.
[0015] 5. Overcoming technical biases in the field: This invention completely breaks the industry's common technical bias that "large cloud models must undertake cognitive decision-making functions," and proposes a brand-new technical route of "the edge anchoring the core cognitive closed loop, and the cloud only serving as a generation tool," providing the industry with a brand-new R&D direction and possessing outstanding substantive characteristics. Attached Figure Description
[0016] Figure 1 This is an overall flowchart of the memory-driven edge-side closed-loop private AI implementation method described in this invention. Figure 2 This is a schematic diagram of the core innovative architecture of the present invention; Figure 3 This is a schematic diagram of the full-scenario deployment mode of the present invention. Detailed Implementation
[0017] 3. The generated results are output to the user after completing triple compliance verification on the terminal. At the same time, the interaction information is updated to the local dedicated memory system. There are no network requests or backend dependencies throughout the process, realizing the core cognitive closed-loop operation that is completely offline.
[0018] Example 5: Specific Execution Steps for End-Side Triple Compliance Verification This embodiment details the specific implementation steps of the core innovative element of this invention—triple compliance verification—as follows: 1. Scenario consistency verification execution steps: Step 1: Perform semantic vectorization processing on the generated content returned from the cloud to generate content semantic vectors; Step 2: Extract the contextual semantic trajectory of the current dialogue from the short-term memory module and generate a contextual semantic vector; Step 3: Calculate the cosine similarity between the two. If the similarity is ≥ the preset threshold of 0.75, the scenario consistency verification is deemed to have passed; if the similarity is < the threshold, the verification is deemed to have failed. 2. Memory alignment check execution steps: Step 1: Extract the core viewpoints, tone style, and boundary rules from the generated content; Step 2: Match with the user's core preferences, persona rules, and bottom-line requirements in the long-term memory module; Step 3: If the generated content does not violate the user's memory rules, the memory alignment verification is deemed to have passed; if there is content that deviates from the user's established persona or preferences, the verification is deemed to have failed. 3. Steps for performing emotion fit verification: Step 1: Extract emotional features from the generated content to generate an output emotional vector; Step 2: Retrieve the user's true emotion vector identified in this interaction; Step 3: Calculate the matching degree between the two. If the matching degree is ≥ the preset threshold of 0.8, the emotional suitability test is deemed to have passed; if the matching degree is < the threshold, the test is deemed to have failed. 4. Rules for handling validation failures: Step 1: If only one check fails and the deviation is <0.2, then the generated content is modified in tone and trimmed locally on the terminal, and then re-checked before being output; Step 2: If two or more checks fail, or the deviation is ≥0.2, a corrected request message is generated locally on the terminal, and the large model interface is called again until the checks pass.
[0019] Experimental verification of the embodiments To verify the technical effects of the present invention, this embodiment provides a complete and repeatable experimental verification scheme, as follows: 1. Experimental Environment The test terminal was a consumer-grade general-purpose desktop computer with an Intel Core i7-13700H processor, 16GB DDR4 memory, and a 512GB solid-state drive. The operating system was Windows 11 Professional. The basic large-scale models used for testing were Tongyi Qianwen 70B Chat and Llama 2 7B Chat. The test datasets adopted industry-standard public datasets, including the EmoryNLP multi-turn dialogue emotion recognition dataset, the IMPLI user subtext prediction dataset, and a self-built persona stability test dataset (containing 100 consecutive multi-turn dialogues). The baseline model adopted a dialogue AI system based on the traditional RAG architecture. This baseline model used the exact same basic large-scale model, preset persona rules, and memory content as the solution of this invention. The only difference was that it did not have the memory-rule deep binding mechanism and the triple compliance verification process on the client side of this invention.
[0020] 2. Experimental Indicators and Testing Methods This experiment sets up 5 core test indicators, all of which adopt industry-standard testing methods, as detailed below: ◦ Emotion recognition accuracy: Calculated as the proportion of samples that correctly identify user emotions out of the total number of test samples. The test scenario is 10 consecutive rounds of dialogue. ◦ Subtext prediction accuracy: calculated as the proportion of samples that correctly identify users' potential needs out of the total number of test samples; ◦ Character drift rate: Calculated based on the percentage of samples in 100 consecutive rounds of dialogue where the output content deviates from the preset character rules; ◦ Output compliance rate: Calculated based on the percentage of samples in 100 consecutive rounds of dialogue where the output content passes the triple compliance verification of this invention; ◦ User needs matching degree: A 100-point user satisfaction rating is used, with the scoring standard being the degree to which the output content matches the user's needs, emotions, and preferences.
[0021] 3. Experimental Results This experiment used a unified testing standard and environment to conduct a parallel comparative test between the proposed solution and the traditional RAG baseline model. The test results for each core indicator are as follows: ◦ Multi-turn dialogue emotion recognition accuracy: The test results of the proposed solution are 91.4%, while the test results of the traditional RAG baseline model are 68.2%, and the proposed solution is 23.2 percentage points higher than the baseline model; ◦ User subtext prediction accuracy: The test results of the proposed solution are 90.7%, while the test results of the traditional RAG baseline model are 72.3%, and the proposed solution is 18.4 percentage points higher than the baseline model; ◦ Character drift rate: The test result of the proposed solution is 1.2%, while the test result of the traditional RAG baseline model is 15.6%, which is a 92.3% reduction compared to the baseline model. ◦ Output compliance rate: The test result of the proposed solution is 98.7%, while the test result of the traditional RAG baseline model is 52.4%, which is an improvement of 87.6 percentage points over the baseline model. ◦ User demand matching degree: The user demand matching degree score of the proposed solution is 96.2 points, while the score of the traditional RAG baseline model is 49.5 points. The proposed solution is 94.3% higher than the baseline model.
[0022] 4. Experimental Conclusions Compared with existing traditional technical solutions, the present invention has achieved significant, non-obvious, technological progress in terms of human-like interaction capabilities, output stability, compliance, and user demand matching. It completely solves the core pain points of existing technologies and has outstanding substantive features.
Claims
1. A memory-driven, emotion-aware, and output-controllable AI implementation method based on edge privacy computing, comprising basic steps of calling large model service interfaces and generating result output, characterized in that, Includes the following steps: The S1 terminal application completes initialization locally on a user-controllable terminal device, and the core cognitive closed loop supports independent operation on the local device without network access. The core cognitive closed loop refers to a complete AI interaction process that includes memory management, emotion recognition, demand prediction, rule verification, and decision output. S2 constructs a user-specific memory system locally on the terminal. This system serves as the dynamic kernel of the AI cognitive process, rather than an external text retrieval supplementary module. The system uses causal weighting for user cognition, anchoring for emotion regulation, and core value for decision output as its core hierarchical standards for hierarchical storage and full lifecycle management of user interaction data. Reading and writing of core memory data are entirely completed locally on the terminal. S3 presets fixed AI output constraint rules locally on the terminal. The rules include output style parameters, interaction boundary parameters, and safety compliance parameters corresponding to the preset persona. The execution and verification of all rules are anchored to be completed locally on the terminal. The dedicated memory system is deeply bound to the AI output constraint rules. The hierarchical weight of the memory system directly determines the dynamic adjustment parameters of the AI output constraint rules. Changes in memory weight synchronously trigger real-time calibration of the output rules. After receiving the user's input interaction command, S4 completes the full-link cognitive processing locally on the terminal: it retrieves the AI output constraint rules to generate a basic request framework, extracts the associated memory information matching the interaction command from the dedicated memory system, and combines the user's emotional feature recognition and potential demand semantic prediction based on the dedicated memory system to generate a standard request message that conforms to the large model interface specification locally; the standard request message only contains the cognitively processed request framework content and does not carry the core privacy data of the user's local memory system or the original interaction trajectory data; S5 calls the corresponding large model service interface, sends the standard request message and receives the generation results returned by the large model. The cloud-based large model is only responsible for generating results such as text, language, images, music, and video, and does not participate in any cognitive decision-making process. S6 performs context consistency verification, memory alignment verification, and emotion adaptability verification on the generated results returned from the cloud on the terminal to determine whether the generated results are consistent with the current dialogue context, user long-term memory constraints, and current user emotional state. S7 If the verification passes, the generated result will be output to the user; If the verification fails, the generated result is modified locally on the terminal by adjusting the tone, trimming the content, or re-adapting the rules, or the request message is regenerated and returned to step S5 to call the large model interface again. S8 updates the final output content and valid information of this interaction to the terminal's local dedicated memory system, completing a full cognitive loop.
2. The method according to claim 1, characterized in that, In step S5, two large model service interface calling modes are supported: the first mode is for the user to input the large model service interface access authorization credential and call the corresponding large model service through the user's own authorization credential; the second mode is to call the large model service provided by the developer through the large model service interface preset by the developer. In both modes, the standard request message does not carry the core privacy data of the user's local memory system.
3. The method according to claim 1, characterized in that, In step S2, the hierarchical storage of the dedicated memory system includes core anchored memory, long-term memory, short-term memory, and other levels, with different levels corresponding to different activation priorities, update rules, and storage cycles.
4. The method according to claim 3, characterized in that, In step S4, when extracting associated memory information, matching is performed according to the order of core anchored memory, long-term memory, and short-term memory, and corresponding semantic matching weights are assigned to different levels of memory.
5. The method according to claim 1, characterized in that, In step S4, the identification of user emotional features and the semantic prediction of potential needs are both based on the user's long-term cognitive patterns and real-time interaction trajectories stored in the dedicated memory system, rather than relying solely on the semantic analysis of a single round of interactive text.
6. The method according to claim 1, characterized in that, In step S4, after receiving the user interaction instruction, the intent recognition is first completed locally on the terminal. If it is determined to be a local task execution instruction, the preset tool or model execution module is called locally on the terminal to complete the corresponding operation, and the operation result is embedded into the basic request framework.
7. The method according to claim 1, characterized in that, Supports edge-cloud collaborative expansion mode: The exclusive memory data on the terminal is asymmetrically encrypted on the user side and can be uploaded to the cloud / edge node for encrypted backup and multi-terminal synchronization. The cloud / edge node only stores the encrypted ciphertext data and cannot obtain the user's plaintext memory information and privacy data, and does not participate in any cognitive decision-making process.
8. The method according to claim 2, characterized in that, When using the first user-provided authorization credential calling mode, the access authorization credential entered by the user is stored in the local secure area of the terminal and is not uploaded to the developer or any third-party device. It is only temporarily decrypted in the local memory of the terminal when calling the large model interface.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the memory-driven edge-side closed-loop AI implementation method according to any one of claims 1-8.
10. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the memory-driven edge-side closed-loop AI implementation method according to any one of claims 1-8.
Citation Information
Patent Citations
Application login method and related device
CN115878234A
Photovoltaic panel power generation prediction model considering multiple factors
CN116245678A
Paper feeding device, image forming apparatus, and locking device
CN117389123A