Knowledge base privacy protection method, device, storage medium and program product
Through secure computing environment and model splitting technology, the data leakage problem in knowledge base privacy protection is solved, and efficient and accurate privacy protection and data rights maintenance are achieved. It is suitable for knowledge base scenarios of different entities and the same entity.
Patent Information
- Application Number
- CN202510427296.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-04-07
AI Technical Summary
In RAG applications, the privacy protection of knowledge bases faces significant challenges, especially in multi-party interaction scenarios, where it is difficult to ensure that the privacy of the knowledge base is not leaked during data transmission and access.
By adopting a secure computing environment, through subject judgment, cross-platform privacy matching, data isolation, privacy fusion and model splitting, and using the encrypted reasoning sub-model and the plaintext reasoning sub-model to work together, the privacy data of the knowledge base is ensured not to be leaked.
Effectively protect the data privacy of the knowledge base, reduce the number of interaction rounds, improve computing efficiency, ensure the efficiency and accuracy of the reasoning process, prevent data leakage, and maintain the data rights and interests of the knowledge management platform.
Smart Images

Figure CN119939670B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of privacy protection technology, and in particular to a knowledge base privacy protection method, device, storage medium, and program product. Background Art
[0002] With advances in large-scale model technology, the Retrieval-Augmented Generation (RAG) reasoning method has gained widespread application in fields such as natural language processing. RAG is suitable for scenarios such as question-answering systems, document generation, and intelligent assistants. Its workflow primarily consists of three steps: retrieval, augmentation, and generation. Typically, RAG retrieves relevant information from an external knowledge base based on a user query, embeds it along with the query into a preset prompt template, and then feeds the enhanced prompts into a large language model to generate the output.
[0003] However, effective protection of knowledge bases in current Retrieval Augmentation Generation (RAG) applications faces significant challenges. This is particularly true in complex scenarios where the identities of business application systems, knowledge management platforms, and search service systems differ, requiring data integration to answer questions. However, ensuring the privacy of knowledge bases throughout the workflow, such as during data transmission and access, is extremely challenging, as it involves interactions between the three parties. Summary of the Invention
[0004] In view of this, the embodiments of the present disclosure provide a knowledge base privacy protection method, device, storage medium and program product, which can use a secure computing environment to protect the knowledge base privacy data. Even if the knowledge base is called multiple times, sensitive information will not be leaked, thereby maintaining the data rights and interests of the knowledge management platform.
[0005] In a first aspect, the embodiments of the present disclosure provide a method for protecting the privacy of a knowledge base, which adopts the following technical solutions:
[0006] When the business application system initiates a query request, it determines whether the business application system and the knowledge management platform are the same entity;
[0007] If not, a cross-platform privacy match is performed on the prompt words provided by the business application system and the knowledge base provided by the knowledge management platform to obtain the search results;
[0008] If yes, perform local calculation on the prompt word and the knowledge base to obtain the search result;
[0009] Transmitting the search results to a secure computing environment provided by the search service system for isolation;
[0010] In the secure computing environment, privately fusing the search result with the prompt word to obtain context information;
[0011] Splitting the preset reasoning model into an encrypted reasoning sub-model and a plaintext reasoning sub-model, deploying the encrypted reasoning sub-model in the secure computing environment, and deploying the plaintext reasoning sub-model in the plaintext computing environment of the retrieval service system;
[0012] Performing encrypted reasoning on the context information using the encrypted reasoning sub-model to obtain intermediate parameters;
[0013] Perform plaintext reasoning on the intermediate parameters using the plaintext reasoning sub-model to obtain a reasoning result, and send the reasoning result to the business application system.
[0014] Optionally, determining whether the business application system and the knowledge management platform are the same entity includes:
[0015] Comparing the first identity identifier of the business application system with the second identity identifier of the knowledge management platform;
[0016] If the comparison is consistent, it is determined that the business application system and the knowledge management platform are the same entity;
[0017] If the comparison is inconsistent, it is determined that the business application system and the knowledge management platform are not the same entity.
[0018] Optionally, performing cross-platform privacy matching on the prompt words provided by the business application system and the knowledge base provided by the knowledge management platform to obtain search results includes:
[0019] The prompt word is sent to the knowledge management platform, and the received prompt word is searched using the local knowledge base of the knowledge management platform to obtain a search result.
[0020] Optionally, transmitting the search results to a secure computing environment provided by a search service system for isolation includes:
[0021] When the search service system has access authorization to the search results;
[0022] Then, the search result is encrypted based on the authorization information to generate an encrypted file containing the authorization information;
[0023] Encrypt the encrypted file again using the public key provided by the retrieval service system to generate a secondary encrypted file and send it to the retrieval service system;
[0024] The secondary encrypted file is decrypted using a private key and a decryption key preset by the retrieval service system, and the decrypted retrieval result is stored in a secure memory area of the secure computing environment based on the decrypted authorization information.
[0025] Optionally, the transmitting the search results to a secure computing environment provided by the search service system for isolation further includes:
[0026] When the search service system does not have access authorization to the search results;
[0027] Then encrypting the search result to generate an encrypted search result and a first key, and encrypting the first key using the public key of the secure computing environment to generate an encryption key;
[0028] loading the encrypted search result and the encryption key into the secure computing environment, and decrypting the encryption key using a private key of the secure computing environment;
[0029] The encrypted search result is decrypted using the decrypted first key, and the decrypted search result is stored in the secure memory area.
[0030] Optionally, the privacy fusion of the search result and the prompt word to obtain context information includes:
[0031] When the number of the search results is 1, the search results and the prompt words are concatenated in a preset order to generate the context information;
[0032] When the number of the search results is not 1, all the search results are merged into a new search result;
[0033] The new search result and the prompt word are spliced in the preset order to generate the context information.
[0034] Optionally, the privacy protection method of the knowledge base further includes:
[0035] Encrypt the intermediate parameters using the public key provided by the knowledge management platform to generate encrypted parameters;
[0036] The encryption parameters are sent from the secure computing environment to the plaintext computing environment for authorized decryption.
[0037] In a second aspect, the embodiments of the present disclosure further provide a knowledge base privacy protection system, which adopts the following technical solutions:
[0038] The subject judgment module is used to determine whether the business application system and the knowledge management platform are the same subject when the business application system initiates a query request; if not, the privacy calculation module is executed; if so, the local calculation module is executed;
[0039] The privacy computing module is used to perform cross-platform privacy matching between the prompt words provided by the business application system and the knowledge base provided by the knowledge management platform to obtain search results;
[0040] A local calculation module, used for performing local calculation on the prompt word and the knowledge base to obtain a search result;
[0041] A data isolation module, used to transmit the search results to a secure computing environment provided by the search service system for isolation;
[0042] a privacy fusion module for performing privacy fusion on the search results and the prompt word in the secure computing environment to obtain context information; a model splitting module for splitting the preset reasoning model into an encrypted reasoning sub-model and a plaintext reasoning sub-model, deploying the encrypted reasoning sub-model in the secure computing environment, and deploying the plaintext reasoning sub-model in the plaintext computing environment of the retrieval service system;
[0043] A dense reasoning module, configured to perform dense reasoning on the context information using the encrypted reasoning sub-model to obtain intermediate parameters;
[0044] The plaintext reasoning module is used to perform plaintext reasoning on the intermediate parameters using the plaintext reasoning sub-model, obtain reasoning results, and send the reasoning results to the business application system.
[0045] In a third aspect, the embodiments of the present disclosure further provide a computer device that adopts the following technical solution:
[0046] The computer device comprises:
[0047] at least one processor; and,
[0048] a memory communicatively connected to the at least one processor; wherein,
[0049] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any of the above-mentioned knowledge base privacy protection methods.
[0050] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above-mentioned knowledge base privacy protection methods.
[0051] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.
[0052] The privacy protection method for the knowledge base provided by the embodiment of the present disclosure is applicable to the scenario where the business application system, the knowledge management platform and the retrieval service system are different entities, and is also compatible with the simplified scenario where the business application system and the knowledge management platform are the same entity. In particular, when the business application system and the knowledge management platform are not the same entity, this method enables the retrieval service system to obtain the retrieval results through a secure computing environment, while ensuring the privacy of the data, and performs privacy fusion of the retrieval results with the prompt words in the secure computing environment to generate context information. The secure computing environment of this solution provides a relatively independent and secure computing space. After the retrieval results enter the environment, the relevant calculations and processing can be completed autonomously internally without the need for frequent external interactions to verify the calculation results of each step. The isolation characteristics of the secure computing environment effectively prevent data leakage during the calculation process. In addition, this solution adopts a mechanism for the collaborative work of the encrypted reasoning sub-model and the plaintext reasoning sub-model in combination with the secure computing environment. The encrypted reasoning sub-model performs a portion of the reasoning first, reducing the risk of private data leakage from intermediate parameters. Simultaneously, placing the front end of the reasoning process in a private computing environment avoids the significant computational overhead associated with the overall private computing process, ensuring efficient and accurate reasoning. The plaintext reasoning sub-model leverages the advantages of the plaintext computing environment to rapidly complete subsequent reasoning tasks, further improving reasoning efficiency. By leveraging private computing technology, this approach protects the data privacy and security of the knowledge base and safeguards the data rights and interests of the knowledge management platform. Even if the knowledge base data is accessed multiple times, sensitive information will not be leaked, thereby generating revenue related to paid knowledge for the knowledge management platform.
[0053] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the following specifically cites preferred embodiments and describes them in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0055] Figure 1 A flowchart of a privacy protection method for a knowledge base provided in an embodiment of the present disclosure;
[0056] Figure 2 A flowchart of a search result isolation method provided in an embodiment of the present disclosure;
[0057] Figure 3A flowchart of a method for encrypting and sending intermediate parameters provided in an embodiment of the present disclosure;
[0058] Figure 4 A block diagram of the privacy protection system for the knowledge base provided by the embodiment of the present disclosure;
[0059] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0060] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0061] It should be clear that the following embodiments of the present disclosure are described through specific concrete examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0062] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on this disclosure, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.
[0063] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The illustrations only show components related to the present disclosure and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.
[0064] Additionally, in the following description, specific details are provided to provide a thorough understanding of the examples. However, one skilled in the art will appreciate that the aspects described can be practiced without these specific details.
[0065] Reference Figure 1 The present disclosure provides a knowledge base privacy protection method, comprising the following steps:
[0066] S1: When the business application system initiates a query request, it determines whether the business application system and the knowledge management platform are the same entity; if not, execute S2; if so, execute S3;
[0067] S2: Perform cross-platform privacy matching on the prompt words provided by the business application system and the knowledge base provided by the knowledge management platform to obtain search results;
[0068] S3: Perform local calculations on the prompt words and knowledge base to obtain search results;
[0069] S4: The search results are transmitted to the secure computing environment provided by the search service system for isolation;
[0070] S5: In a secure computing environment, the search results are privately fused with the prompt words to obtain contextual information.
[0071] S6: Split the preset reasoning model into an encrypted reasoning sub-model and a plaintext reasoning sub-model. Deploy the encrypted reasoning sub-model in a secure computing environment, and deploy the plaintext reasoning sub-model in the plaintext computing environment of the retrieval service system.
[0072] S7: Use the encrypted reasoning sub-model to perform encrypted reasoning on the context information to obtain intermediate parameters;
[0073] S8: Use the plaintext reasoning sub-model to perform plaintext reasoning on the intermediate parameters, obtain the reasoning results, and send the reasoning results to the business application system.
[0074] The knowledge base privacy protection method disclosed herein is applicable to scenarios where the business application system, knowledge management platform, and retrieval service system are different entities, and is also compatible with simplified scenarios where the business application system and knowledge management platform are the same entity. When the business application system and knowledge management platform are not the same entity, this method uses a secure computing environment to enable the retrieval service system to obtain search results while ensuring data privacy and security. The search results are then privately integrated with prompt words in the secure computing environment to generate contextual information. When the business application system and knowledge management platform are the same entity, the retrieval calculation is completed locally and then stored in the secure computing environment.
[0075] Compared to traditional privacy-preserving methods, this solution significantly reduces the number of interaction rounds and improves computational efficiency. Traditional methods typically rely on complex multi-party secure computation protocols, requiring frequent exchange of data and intermediate results to ensure computational accuracy and privacy. This not only increases the number of interaction rounds but also reduces computational efficiency. This solution's secure computing environment, however, provides a relatively independent and secure computing space. Once retrieval results enter this environment, relevant computations and processing can be completed autonomously within it, eliminating the need for frequent external verification of each step. The isolation of this secure computing environment effectively prevents data leakage during the computation process.
[0076] Furthermore, this solution integrates a secure computing environment and employs a collaborative mechanism between encrypted and plaintext reasoning sub-models. The encrypted reasoning sub-model performs a portion of the reasoning first, reducing the risk of private data leakage from intermediate parameters. Simultaneously, the front-end of the reasoning process is placed in the privacy computing environment, avoiding the significant computational overhead associated with the overall privacy computation and ensuring the efficiency and accuracy of the reasoning process. The plaintext reasoning sub-model leverages the advantages of the plaintext computing environment to rapidly complete subsequent reasoning tasks, further improving reasoning efficiency.
[0077] In summary, this method protects the data privacy and security of the knowledge base through privacy computing technology and maintains the data rights and interests of the knowledge management platform. Even if the knowledge base is called multiple times, sensitive information will not be leaked, thereby bringing knowledge payment-related benefits to the knowledge management platform.
[0078] S1 supports business application systems using multiple methods to input prompt words and trigger query requests. The first is text input triggering. When the query operator enters the prompt word in the input box and presses the "Enter" key or clicks the "Submit" button, the system will trigger the query request. The second is voice interaction triggering. In the voice interaction system, when the query operator speaks a specific command (such as "Search..."), the speech recognition system will recognize it as a query request and extract the prompt word. The third is API interface triggering. Business application systems can programmatically input prompt words and initiate query requests by calling the system-provided API interface. This method is suitable for automated tools, third-party applications, or developer integration scenarios, allowing business application systems to trigger queries without directly interacting with the user interface.
[0079] Obtain the identities (digital certificates, unique IDs, etc.) of the business application system and the knowledge management platform. The business application system's identity is referred to as the first identity, and the knowledge management platform's identity is referred to as the second identity. Compare the business application system's first identity with the knowledge management platform's second identity. If they match, the identities are identical, and the business application system and the knowledge management platform are considered the same entity. If they do not match, the business application system and the knowledge management platform are considered different entities.
[0080] The above method is also applicable to situations where there are multiple business application systems or multiple knowledge management platforms. By clarifying the subject qualifications, it effectively prevents illegal access to the knowledge base by outsiders, ensuring the security and confidentiality of the knowledge base data. When the business application system and the knowledge management platform belong to the same entity, the knowledge base can be modified, updated, and other operations directly based on the search results and the final query results; if the entities are different, the business application system cannot directly access the knowledge base, but it can still use the knowledge base to complete the search with the help of certain mechanisms. Therefore, in addition to protecting private data, this method can also achieve precise permission control of the knowledge base and improve data management efficiency.
[0081] In S2, the business application system sends the prompt word to the knowledge management platform. The knowledge management platform then matches the prompt word to a local knowledge base that matches the prompt word and uses this to obtain search results. For example, when there are multiple knowledge bases of different types (such as text knowledge bases, image knowledge bases, and databases), the data is structured to obtain knowledge features. For text knowledge bases, operations such as word segmentation, part-of-speech tagging, and named entity recognition are performed to obtain text features. For image knowledge bases, image features such as color and texture are extracted. An index is created based on the position of the knowledge features in the knowledge base. For text knowledge bases, an inverted index is used to record the position of each text feature within the knowledge base; for image knowledge bases, a KD-tree index is used to record the position of each image feature within the knowledge base. The prompt word is preprocessed, including cleaning and normalization, to generate a standard prompt word. Based on the prompt word's features and semantics, the required knowledge type is analyzed and a knowledge base matching the knowledge type is selected. Using the created index, the search is performed within the matching knowledge base to find content that exactly matches the standard prompt term. If an exact match fails, a fuzzy match is performed, using methods such as edit distance and semantic similarity. The matching results are filtered based on pre-set criteria, such as excluding results with low matching scores or limiting the number of results. The matching results that meet the pre-set criteria are then combined into the final search results.
[0082] In S3, when the first identity identifier of the business application system is consistent with the second identity identifier of the knowledge management platform, it means that the knowledge management platform is also the business application system. The prompt word is searched in the knowledge base stored locally in the business application system to obtain the search results.
[0083] In S4, the knowledge management platform sends search results to a secure computing environment for isolation. This secure computing environment is pre-created by the search service system on its computing nodes and is dedicated to data computing, ensuring data security and privacy. This secure computing environment can be implemented using technologies such as a Trusted Execution Environment (TEE) or a data sandbox. Within this environment, a secure memory area is initialized that is invisible to the outside world, effectively isolating and protecting data.
[0084] Reference Figure 2 The flowchart of the search result isolation method shown in the figure, "transmitting the search results to the secure computing environment provided by the search service system for isolation," includes the following steps:
[0085] S41: Determine whether the search service system has access authorization to the search results; if so, execute S42; if not, execute S45;
[0086] S42: Encrypt the search results based on the authorization information to generate an encrypted file containing the authorization information;
[0087] S43: Encrypt the encrypted file again using the public key provided by the retrieval service system to generate a secondary encrypted file and send it to the retrieval service system;
[0088] S44: decrypting the secondary encrypted file using the private key and decryption key preset by the search service system, and storing the decrypted search result in the secure memory area of the secure computing environment based on the decrypted authorization information;
[0089] S45: Encrypt the search result to generate an encrypted search result and a first key, and encrypt the first key using the public key of the secure computing environment to generate an encryption key;
[0090] S46: Loading the encrypted search result and the encryption key into the secure computing environment, and decrypting the encryption key using the private key of the secure computing environment;
[0091] S47: Decrypt the encrypted search result using the decrypted first key, and store the decrypted search result in the secure memory area.
[0092] In S41, the knowledge management platform maintains an authorization list that records the identification information of all authorized search service systems. When a search service system initiates a request to access search results, the knowledge management platform compares the search service system's third-party identity (such as a digital certificate, unique ID, etc.) with the authorization list to determine whether it has access authorization. Alternatively, the knowledge management platform proactively sends the search results and the business application system's first identity to the search service system, and before sending the information, it uses the authorization list to determine whether the search service system has access authorization. This determination process can be implemented on the knowledge management platform's server through an automated program, which returns authorization status information (such as "authorized" or "unauthorized") based on the comparison results.
[0093] In S42-S44, when the search service system has authorized access to the search results, it is allowed to directly decrypt the search results. First, the search service system generates a public-private key pair before commencing the operation and securely sends the public key to the knowledge management platform. Simultaneously, the knowledge management platform securely transmits the decryption key to the search service system. The knowledge management platform then encrypts the search results using a symmetric encryption algorithm (such as AES). During the encryption process, authorization information (such as the validity period and access rights) is embedded in the encrypted file's header or metadata using a specific data structure (such as JSON format). The resulting encrypted file contains both the encrypted search result data and the authorization information, ensuring the correlation between the authorization information and the search result data.
[0094] The knowledge management platform uses the public key provided by the search service system to re-encrypt the encrypted file containing the authorization information using an asymmetric encryption algorithm (such as RSA). This generates a re-encrypted file and sends it to the search service system via a secure network channel (such as HTTPS). Upon receiving the re-encrypted file, the search service system performs two decryption operations in sequence: first using its own pre-set private key for the initial decryption, and then using the decryption key provided by the knowledge management platform for the second decryption. Ultimately, the decrypted authorization information and search results are obtained.
[0095] The retrieval service system strictly verifies the legality and validity of the authorized information, such as checking whether the authorization validity period is within a reasonable range and whether the scope of access rights meets the established requirements. After the verification is passed, the decrypted retrieval results are stored in the secure memory area of the secure computing environment. This secure memory area is protected by both hardware and software mechanisms, which can effectively ensure the security and integrity of the data. If the authorization information verification fails, the retrieval service system refuses to store the decrypted retrieval results, properly saves the relevant files, and reports the verification failure and reasons to the knowledge management platform according to the preset process. At the same time, it prevents unauthorized data access and leakage, and continues to store the retrieval results after resolving the reasons for the verification failure.
[0096] In S45-S47, a pair of public and private keys will be generated when the secure computing environment is initially created. When the retrieval service system does not have access authorization to the retrieval results, in order to prevent it from obtaining the private data of the retrieval results, the retrieval service system is not supported to directly decrypt the retrieval results. However, the public key of the secure computing environment will be securely provided to the knowledge management platform.
[0097] The knowledge management platform encrypts the search results using a symmetric encryption algorithm (such as AES), generating an encrypted search result and a corresponding first key (i.e., a symmetric key). The knowledge management platform then uses the public key provided by the secure computing environment to encrypt the first key using an asymmetric encryption algorithm to obtain the encryption key. The knowledge management platform sends the encrypted search result and encryption key to the search service system, which then loads them into the secure computing environment. During this process, the search service system cannot complete the decryption operation on its own because it lacks the secure computing environment's private key for decrypting the encryption key.
[0098] Within the secure computing environment, the encrypted key is decrypted using its own private key to obtain the original first key. This decryption process is protected by the secure computing environment, ensuring that the first key will not be leaked. The encrypted search results are decrypted using the decrypted first key to obtain the original search result data. The decrypted search results are then stored in the secure memory area of the secure computing environment, thus completing the isolated storage of the search results within the secure computing environment.
[0099] During this process, the knowledge management platform and retrieval service system each maintain detailed logs of authorization and data access operations, including information such as authorization time, access content, and operation results. By analyzing log data, we can detect any abnormal authorization requests or data access behaviors. If any abnormalities are detected, we can promptly take measures such as suspending authorization and conducting security audits.
[0100] In S5, the business application system also sends the prompt word to the secure computing environment of the search service system. Within this secure computing environment, the search results and prompt word are concatenated in a preset order, integrating the two and generating contextual information. There are two preset orders: the first places the prompt word first, followed by the search results; the second places the search results first, followed by the prompt word. In practical applications, the first concatenation order is typically chosen, with the prompt word first and the search results last. This is because the prompt word often represents the user's core question or key need. Placing it first allows the contextual information to clearly convey the core intent at the outset, facilitating subsequent processing steps (such as semantic understanding and model inference) to quickly focus on the key points. Furthermore, this order aligns with people's daily expressions and information reception habits, making it easier to understand and parse the complete semantics of the context, thereby improving the efficiency and accuracy of the entire information processing process.
[0101] When there is only one knowledge base, there is only one retrieval result generated based on the knowledge base. At this time, the context information generated by the retrieval result is directly input into the encrypted reasoning sub-model. The encrypted reasoning sub-model reasons on it in a secure computing environment and outputs intermediate parameters. This reasoning process can focus on the information provided by a single knowledge base, reduce computing resource consumption, and improve reasoning speed. Moreover, the context information generated by a single retrieval result has clear directionality and does not contain too much redundant and irrelevant information. This allows the encrypted reasoning sub-model to focus more on the core content during the reasoning process and avoid being disturbed by other irrelevant information.
[0102] When there are multiple knowledge bases, there may be multiple knowledge bases that match the prompt word. In this case, after searching for the prompt word in multiple knowledge bases, the number of search results will increase accordingly. To fully utilize the information from multiple knowledge bases and improve the accuracy of reasoning, these search results are fused. During the fusion process, the search results are carefully compared, and duplicate parts are deleted, retaining only the non-duplicate parts to obtain new search results. The new search results and the prompt word are spliced together in a preset order to generate contextual information. This method can integrate the advantages of different knowledge bases, allowing the information from each knowledge base to complement each other and form a more comprehensive and richer information set. The encrypted reasoning sub-model performs reasoning based on this fused comprehensive information, which can generate more accurate and reliable intermediate parameters, providing stronger support for subsequent analysis and decision-making.
[0103] In S6, a detailed architectural analysis of the preset reasoning model is performed to identify the specific role of each functional module in the preset reasoning model. Taking the natural language processing model based on deep learning as an example, it includes modules such as the input layer, embedding layer, hidden layer, and output layer. When splitting the preset reasoning model, it is split into two consecutive parts. The first M layers constitute the encrypted reasoning sub-model, and the last N layers constitute the plaintext reasoning sub-model, where K is the total number of functional modules of the preset reasoning model, satisfying K=M+N. The key basis for the split is to ensure that the data output by the encrypted reasoning sub-model composed of the first M layers is difficult to be reversed to the original data, and the plaintext reasoning sub-model composed of the last N layers can perform efficient operations in a plaintext environment to balance the security and computing performance during the model processing process.
[0104] After the split, the encrypted reasoning sub-model is deployed in an isolated secure computing environment. A secure loading mechanism is used during deployment to ensure its integrity and confidentiality. Initialization is completed, and a secure communication channel with the outside world is established for data interaction. The plaintext reasoning sub-model is deployed in the plaintext computing environment of the retrieval service system. An interactive interface is set up between the encrypted and plaintext reasoning sub-models, clarifying the data format, transmission protocol, and interaction process. This ensures that the two sub-models in different environments can work together efficiently and stably.
[0105] In S7, within a secure computing environment, the encrypted reasoning sub-model performs in-depth logical analysis and data mining on the contextual information in a secret form, gradually generating a series of intermediate parameters. These intermediate parameters are essentially the interim results produced by the encrypted reasoning sub-model when performing reasoning operations on the contextual information, representing the data set obtained after completing part of the reasoning task. After the encrypted reasoning sub-model's operations, the intermediate parameters themselves have a high degree of privacy, making it difficult for outsiders to gain insight into the privacy of the knowledge base from these intermediate parameters. However, to further strengthen the security of the knowledge base and prevent potential risks during data transmission, they are still encrypted before being sent to the plaintext computing environment.
[0106] Reference Figure 3 The flowchart of the method for encrypting and sending intermediate parameters is shown. The method for sending intermediate parameters from a secure computing environment to a plaintext computing environment includes the following steps:
[0107] S71: Encrypt the intermediate parameter using the public key provided by the knowledge management platform to generate an encrypted parameter;
[0108] S72: Send the encryption parameters from the secure computing environment to the plaintext computing environment for authorized decryption.
[0109] In S71, before the secure computing environment sends the intermediate parameters to the plaintext computing environment, the knowledge management platform randomly generates a public key to further ensure data security and privacy. This public key can be temporary or fixed. The public key is sent to the secure computing environment via a secure transmission channel. This secure transmission channel can use encryption protocols such as SSL / TLS to ensure that the public key is not stolen or tampered with during transmission. After receiving the public key, the secure computing environment encrypts the intermediate parameters based on the public key provided by the knowledge management platform. This encryption process follows a specific encryption algorithm (such as the RSA algorithm) to generate encryption parameters. After encryption is completed, the secure computing environment sends the encrypted parameters to the plaintext computing environment.
[0110] In S72, the encrypted parameters can be authorized for decryption in a variety of ways. For example, in the first embodiment, a decryption application is sent to the knowledge management platform or a third-party authorization agency. After the decryption application is approved, the second key preset by the knowledge management platform is obtained; based on the second key, the encrypted parameters are decrypted and restored to intermediate parameters and stored in a plaintext computing environment.
[0111] Among them, the second key is pre-set by the knowledge management platform. Like the public key of the knowledge management platform, the second key can be temporary or fixed, and is strictly kept by the knowledge management platform itself or a reliable third-party authorized agency to prevent data security risks caused by the leakage of the second key.
[0112] When the retrieval service system detects new encryption parameters in the plaintext computing environment, it initiates a decryption request to the knowledge management platform or a third-party authorized institution that holds the second key. When initiating the request, the retrieval service system needs to provide detailed application information, including the reason for the decryption request, the specific encryption parameter identifiers involved, and the expected usage scenarios, so that the knowledge management platform or third-party authorized institution can review it.
[0113] After receiving a decryption request, the knowledge management platform or third-party authorization agency conducts a rigorous review based on pre-defined security policies and authorization rules. The review covers multiple aspects, including the legality, rationality, and security of the request. If the request passes the review, the knowledge management platform or third-party authorization agency securely sends the authentication license information and the second key to the retrieval service system. The authentication license information includes the license identifier, authorization subject information, applicant information, license validity period, scope of use, and digital signature.
[0114] After receiving the authentication permission information and the second key, the retrieval service system verifies the validity and authenticity of the authentication permission information, ensuring that the information has not been tampered with and is within its validity period by comparing digital signatures and other methods. After verification, the retrieval service system uses the second key based on the authentication permission information to decrypt the encrypted parameters. The decryption process follows the same decryption algorithm as the encryption process, allowing the plaintext computing environment to securely and legally obtain the original intermediate parameters for subsequent inference operations.
[0115] In the second embodiment, a decryption application containing encryption parameters is sent to the knowledge management platform or a third-party authorization agency. After the decryption application is approved, the encryption parameters are decrypted using a second key local to the knowledge management platform or the third-party authorization agency; the decrypted intermediate parameters are sent back to the plaintext computing environment of the retrieval service platform.
[0116] The main difference between the second embodiment and the first embodiment lies in the different decryption environments for the encryption parameters. In the first embodiment, the search service system independently decrypts the encryption parameters. This allows the search service system to independently control the timing and rhythm of decryption, fully utilizing its own computing resources, ensuring the continuity of business processes while reducing dependence on external services. In the second embodiment, the decryption operation is performed by the knowledge management platform or a third-party authorized agency. By leveraging the professional security protection and compliance management capabilities of these platforms and agencies, centralized management and auditing of decryption operations are achieved, effectively reducing the risk of data leakage and compliance costs.
[0117] During the encryption and decryption process of the intermediate parameters, detailed log records are kept for each link in the entire process, and the decryption application process of the retrieval service system is recorded for subsequent auditing and supervision, thereby ensuring the compliance and traceability of the operation.
[0118] In S8, the plaintext reasoning sub-model uses intermediate parameters as input and, using the model's internal pre-defined computational logic, completes the subsequent reasoning process, outputting the final inference result. The retrieval service system encapsulates the inference result and adds necessary metadata, such as the inference task identifier, inference time, and result type, to enable the business application system to correctly identify and process it. The encapsulated inference result is sent to the business application system via a secure communication protocol (such as HTTPS). During transmission, encryption technology is used to encrypt the data to prevent theft or tampering during transmission. After receiving and decrypting the inference result, the business application system sends a receipt confirmation message to the retrieval service system to ensure successful transmission of the result.
[0119] In summary, the disclosed knowledge base privacy protection method utilizes a secure computing environment (TEE) to protect data at key processing nodes before exposing intermediate parameters to a plaintext computing environment. Even if the entire system has security vulnerabilities, sensitive content such as contextual information and intermediate parameters will not be accessible to unauthorized entities. For example, in a medical data inference scenario, a patient's sensitive health data is used as contextual information for inference processing within the TEE, effectively preventing data leaks and effectively protecting patient privacy. Furthermore, the secure computing environment ensures that the code running within it cannot be tampered with. For example, when performing encryption operations on intermediate parameters, it can resist interference from malware or attackers in the encryption process, ensuring the accuracy and integrity of the encryption operation and avoiding the risk of encryption failure or data leakage caused by code tampering.
[0120] Furthermore, the secure computing environment is optimized for key privacy-preserving computing tasks, such as encryption and decryption operations, which can be completed efficiently without excessively occupying large model computing resources. The encrypted reasoning sub-model has concise computing logic and only handles some reasoning tasks related to privacy protection, avoiding the performance loss caused by complex security protection operations. In addition, the data interaction between the secure computing environment and the plaintext computing environment has been carefully designed, and the intermediate parameter transmission process is efficient and orderly, reducing the impact of data transmission delays and inconsistencies on the performance of large models, ensuring the security, efficiency, and accuracy of the reasoning process. It can be seen that by utilizing the secure computing environment, this method can achieve relatively high performance while ensuring that the knowledge base is not exposed throughout the process.
[0121] Reference Figure 4 The present disclosure provides a knowledge base privacy protection system, comprising:
[0122] The subject judgment module 101 is used to judge whether the business application system and the knowledge management platform are the same subject when the business application system initiates a query request; if not, the privacy calculation module 102 is executed; if so, the local calculation module 103 is executed;
[0123] The privacy calculation module 102 is used to perform cross-platform privacy matching on the prompt words provided by the business application system and the knowledge base provided by the knowledge management platform to obtain search results;
[0124] The local calculation module 103 is used to perform local calculations on the prompt words and the knowledge base to obtain search results;
[0125] The data isolation module 104 is used to transmit the search results to a secure computing environment provided by the search service system for isolation;
[0126] The privacy fusion module 105 is used to perform privacy fusion of the search results and the prompt word in a secure computing environment to obtain context information; the model splitting module is used to split the preset reasoning model into an encrypted reasoning sub-model and a plaintext reasoning sub-model, deploy the encrypted reasoning sub-model in the secure computing environment, and deploy the plaintext reasoning sub-model in the plaintext computing environment of the retrieval service system;
[0127] The encrypted reasoning module 106 is used to perform encrypted reasoning on the context information using the encrypted reasoning sub-model to obtain intermediate parameters;
[0128] The explicit reasoning module 107 is used to perform explicit reasoning on the intermediate parameters using the explicit reasoning sub-model, obtain reasoning results, and send the reasoning results to the business application system.
[0129] The various variations and specific examples of the privacy protection method for the knowledge base provided above are also applicable to the privacy protection system for the knowledge base provided in the present disclosure. Through the above detailed description of the privacy protection method for the knowledge base, those skilled in the art can clearly know the implementation method of the privacy protection system for the knowledge base. For the sake of brevity of the specification, it will not be described in detail here.
[0130] A computer device according to an embodiment of the present disclosure includes a memory and a processor. The memory is used to store non-transitory computer-readable instructions. Specifically, the memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), a hard disk, flash memory, etc.
[0131] The processor can be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and can control other components in the computer device to perform desired functions. In one embodiment of the present disclosure, the processor is used to execute the computer-readable instructions stored in the memory, causing the computer device to perform all or part of the steps of the knowledge base privacy protection method described in the various embodiments of the present disclosure.
[0132] Those skilled in the art should understand that in order to solve the technical problem of how to obtain a good user experience, this embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the scope of protection of this disclosure.
[0133] like Figure 5The present invention provides a schematic diagram of the structure of a computer device according to an embodiment of the present invention. Figure 5 The computer device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0134] like Figure 5 As shown, a computer device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) or programs loaded from a storage device into a random access memory (RAM). The RAM also stores various programs and data required for the operation of the computer device. The processor, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0135] Typically, the following devices can be connected to the I / O interface: input devices such as sensors or visual information acquisition devices; output devices such as display screens; storage devices such as tapes and hard disks; and communication devices. The communication device can allow the computer device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Figure 5 A computer device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0136] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the privacy protection method of the knowledge base of the embodiment of the present disclosure are executed.
[0137] For detailed description of this embodiment, please refer to the corresponding description in the aforementioned embodiments, which will not be repeated here.
[0138] According to an embodiment of the present disclosure, a computer-readable storage medium stores non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the privacy protection method for a knowledge base described in each embodiment of the present disclosure are executed.
[0139] The above-mentioned computer-readable storage media include, but are not limited to, optical storage media (e.g., CD-ROMs and DVDs), magneto-optical storage media (e.g., MOs), magnetic storage media (e.g., magnetic tapes or mobile hard disks), media with built-in rewritable non-volatile memory (e.g., memory cards), and media with built-in ROM (e.g., ROM cartridges).
[0140] For detailed description of this embodiment, please refer to the corresponding description in the aforementioned embodiments, which will not be repeated here.
[0141] The basic principles of the present disclosure have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, and effects mentioned in this disclosure are merely illustrative and not restrictive, and should not be construed as necessarily possessed by each embodiment of the present disclosure. Furthermore, the specific details disclosed above are provided for illustrative purposes and to facilitate understanding, rather than as limitations. These details do not limit the present disclosure to necessarily being implemented using these specific details.
[0142] In the present disclosure, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, or configured in any manner. Words such as "including," "comprising," "having," and the like are open-ended words, meaning "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or" and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0143] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.
[0144] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0145] Various changes, substitutions, and modifications may be made to the technology described herein without departing from the teachings defined by the appended claims. Moreover, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of things, means, methods, and actions described above. Currently existing or later developed processes, machines, manufactures, compositions of things, means, methods, or actions that perform substantially the same function or achieve substantially the same results as the corresponding aspects described herein may be utilized. Accordingly, the appended claims include within their scope such processes, machines, manufactures, compositions of things, means, methods, or actions.
[0146] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0147] The above description has been provided for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A privacy protection method for a knowledge base, characterized in that: include: When the business application system initiates a query request, it determines whether the business application system and the knowledge management platform are the same entity; If not, a cross-platform privacy match is performed on the prompt words provided by the business application system and the knowledge base provided by the knowledge management platform to obtain the search results; If yes, perform local calculation on the prompt word and the knowledge base to obtain the search result; Transmitting the search results to a secure computing environment provided by the search service system for isolation; In the secure computing environment, privately fusing the search result with the prompt word to obtain context information; Splitting the preset reasoning model into an encrypted reasoning sub-model and a plaintext reasoning sub-model, deploying the encrypted reasoning sub-model in the secure computing environment, and deploying the plaintext reasoning sub-model in the plaintext computing environment of the retrieval service system; Performing encrypted reasoning on the context information using the encrypted reasoning sub-model to obtain intermediate parameters; The privacy protection method of the knowledge base further includes: Encrypt the intermediate parameters using the public key provided by the knowledge management platform to generate encrypted parameters; Sending the encryption parameters from the secure computing environment to the plaintext computing environment for authorized decryption; Perform plaintext reasoning on the intermediate parameters using the plaintext reasoning sub-model to obtain a reasoning result, and send the reasoning result to the business application system.
2. The privacy protection method for a knowledge base according to claim 1, characterized in that: The determination of whether the business application system and the knowledge management platform are the same entity includes: Comparing the first identity identifier of the business application system with the second identity identifier of the knowledge management platform; If the comparison is consistent, it is determined that the business application system and the knowledge management platform are the same entity; If the comparison is inconsistent, it is determined that the business application system and the knowledge management platform are not the same entity.
3. The privacy protection method for a knowledge base according to claim 1, characterized in that: The cross-platform privacy matching of the prompt words provided by the business application system and the knowledge base provided by the knowledge management platform to obtain the search results includes: The prompt word is sent to the knowledge management platform, and the received prompt word is searched using the local knowledge base of the knowledge management platform to obtain a search result.
4. The method for protecting the privacy of a knowledge base according to any one of claims 1 to 3, characterized in that: The transmitting the search results to a secure computing environment provided by the search service system for isolation includes: When the search service system has access authorization to the search results; Then, the search result is encrypted based on the authorization information to generate an encrypted file containing the authorization information; Encrypt the encrypted file again using the public key provided by the retrieval service system to generate a secondary encrypted file and send it to the retrieval service system; The secondary encrypted file is decrypted using a private key and a decryption key preset by the retrieval service system, and the decrypted retrieval result is stored in a secure memory area of the secure computing environment based on the decrypted authorization information.
5. The privacy protection method for a knowledge base according to claim 4, characterized in that: The transmitting the search results to a secure computing environment provided by the search service system for isolation further includes: When the search service system does not have access authorization to the search results; Then encrypting the search result to generate an encrypted search result and a first key, and encrypting the first key using the public key of the secure computing environment to generate an encryption key; loading the encrypted search result and the encryption key into the secure computing environment, and decrypting the encryption key using a private key of the secure computing environment; The encrypted search result is decrypted using the decrypted first key, and the decrypted search result is stored in the secure memory area.
6. The privacy protection method for a knowledge base according to claim 1, characterized in that: The privacy fusion of the search result and the prompt word to obtain context information includes: When the number of the search results is 1, the search results and the prompt words are concatenated in a preset order to generate the context information; When the number of the search results is not 1, all the search results are merged into a new search result; The new search result and the prompt word are spliced in the preset order to generate the context information.
7. A computer device, characterized in that: The computer device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the privacy protection method of the knowledge base according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, which are used to enable a computer to execute the knowledge base privacy protection method according to any one of claims 1 to 6.
9. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and device for carrying out privacy protection on data in large model reasoning
CN119382871A
Data isolation and privacy protection method and system for large data security model
CN119442290A