End-cloud hybrid retrieval enhancement generation system and method oriented to privacy security

The RAG system, with its edge-cloud hybrid architecture, resolves the conflict between privacy protection and performance optimization, achieving improvements in data security and system performance, generating high-quality answers, and is suitable for fields with high privacy protection requirements such as healthcare and finance.

CN120408700APending Publication Date: 2025-08-01UNIV OF SCI & TECH OF CHINA
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510479709.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

Existing fully cloud-based and fully localized RAG systems face a trade-off between privacy protection and performance optimization, as well as issues such as data breach risks, regulatory compliance challenges, high hardware costs, high computing power requirements, and poor scalability.

Method used

It adopts an edge-cloud hybrid architecture, generates desensitized prompts through a local processing module, and uses a cloud processing module to rewrite and generate encrypted responses, ensuring that privacy data is stored and processed locally, and combines the powerful computing power of a large language model for reasoning.

Benefits of technology

It enhances data security, reduces the risk of privacy leaks, improves system performance and scalability, and generates high-quality response information that complies with privacy regulations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408700A_ABST
    Figure CN120408700A_ABST
Patent Text Reader

Abstract

The invention discloses a privacy security-oriented end-cloud hybrid retrieval enhancement generation system and method, and relates to the field of computer science and technology, and the system comprises a local processing module and a cloud processing module. And the cloud processing module performs data interaction with the local processing module. The local processing module generates an enhanced cue word based on the user query information, and performs desensitization operation on the enhanced cue word to obtain a desensitized cue word; the cloud processing module rewrites the desensitized cue word to obtain a rewritten cue word, and adopts a large language model to generate encrypted answer information based on the rewritten cue word; the local processing module also generates final answer information based on the encrypted answer information. The data security can be improved while the expansibility and the system performance are improved, and the potential risk of privacy disclosure is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer science and technology, and particularly to an end-cloud hybrid retrieval enhanced generation system and method for privacy security. Background Art

[0002] Retrieval-Augmented Generation (RAG) is a hybrid architecture technology that combines information retrieval and generative models to address challenges in complex knowledge retrieval and generation tasks. Traditional generative models (such as GPT-3, GPT-4) can generate high-quality natural language content, but are prone to being limited by the scope of training data when dealing with questions containing factual knowledge, resulting in inaccurate or inconsistent generation results. By introducing a retrieval mechanism into the generation process, RAG technology can effectively make up for this deficiency.

[0003] The core idea of RAG is to use an external knowledge base (such as a document database, vector database) to retrieve context-related information in real time, and input the retrieved context-related information together with the user's query into the generative model to generate a more accurate and context-related answer. Its workflow generally includes the following steps:

[0004] (1) Retrieval stage: Retrieve relevant document fragments from the knowledge base according to the user's query.

[0005] (2) Generation stage: Combine the retrieval result with the user's query and input it as a prompt into the generative model to generate the final answer.

[0006] The main advantages of RAG technology include:

[0007] 1. Knowledge enhancement: Expand the knowledge scope of the generative model by retrieving the external knowledge base.

[0008] 2. Efficient computing: Reduce the dependence of the generative model on large-scale parameters and lower the hardware cost.

[0009] 3. Dynamic update: The knowledge base can be updated in real time to ensure the timeliness of the generated content.

[0010] With the strengthening of privacy protection requirements and the rapid development of generative artificial intelligence technology, the traditional fully cloud-based or completely localized RAG system architecture faces significant challenges in terms of performance and security.

[0011] In existing RAG systems, it mainly includes the full end-side (as shown in Figure 1 ), and the full cloud-side (as shown in Figure 2There are two typical architectures as shown. The full-edge solution, such as GPUStack, realizes document retrieval and generation inference by locally deploying a GPU (Graphics Processing Unit) computing cluster. Among them, the retrieval module uses a distributed vector database [such as Milvus, FAISS (Facebook AI Similarity Search), etc. for high-dimensional spatial data retrieval] to store document embedding vectors, and realizes efficient retrieval through document ID (IDentity) and vector index. During retrieval, first locate the target document set through the document ID, and then perform recall sorting based on vector similarity. The inference module uses an open-source model after quantization and compression [such as LLaMA (Large Language Model MetaAI), Vicuna, etc.], supports single-machine multi-card parallel computing, and realizes low-latency local generation.

[0012] The full-cloud solution, such as Amazon Web Services Bedrock (AWS Bedrock), adopts a cloud-native architecture and deploys the retrieval and generation capabilities completely in the cloud. Its knowledge base management is based on object storage services such as S3, supporting multi-source heterogeneous data access. The retrieval service is built based on OpenSearch (transliterated as Open Search) to realize vectorized storage and fast retrieval of documents. The generation service integrates multiple basic models such as Claude and Titan, and realizes flexible RAG pipeline orchestration through tools such as LangChain and LlamaIndex. AWS Bedrock also provides a complete data processing component, supporting preprocessing and quality control of multi-modal content such as text and images.

[0013] In contrast, GPUStack is more suitable for scenarios with extremely high requirements for data privacy, and can complete the entire process of computing locally, but requires relatively high hardware investment. While AWS Bedrock features a serverless architecture, users don't need to worry about the infrastructure and can quickly build RAG applications through the Application Program Interface (API), but the data needs to be processed in the cloud.

[0014] Based on the above description, in the existing RAG systems, the two mainstream architectures have their own advantages and disadvantages, but neither can completely solve the contradiction between privacy protection and performance optimization. At the same time, there are also a series of technical bottlenecks in the practical application of these architectures, including:

[0015] 1. Insufficient privacy protection.

[0016] Fully cloud-based solutions (such as AWS Bedrock) can utilize the powerful computing power of the cloud to support complex inference tasks. However, such solutions require users to upload sensitive data to the cloud for processing, which presents the following problems:

[0017] (1) Risk of data leakage: During data transmission and storage, sensitive information may be intercepted, leaked, or accessed without authorization, especially when the security policies of cloud service providers cannot fully meet the needs of users.

[0018] (2) Challenges in regulatory compliance: Regulations such as GDPR (General Data Protection Regulation) impose strict requirements on the use and storage of data, including geographical restrictions and privacy protection of data. This makes it difficult for users to outsource sensitive data to the cloud without violating regulations.

[0019] (3) Issue of data control: Users lose direct control over the data uploaded to the cloud, increasing the potential risk of privacy leakage.

[0020] 2. High computing power requirements.

[0021] Fully local solutions (such as GPUStack) avoid data leakage by deploying models locally, but this approach faces many challenges in terms of computing power requirements:

[0022] (1) High hardware costs: Large-scale inference tasks require the deployment of high-performance hardware (such as multi-GPU servers), which incurs high upfront costs, and additional resources are needed for equipment maintenance and upgrades.

[0023] (2) Performance limitations: Even with powerful local hardware, it is difficult to compare with cloud data centers, especially when dealing with large-scale or high-concurrency tasks. The computing power bottleneck of local solutions will significantly limit system performance.

[0024] (3) Poor scalability: When the need to expand computing power arises, local solutions are difficult to quickly respond to the demand, while cloud solutions can easily handle it through elastic expansion. Summary of the Invention

[0025] The purpose of this application is to provide a privacy-security-oriented edge-cloud hybrid retrieval-augmented generation system and method, which can improve data security, reduce the potential risk of privacy leakage while enhancing scalability and system performance.

[0026] To achieve the above purpose, this application provides the following solutions:

[0027] In the first aspect, this application provides a privacy-security-oriented edge-cloud hybrid retrieval-augmented generation system, including:

[0028] A local processing module, configured to generate an enhanced prompt based on user query information and perform a desensitization operation on the enhanced prompt to obtain a desensitized prompt;

[0029] A cloud processing module, which conducts data interaction with the local processing module, is configured to rewrite the desensitized prompt to obtain a rewritten prompt, and is configured to generate encrypted response information based on the rewritten prompt using a large language model;

[0030] The local processing module is further configured to generate a final response information based on the encrypted response information.

[0031] Optionally, the local processing module includes:

[0032] A vector conversion and embedding unit, including a local vector database and an embedding model, configured to convert user query information into text information, perform chunking processing on the text information to obtain text chunks, use the embedding model to convert the text chunks into vectors, and store the vectors in the local vector database; the local vector database stores an original information - desensitized information mapping;

[0033] An enhancement processing unit, connected to the vector conversion and embedding unit, configured to retrieve information corresponding to the user query information stored in the local vector database based on the vectors, and splice the retrieved information with the user query information to obtain the enhanced prompt;

[0034] A desensitization processing unit, including a privacy database, connected to the enhancement processing unit and conducting information interaction with the cloud processing module, configured to, after detecting privacy information, search in the local vector database whether there is an original information - desensitized information mapping corresponding to the privacy information. If there is, directly use the original information - desensitized information mapping to complete the desensitization of a single privacy information. If not, generate desensitized information, replace the privacy information with the desensitized information to obtain a desensitized prompt, and store the encrypted mapping relationship between the desensitized information and the privacy information in the privacy database; the desensitization processing unit is further configured to decrypt the encrypted response information based on the original information - desensitized information mapping and the encrypted mapping relationship stored in the privacy database to obtain the final response information.

[0035] Optionally, the vector conversion and embedding unit includes:

[0036] A text processor, configured to convert user query information into text information and perform chunking processing on the text information to obtain text chunks;

[0037] A vector embedder, connected to the text processor, configured to use the embedding model to convert the text chunks into vectors and store the vectors in the local vector database.

[0038] Optionally, the cloud processing module includes:

[0039] A query rewriter, connected to the local processing module, for rewriting the desensitized prompt to obtain a rewritten prompt;

[0040] An answer generator, connected to the query rewriter, for generating encrypted answer information based on the rewritten prompt using a large language model.

[0041] Optionally, a language processing model is set in the query rewriter; the desensitized prompt is input into the language processing model to obtain the rewritten prompt.

[0042] In a second aspect, the present application provides a privacy - secure end - cloud hybrid retrieval - enhanced generation method, including:

[0043] Obtain user query information;

[0044] Generate an enhanced prompt based on the user query information;

[0045] Perform a desensitization operation on the enhanced prompt to obtain a desensitized prompt;

[0046] Rewrite the desensitized prompt to obtain a rewritten prompt;

[0047] Generate encrypted answer information based on the rewritten prompt using a large language model;

[0048] Generate a final answer information based on the encrypted answer information.

[0049] Optionally, generating an enhanced prompt based on the user query information includes:

[0050] Convert the user query information into text information, perform chunking processing on the text information to obtain text chunks, use an embedding model to convert the text chunks into vectors, and store the vectors in a local vector database; the local vector database stores an original information - desensitized information mapping;

[0051] Retrieve the information corresponding to the user query information stored in the local vector database based on the vector, and splice the retrieved information with the user query information to obtain the enhanced prompt.

[0052] Optionally, performing a desensitization operation on the enhanced prompt to obtain a desensitized prompt includes:

[0053] Detect whether there is privacy information in the enhanced prompt;

[0054] When there is private information, search in the local vector database for the original information - desensitized information mapping corresponding to the private information;

[0055] If there is an original information - desensitized information mapping corresponding to the private information, directly use the original information - desensitized information mapping to complete the desensitization of a single private information;

[0056] If there is no original information - desensitized information mapping corresponding to the private information, generate desensitized information, replace the private information with the desensitized information to obtain a desensitized prompt, and store the encrypted mapping relationship between the desensitized information and the private information in the privacy database;

[0057] When there is no private information, no desensitization operation is performed.

[0058] Optionally, rewrite the desensitized prompt to obtain a rewritten prompt, including:

[0059] Use a language processing model to rewrite the desensitized prompt into the rewritten prompt.

[0060] Optionally, generate a final answer information based on the encrypted answer information, including:

[0061] Decrypt the encrypted answer information based on the original information - desensitized information mapping and the encrypted mapping relationship stored in the privacy database to obtain the final answer information.

[0062] According to the specific embodiments provided by the present application, the present application has the following technical effects:

[0063] The present application provides a privacy - secure end - cloud hybrid retrieval - enhanced generation system and method. By using the local processing module to obtain a desensitized prompt based on the user query information and generating the final answer information based on the encrypted answer information output by the cloud processing module, it can ensure that private data is always stored and processed locally, improve data security, and reduce the potential risk of privacy leakage. Using the strong computing power of the cloud processing module to complete the large - language model inference significantly improves the system performance and scalability. Moreover, in the cloud processing module, rewriting the desensitized prompt can enhance the quality of the answer information generated by the large - language model while protecting private information. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0065] Figure 1 Schematic diagram of a fully cloud-based RAG solution;

[0066] Figure 2 Schematic diagram of a fully edge-side deployed RAG solution;

[0067] Figure 3 Overall architecture diagram of an edge-cloud hybrid retrieval augmented generation system for privacy security provided by an embodiment of the present application;

[0068] Figure 4 Flow schematic diagram of a method for edge-cloud hybrid retrieval augmented generation for privacy security provided by another embodiment of the present application;

[0069] Figure 5 Schematic diagram of the accuracy results of different LLM models before and after desensitization on the Guardian angel system for the BoolQ dataset provided by an embodiment of the present application;

[0070] Figure 6 Schematic diagram of the accuracy results of different LLM models on the Guardian angel system with a local vector database added for the QUALITY dataset provided by an embodiment of the present application. Detailed implementation manners

[0071] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0072] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.

[0073] In an exemplary embodiment, the present application provides an edge-cloud hybrid retrieval augmented generation system for privacy security. The system adopts a new RAG system structure, which is called the Guardian Angel system in the present application. The edge-cloud hybrid architecture of the Guardian Angel system can be applied to various scenarios, including industries with high privacy protection requirements such as medical and financial industries, and fields such as intelligent customer service that require real-time generation of high-quality answers. The system has the advantages of both security and performance and can meet the needs of different users. Based on this, as Figure 3 shown, the edge-cloud hybrid retrieval augmented generation system for privacy security includes: a local processing module and a cloud processing module. The cloud processing module interacts with the local processing module for data.

[0074] The local processing module can be used to be responsible for data storage and privacy protection. It mainly generates enhanced prompt words based on user query information, and performs desensitization operations on the enhanced prompt words to obtain desensitized prompt words.

[0075] The cloud processing module can be used to be responsible for language understanding and answer generation. It mainly rewrites the desensitized prompt words to obtain rewritten prompt words, and uses a large language model to generate encrypted answer information based on the rewritten prompt words. The local processing module is also used to generate the final answer information based on the encrypted answer information.

[0076] Based on the above privacy - security - oriented end - cloud hybrid retrieval enhancement generation system provided by this application, through the cooperation of the privacy protection mechanism and the language model, while protecting user privacy, it can provide high - quality dialogue services, and can solve the problem of the contradiction between privacy protection and performance improvement in existing RAG systems.

[0077] In another exemplary embodiment of this application, in order to improve the advantages and positive effects in terms of privacy protection, system performance optimization, and generation quality improvement, the local processing module can be set to include: a vector conversion and embedding unit, an enhancement processing unit, and a desensitization processing unit.

[0078] Among them, the vector conversion and embedding unit includes a local vector database and an embedding model. It is used to convert user query information into text information, perform chunking processing on the text information to obtain text chunks, use the embedding model to convert the text chunks into vectors, and store the vectors in the local vector database.

[0079] The enhancement processing unit is connected to the vector conversion and embedding unit. It is used to retrieve the information corresponding to the user query information stored in the local vector database based on the vector, and splice the retrieved information with the user query information to obtain an enhanced prompt word.

[0080] The desensitization processing unit includes a privacy database. The desensitization processing unit is connected to the enhancement processing unit and exchanges information with the cloud processing module mainly used to detect privacy information, search in the local vector database for the existence of the original information - desensitized information mapping corresponding to the privacy information. If it exists, directly use the original information - desensitized information mapping to complete the desensitization of a single privacy information. If it does not exist, generate desensitized information, replace the privacy information with the desensitized information, obtain the desensitized prompt word and transmit it to the cloud processing module, and store the encrypted mapping relationship between the desensitized information and the privacy information in the privacy database. The desensitization processing unit is also used to decrypt the encrypted answer information based on the original information - desensitized information mapping and the encrypted mapping relationship stored in the privacy database to obtain the final answer information.

[0081] Based on the description of the local processing module in this embodiment, the local vector database can be responsible for storing and managing the vectorized representation of user data. It adopts a chunking and overlapping strategy for data organization, supports efficient semantic retrieval, and ensures the semantic integrity of retrieval results.

[0082] Based on the chunking and overlapping strategy adopted by the local vector database, the semantic retrieval efficiency can be further optimized, while ensuring the semantic integrity of the retrieval results. Combining with the powerful reasoning ability of the Large Language Model (LLM) in the cloud processing module, the GuardianAngel system provided by this application has efficient retrieval and generation capabilities, and can generate high-quality answer information while protecting privacy, significantly improving the user experience.

[0083] As the core component of the system's privacy protection, the privacy database can protect sensitive information through the differential privacy mechanism. It can maintain a hash mapping table of sensitive fields, and realize functions such as identification, replacement, and mapping restoration of privacy entities through the construction of the privacy database, achieving precise protection and efficient recovery of privacy information. Moreover, the setting of the privacy database can ensure that privacy data is always stored and processed locally, enhancing privacy protection and data security.

[0084] Furthermore, based on the above description, the GuardianAngel system provided by this application ensures that sensitive data is always stored and processed locally through the localized privacy database and the differential privacy mechanism. Through anonymization processing and mapping restoration, the risk of data leakage can be greatly reduced, meeting the requirements of privacy regulations such as GDPR, and enhancing the user's trust in the system.

[0085] In another exemplary embodiment of this application, the vector conversion and embedding unit adopted can further include: a text processor and a vector embedder. The vector embedder is connected to the text processor.

[0086] The text processor is used to convert the user query information into text information and perform chunking processing on the text information to obtain text chunks.

[0087] The vector embedder is used to convert the text chunks into vectors using an embedding model and store the vectors in the local vector database.

[0088] Based on the above description, this application mainly enhances privacy in the local processing module. Based on this, in the actual application process, the system provided by this application can split a large amount of text data converted by the vector conversion and embedding unit. When splitting, text blocks can be set. These text data are converted into vectors through the selected embedding model, and finally these vectors are stored intermediate in the local vector database. After splicing the user query information and the relevant information (or fragments) retrieved from the local vector database, an enhanced prompt is formed. The privacy entities (such as names, phone numbers, etc.) in the enhanced prompt are extracted through the LLM combined with context learning, and then it is queried whether there is a corresponding encrypted mapping relationship in the privacy database. If it exists, it is directly replaced. Otherwise, 8 random uppercase characters (not repeating the character codes of the existing mapping relationships) are randomly generated using the random library in python. For example:

[0089] Apple,apple,APPLE-> <entity:xxxxxxxx># Mapping relationship of apples represented in different English forms.

[0090] Harry Potter,harry potter,HARRY POTTER-> <entity:yyyyyyyy># Mapping relationships of different English representations of Harry Potter.

[0091] Then store these mapping relationships in the hash table of the privacy database while performing corresponding privacy entity replacements.

[0092] Example:

[0093] The user's question (query) is "What should I eat when having a cold? I feel very dry in my throat." The corresponding information retrieved from the local vector database is: "Loquats promote fluid production and quench thirst, and can relieve the situation of dry cough in the throat." So the prompt word formed is:

[0094] query: "What should I eat when having a cold? I feel very dry in my throat." + The retrieved relevant information "Loquats promote fluid production and quench thirst, and can relieve the situation of dry cough in the throat."

[0095] Suppose it is identified that loquat is sensitive information, and the desensitized prompt word is:

[0096] query: "What should I eat when having a cold? I feel very dry in my throat." + The retrieved relevant information " <entity:xxxxxxxx>It can promote the production of body fluid to quench thirst and relieve the dry cough in the throat.

[0097] In another exemplary embodiment of the present application, in order to ensure that the large language model can understand the query, context learning with examples can be used to explain encrypted information, such as UUID (Universally Unique Identifier). By rewriting the prompt, the encrypted prompt is converted into a prompt that is easier for the LLM to understand. The large model inference is completed using the strong computing power of the cloud, significantly improving the system performance. Based on this, in this embodiment, the cloud processing module includes: a query rewriter and an answer generator. The query rewriter is connected to the local processing module. The answer generator is connected to the query rewriter.

[0098] The query rewriter is used to rewrite the desensitized prompt to obtain a rewritten prompt. Among them, a language processing model is set in the query rewriter. Based on this, the desensitized prompt is input into the language processing model to obtain a rewritten prompt.

[0099] Among them, the query rewriter, as a special language model, is responsible for rewriting the prompt. It converts the desensitized prompt into a prompt that is easier for the LLM to understand. This component is similar to the translator in the Multi-Agent architecture, and optimizes the system processing flow through modular design.

[0100] The answer generator is used to generate encrypted answer information based on the rewritten prompt using the large language model. In this component, it is mainly the large language model deployed in the cloud that is responsible for reasoning and answer generation for the query after privacy processing.

[0101] Based on the above description, the present application can reduce the generation of hallucinations in the cloud inference process and improve the accuracy and readability of the generated content by combining the optimized design of the query rewriter on the basis of the privacy database.

[0102] Based on the above description, the present application mainly performs semantic parsing in the cloud processing module. Based on this, the encrypted prompt (i.e., the desensitized prompt) in the local processing module is sent to the query rewriter (rewriter) in the cloud, and a language model with a smaller number of parameters (i.e., the language processing model) is used to rewrite the encrypted prompt, and organized into a prompt that is easier for the subsequent large language model with a larger number of parameters (actually performing the inference and answer task) to understand, that is, the rewritten prompt. Then the rewritten prompt is given to the large language model for actual inference to generate an answer with encrypted information, that is, to obtain encrypted answer information.

[0103] Combined with the example provided above, the desensitized prompt becomes:

[0104] Query: "What to eat when having a cold? I feel very dry in the throat." + Retrieved relevant information <entity:xxxxxxxx>Promote the production of body fluid to quench thirst and relieve the dry cough in the throat.”

[0105] This desensitized prompt was sent to the query rewriter, and the rewritten prompt might be:

[0106] "I have a cold and my throat feels very dry. What should I eat? Currently known <entity:xxxxxxxx>Promote the production of body fluids to quench thirst and relieve dry cough in the throat.

[0107] Then the encrypted answer information generated by the large language model inference is:

[0108] "It may be beneficial to eat more <entity:xxxxxxxx>"Can improve your situation".

[0109] After the encrypted answer is returned to the local processing module, the final decrypted answer is obtained by querying the mapping relationship between the original information and the desensitized information or the encrypted mapping relationship in the privacy database. For example:

[0110] Stored in the privacy database: "Loquat" <-> <entity:xxxxxxxx>。So, "it is possible to eat more" <entity:xxxxxxxx>The encrypted response information "can improve your condition" can be restored to the final response information "eating more loquats may improve your condition".

[0111] In summary, combined with Figure 3 the architecture shown, the implementation process of the end-cloud hybrid retrieval enhanced generation system for privacy security provided by this application can be described as follows:

[0112] For the query input by the user, it is first converted into a corresponding vector embedding (corresponding to Figure 3 process ①). All personal data is stored locally (i.e., stored in the local vector database), and privacy is ensured through the privacy database. Search for relevant information in the local vector database (corresponding to Figure 3 process ②), and splice it with the user query information (corresponding to Figure 3 process ③). Sensitive information in the enhancement prompt words detected from the local vector database is anonymized through the privacy database (corresponding to Figure 3 process ④), and then the anonymized query is sent to the cloud processing module (corresponding to Figure 3 process ⑤). To ensure that the large language model can understand the query, context learning with examples can be used to explain the encrypted information, such as UUID, and rewrite the prompt words to make the encrypted prompt words easier for the LLM to understand (corresponding to Figure 3 process ⑥). Then, query the large language model deployed in the cloud processing module (corresponding to Figure 3 process ⑦). If the answer contains encrypted terms, the privacy dataset in the local processing module can be used for decryption (corresponding to Figure 3 process ⑧). Generally speaking, the system operation logic provided by this application can be divided into three stages:

[0113] 1) Local privacy enhancement stage, constructing secure context information through vector retrieval and sensitive information anonymization.

[0114] 2) Cloud semantic parsing stage, using the context understanding ability of the LLM to process the rewritten prompt words.

[0115] 3) Local privacy restoration stage, completing the privacy restoration of the response information.

[0116] In another exemplary embodiment of this application, based on the architecture of the GuardianAngel system provided above in this application, the system performance is comprehensively tested by deploying commonly used test benchmarks in the industry (such as BoolQ and QUALITY datasets). The experiment mainly evaluates the performance of the GuardianAngel system in aspects such as privacy protection, retrieval efficiency, and generation quality.

[0117] I. Privacy Protection Performance Test on the BoolQ Dataset.

[0118] The BoolQ dataset is a dataset designed for yes / no question answering, containing 15,942 samples. These samples consist of "question, passage, answer" triples. The questions mainly involve information queries, and the passages contain relevant background information. The privacy protection mechanism of the GuardianAngel system was tested on the BoolQ dataset. Specifically, after encrypting sensitive entities (such as person names, place names, etc.) in the passages and questions, its question answering performance was tested. The experimental results (as Figure 5 shown) indicate that the answer quality of the GuardianAngel system under privacy protection conditions remains stable compared to the original data. The decrease in the correct rate after desensitization is within 1%, and even shows a slight improvement (4%) in some models (such as Llama3.1 - 8b). This shows that the privacy protection mechanism of the GuardianAngel system does not affect the model's understanding ability and can effectively protect user data privacy. Figure 5 Among them, GPT - 40 refers to the Chinese version of the artificial intelligence language model developed based on GPT - 3, GPT - 4O - mini is a lightweight language model carefully crafted based on the revolutionary GPT - 4 technology, Llama3.1:8b corresponds to the Llama3.1 - 8b model, and Llama3.1:70b corresponds to the Llama3.1 - 70b model. Both the Llama3.1 - 8b model and the Llama3.1 - 70b model belong to the Llama3.1 open - source model series.

[0119] II. Retrieval and Generation Performance Test on the QUALITY Dataset.

[0120] The QUALITY dataset is a question - answering dataset containing long - text inputs, designed to evaluate the model's ability to understand and process complex texts. The QUALITY dataset contains multiple questions related to an article, and each question provides four options, one of which is the correct answer. The performance of the GuardianAngel system in the retrieval - augmented generation (RAG) scenario was tested on the QUALITY dataset (as Figure 6 shown). In the experiment, the articles in the QUALITY dataset were chunked (chunk size of 400, chunk overlap of 80) and stored in a vector database, and sensitive information was encrypted in combination with a privacy database. The experimental results show that after adding a local vector database, the accuracy of the GuardianAngel system is improved by 5% compared to the scheme without a local vector database. The point query and write performance are consistent with traditional systems, which can prove the efficiency of the GuardianAngel system. At the same time, the drop in accuracy before and after desensitization is within 5%.

[0121] Through the above experiments, it can be verified that the GuardianAngel system performs excellently in terms of privacy protection, retrieval efficiency, and generation performance. The experiments show that:

[0122] 1) The privacy protection mechanism provided by this application can effectively protect user data while ensuring that the generation quality is not affected.

[0123] 2) In terms of range query performance, the GuardianAngel system has improved by about 2 times compared with traditional solutions.

[0124] 3) The end-cloud hybrid architecture provided by this application achieves a good balance in terms of processing performance and cost control and can be applied to a variety of practical application scenarios.

[0125] The experimental results further verify the innovation and practicality of the GuardianAngel system, providing strong support for its popularization and application in fields with high privacy protection requirements such as medical care and finance.

[0126] Based on the same inventive concept, the embodiments of this application also provide a method for implementing an end-cloud hybrid retrieval enhanced generation system for privacy security. The solution provided by this method to solve the problem is similar to the solution described in the above system. Therefore, the specific limitations in one or more of the following methods (the specific limitations in the embodiments can refer to the limitations on the end-cloud hybrid retrieval enhanced generation system for privacy security in the above text and will not be repeated here.

[0127] In an exemplary embodiment, as Figure 4 shown, a method for end-cloud hybrid retrieval enhanced generation for privacy security is provided, including:

[0128] Step 100: Obtain user query information.

[0129] Step 101: Generate an enhanced prompt based on the user query information.

[0130] Step 102: Perform a desensitization operation on the enhanced prompt to obtain a desensitized prompt. For example, a language processing model can be used to rewrite the desensitized prompt into a rewritten prompt.

[0131] Step 103: Rewrite the desensitized prompt to obtain a rewritten prompt.

[0132] Step 104: Use a large language model to generate encrypted response information based on the rewritten prompt.

[0133] Step 105: Generate the final response information based on the encrypted response information.

[0134] As an alternative implementation, the implementation process of step 101 can be replaced by the following steps 11 and 12. Among them:

[0135] Step 11: Convert the user query information into text information, perform chunking processing on the text information to obtain text chunks, use an embedding model to convert the text chunks into vectors, and store the vectors in a local vector database.

[0136] Step 12: Based on the vectors, retrieve the information corresponding to the user query information stored in the local vector database, and splice the retrieved information with the user query information to obtain an enhanced prompt.

[0137] As an alternative implementation, the implementation process of step 102 can be replaced by the following steps 21 - 25:

[0138] Step 21: Detect whether there is any privacy information in the enhanced prompt.

[0139] Step 22: When there is privacy information, search in the local vector database to see if there is an original information - de - identified information mapping corresponding to the privacy information.

[0140] Step 23: If there is an original information - de - identified information mapping corresponding to the privacy information, directly use the original information - de - identified information mapping to complete the de - identification of a single privacy information.

[0141] Step 24: If there is no original information - de - identified information mapping corresponding to the privacy information, generate de - identified information, use the de - identified information to replace the privacy information to obtain a de - identified prompt, and store the encrypted mapping relationship between the de - identified information and the privacy information in a privacy database.

[0142] Step 25: When there is no privacy information, no de - identification operation is performed.

[0143] Based on the above description, the process of step 105 for generating the final answer information is: decrypt the encrypted answer information based on the original information - de - identified information mapping and the encrypted mapping relationship stored in the privacy database to obtain the final answer information.

[0144] In an exemplary embodiment, a computer - readable storage medium is provided, storing a computer program, which when executed by a processor implements the steps in the above - mentioned method embodiments.

[0145] In an exemplary embodiment, a computer program product is provided, including a computer program, which when executed by a processor implements the steps in the above - mentioned method embodiments.

[0146] 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 for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0147] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the various embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (RRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0148] The databases involved in the various embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the various embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.

[0149] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.

[0150] Specific examples are used in this article to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. At the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.< / entity:xxxxxxxx> < / entity:xxxxxxxx> < / entity:xxxxxxxx> < / entity:xxxxxxxx> < / entity:xxxxxxxx> < / entity:xxxxxxxx> < / entity:yyyyyyyy> < / entity:xxxxxxxx>

Claims

1. A privacy - security - oriented end - cloud hybrid retrieval - enhanced generation system, characterized in that, include: A local processing module, configured to generate enhanced prompt words based on user query information, and perform a desensitization operation on the enhanced prompt words to obtain desensitized prompt words; a cloud processing module, which exchanges data with the local processing module, and is used to rewrite the desensitized prompt word to obtain a rewritten prompt word, and to generate encrypted answer information based on the rewritten prompt word using a large language model; The local processing module is further configured to generate final answer information based on the encrypted answer information.

2. The privacy and security-oriented edge-cloud hybrid retrieval enhanced generation system according to claim 1, characterized in that, The local processing module includes: A vector conversion and embedding unit, comprising a local vector database and an embedding model, is configured to convert user query information into text information, segment the text information into blocks to obtain text blocks, convert the text blocks into vectors using the embedding model, and store the vectors in the local vector database; the local vector database stores a mapping between original information and desensitized information; an enhancement processing unit connected to the vector conversion and embedding unit, configured to retrieve information corresponding to the user query information stored in the local vector database based on the vector, and concatenate the retrieved information with the user query information to obtain the enhanced prompt word; The desensitizing processing unit includes a privacy database, which is connected to the enhanced processing unit and interacts with the cloud processing module. After detecting the privacy information, the desensitizing processing unit searches the local vector database for the original information-desensitized information mapping corresponding to the privacy information. If so, the original information-desensitized information mapping is directly used to complete the desensitization of the single privacy information. If not, desensitized information is generated, and the desensitized information is used to replace the privacy information to obtain the desensitized prompt word, and the encrypted mapping relationship between the desensitized information and the privacy information is stored in the privacy database. The desensitizing processing unit is also used to decrypt the encrypted answer information based on the original information-desensitized information mapping and the encrypted mapping relationship stored in the privacy database to obtain the final answer information.

3. The privacy and security oriented edge-cloud hybrid retrieval enhanced generation system according to claim 2, wherein The vector conversion embedding unit includes: A text processor, configured to convert user query information into text information, and perform block processing on the text information to obtain text blocks; A vector embedder is connected to the text processor and is used to convert the text block into a vector by adopting the embedding model, and is used to store the vector in the local vector database.

4. The privacy and security-oriented end-cloud hybrid retrieval enhanced generation system according to claim 1, characterized in that The cloud processing module includes: A query rewriter, connected to the local processing module, for rewriting the desensitized prompt word to obtain a rewritten prompt word; The answer generator is connected to the query rewriter and is used to generate encrypted answer information based on the rewritten prompt words using a large language model.

5. The privacy - security - oriented edge - cloud hybrid retrieval enhanced generation system according to claim 4, wherein The query rewriter is provided with a language processing model; the desensitized prompt word is input into the language processing model to obtain the rewritten prompt word.

6. A method for enhancing generation in end-cloud hybrid retrieval for privacy and security, characterized in that, include: Get user query information; Generate enhanced prompt words based on user query information; performing a desensitization operation on the enhanced prompt word to obtain a desensitized prompt word; Rewrite the desensitized prompt words to obtain rewritten prompt words; Use a large language model to generate encrypted response information based on the rewritten prompt words; Generate the final response information based on the encrypted response information.

7. The privacy-safe end-cloud hybrid search enhancement generation method according to claim 6 is characterized in that: Generate enhanced prompt words based on the user's query information, including: Convert the user's query information into text information, perform chunking processing on the text information to obtain text chunks, use an embedding model to convert the text chunks into vectors, and store the vectors in a local vector database; the local vector database stores the original information - de-identified information mapping; Retrieve the information corresponding to the user's query information stored in the local vector database based on the vectors, and splice the retrieved information with the user's query information to obtain the enhanced prompt words.

8. The method for enhancing generation of end-cloud hybrid retrieval for privacy and security according to claim 6, wherein Perform a de-identification operation on the enhanced prompt words to obtain the de-identified prompt words, including: Detect whether there is any privacy information in the enhanced prompt words; When there is privacy information, search in the local vector database to see if there is an original information - de-identified information mapping corresponding to the privacy information; If there is an original information - de-identified information mapping corresponding to the privacy information, directly use the original information - de-identified information mapping to complete the de-identification of a single privacy information; If there is no original information - de-identified information mapping corresponding to the privacy information, generate de-identified information, replace the privacy information with the de-identified information to obtain the de-identified prompt words, and store the encrypted mapping relationship between the de-identified information and the privacy information in the privacy database; When there is no privacy information, no de-identification operation is performed.

9. The method for enhancing generation of end-cloud hybrid retrieval for privacy and security according to claim 6, wherein Rewrite the de-identified prompt words to obtain the rewritten prompt words, including: Use a language processing model to rewrite the de-identified prompt words into the rewritten prompt words.

10. The method for enhancing generation of end-cloud hybrid retrieval for privacy and security according to claim 8, wherein Generate the final response information based on the encrypted response information, including: Perform decryption processing on the encrypted response information based on the original information - de-identified information mapping and the encrypted mapping relationship stored in the privacy database to obtain the final response information.

Citation Information

Cited By

  • Control method of intelligent robot with body based on layered hybrid model

    CN120748403A

  • Response method and system, database module and program product

    CN121412348A

  • Data retrieval method and system, terminal, storage medium and program product

    CN121986332A