A method and system for protecting private domain knowledge
By symmetrically encrypting the data in the data preprocessing stage and encrypting the LoRA model with trusted keys during the model training stage, the privacy leakage problem of large models when processing private domain knowledge is solved, and efficient knowledge protection and data security are achieved.
Patent Information
- Application Number
- CN202411153804.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-08-21
AI Technical Summary
When using large models to process private domain knowledge, the prior art lacks effective knowledge protection measures, resulting in the possibility of sensitive information being leaked during data preprocessing, resulting in privacy leakage.
By encrypting the data using symmetric encryption techniques such as AES-256 during the data preprocessing phase and encrypting the LoRA model with trusted keys during the model training phase, ensuring that only authorized users or systems can access and use the encryption model.
It effectively prevents data from being accessed or leaked unauthorized during preprocessing, ensures data privacy and security, and achieves the accuracy and efficiency of knowledge protection.
Smart Images

Figure CN119128969B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of text data processing, and in particular relates to a private domain knowledge protection method and system. Background Art
[0002] In the field of artificial intelligence, significant progress has been made in the application of large models that can handle a variety of complex tasks and generate high-quality results. Large models perform well in many fields, but existing technologies face a series of challenges when it comes to the application of private domain knowledge.
[0003] Private domain knowledge is not adequately protected in existing technologies. Traditional methods directly retrieve unencrypted original documents, analyze and obtain private domain knowledge, and then integrate it into the model training and reasoning process. This may lead to the leakage of sensitive information and privacy leakage during the preprocessing of large amounts of data. Summary of the invention
[0004] The purpose of the present invention is to provide a private domain knowledge protection method and system, which solves the technical problems of strictly isolating different LoRA models to ensure the accuracy of knowledge protection, using symmetric encryption technology and trusted key encryption of the model in the data preprocessing stage to protect data privacy.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] A private domain knowledge protection method and system, comprising the following steps:
[0007] Step 1: Establish data input layer, data preprocessing layer, knowledge induction and classification layer, training set construction and optimization layer, model training and encryption protection layer, and user access control layer.
[0008] Establish a document collection module at the data input layer, and the document collection module obtains documents from the Internet;
[0009] Step 2: Establish a preprocessing module and an encryption module in the data preprocessing layer. The preprocessing module uses a multi-format parser to parse the document, extract and identify the text by paragraph, and generate paragraph structured data.
[0010] The encryption module encrypts the paragraph structured data using a symmetric encryption method;
[0011] Step 3: Establish a big model analysis module and a classification module in the knowledge induction and classification layer. The big model analysis module retrieves the paragraph structured data, decrypts it, extracts the document summary and keywords through the big model in the private domain, and vectorizes them to generate a semantically based high-dimensional vector;
[0012] The classification module classifies documents into specified categories based on the vectorized semantic similarity and generates classified document paragraph data;
[0013] Step 4: Establish a key point summary module, a guiding question generation module, and an expansion and cleaning module in the training set construction and optimization layer. The key point summary module generates a paragraph summary.
[0014] The guiding question generation module asks guiding questions and creates question-answer pairs;
[0015] The expansion and cleaning module expands and cleans the question-answer pairs, and finally generates an optimized training set;
[0016] Step 5: Establish a model training module and a trusted key management module in the model training and encryption protection layer. The model training module uses the LoRA method to train the large model through the optimized training set to generate a LoRA model, optimize the core features of the private domain knowledge set, and obtain the optimized LoRA model;
[0017] The trusted key management module encrypts the optimized LoRA model with a trusted key to obtain an encrypted model file;
[0018] Step 6: Establish an authentication control module and a dynamic permission adjustment module in the user access control layer. The authentication control module manages user access rights through the RBAC mechanism and protects access to encrypted model files based on symmetric encryption technology. The dynamic permission adjustment module adjusts access rights.
[0019] Preferably, when executing step 1, the data source of the Internet includes local files, databases, and cloud storage, and the document is a knowledge document, and the format of the knowledge document includes text, table, list, or PDF.
[0020] Preferably, when executing step 2, the multi-format parser identifies and retains the original structure of the document and completely extracts the knowledge structure of the document.
[0021] Preferably, when executing step 2, the following steps are specifically included:
[0022] Step 2-1: The preprocessing module uses a multi-format parser to parse the document, extract and identify the text by paragraph, and generate paragraph structured data;
[0023] Multi-format parsers include PDF parser and text parser;
[0024] The data content of paragraph structured data includes the paragraph text and metadata of the document, and the metadata includes the paragraph number and title;
[0025] The data format of the paragraph structured data includes JSON format or XML format;
[0026] Step 2-2: Use the symmetric encryption algorithm AES-256 to encrypt the paragraph structured data and generate a symmetric encryption key for encrypting and decrypting data. The specific steps include the following:
[0027] Step 2-2-1: Convert the paragraph structured data into a byte stream format suitable for encryption;
[0028] Step 2-2-2: Generate a random initialization vector to enhance encryption security;
[0029] Step 2-2-3: Use the AES-256 algorithm to encrypt the data and obtain the ciphertext;
[0030] Step 2-2-4: Save the ciphertext as an encrypted data file, that is, an encrypted paragraph structured data file, and store the encrypted data content and the symmetric encryption key.
[0031] Preferably, when executing step 3, the specific steps are as follows:
[0032] Step 3-1: The large model analysis module retrieves the paragraph structured data, decrypts the data using the symmetric encryption key, and restores it to processable structured data;
[0033] Step 3-2: The big model analysis module extracts the document summary and file name description based on the structured data through the big model in the private domain;
[0034] Step 3-3: The large model analysis module generates keywords for the document and extracts representative keywords by analyzing the core concepts and subject words of the document;
[0035] Step 3-4: The large model analysis module uses the text embedding model to vectorize the document summary and keywords to generate a semantically based high-dimensional vector;
[0036] Step 3-5: The classification module classifies the documents into specified categories based on the vectorized semantic similarity and generates classified document paragraph data.
[0037] Preferably, when executing step 3-1, the specific steps of decrypting data using the symmetric encryption key are as follows:
[0038] Step 3-1-1: Retrieve the encrypted paragraph structured data file and use the symmetric encryption key generated and securely stored previously;
[0039] Step 3-1-2: Extract the initialization vector from the encrypted data;
[0040] Step 3-1-3: Decrypt the ciphertext using the AES-256 algorithm and the symmetric encryption key. Specifically, the ciphertext is converted back to the original paragraph structured data through the AES-256 decryption algorithm. The obtained original data will be restored to processable paragraph text and metadata.
[0041] Preferably, when executing step 4, the following steps are specifically included:
[0042] Step 4-1: The key points summary module summarizes the key points of the paragraphs based on the classified document paragraph data and generates a concise summary of the paragraph content;
[0043] Step 4-2: The guiding question generation module asks guiding questions and generates question-answer pairs related to the paragraph content;
[0044] Step 4-3: The expansion and cleaning module performs derivative expansion of specified types on the generated question-answer pairs to enhance the diversity of the training set;
[0045] Step 4-4: The expansion and cleaning module cleans and scores the expanded question-answer pairs, filters out low-scoring data, and obtains an optimized training set.
[0046] Preferably, when executing step 5, the following steps are specifically included:
[0047] Step 5-1: Treat the document paragraph data as a private domain knowledge set;
[0048] Step 5-2: The model training module uses the LoRA method to train the large model through a diversified training set, which specifically includes the following steps:
[0049] Step 5-2-1: Add low-rank matrix A and low-rank matrix B based on the large model;
[0050] Step 5-2-2: Only train and optimize the low-rank matrix A and low-rank matrix B, while keeping the original large model parameters unchanged;
[0051] Step 5-2-3: Enhance the function of the model by adjusting the low-rank matrix A and the low-rank matrix B to adapt it to the task requirements and obtain the LoRA model;
[0052] Step 5-3: Optimize the core features of the private domain knowledge set to obtain the optimized LoRA model;
[0053] Step 5-4: The trusted key management module performs trusted key encryption on the optimized LoRA model to obtain an encrypted model file. The trusted key encryption specifically uses the hardware security module to generate and manage encryption keys, which is specifically implemented through symmetric encryption.
[0054] Preferably, when executing step 6, the following steps are specifically included:
[0055] Step 6-1: The authentication control module manages user permissions through role-based access control (RBAC);
[0056] Step 6-2: The authentication control module protects model access through symmetric encryption technology, ensuring that only authorized users can decrypt and use the model;
[0057] Step 6-3: The dynamic permission adjustment module adjusts user access rights according to actual needs and delegates or reclaims access rights to the LoRA model.
[0058] A private domain knowledge protection system, comprising a data input layer, a data preprocessing layer, a knowledge summarization and classification layer, a training set construction and optimization layer, a model training and encryption protection layer, and a user access control layer, wherein the data input layer, the data preprocessing layer, the knowledge summarization and classification layer, the training set construction and optimization layer, the model training and encryption protection layer, and the user access control layer communicate with each other via the Internet;
[0059] The data input layer includes a document collection module;
[0060] The data preprocessing layer includes a preprocessing module and an encryption module;
[0061] The knowledge induction and classification layer includes a large model analysis module and a classification module;
[0062] The training set construction and optimization layer includes a key point summarization module, a guiding question generation module, and an expansion and cleaning module;
[0063] The model training and encryption protection layer includes a model training module and a trusted key management module; the user access control layer includes an authentication control module and a dynamic permission adjustment module.
[0064] A private domain knowledge protection method and system described in the present invention solves the technical problems of strictly isolating different LoRA models to ensure the accuracy of knowledge protection, using symmetric encryption technology and encrypting the model with trusted keys in the data preprocessing stage to protect data privacy. The present invention ensures the privacy and security of the original data in the entire processing flow by applying symmetric encryption technology (such as AES-256) in the data preprocessing stage. This method effectively prevents the data from being accessed or leaked without authorization during the preprocessing process. By encrypting the model with trusted key encryption technology, it ensures that the model ensures that only authorized users or systems can use keys for encryption and decryption operations, thereby ensuring the security of the data. A hybrid encryption strategy is adopted, and efficient symmetric encryption technology is used in the data preprocessing stage to ensure the efficiency of data processing; trusted key encryption technology is used in the model training stage to ensure data privacy and computing security. This phased encryption strategy can give full play to the advantages of different encryption technologies and achieve a balance between efficiency and security. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 It is the main flow chart of the present invention;
[0066] Figure 2 is a flow chart of step 2 of the present invention;
[0067] Figure 3 is a flow chart of steps 3 and 4 of the present invention;
[0068] Figure 4 It is a schematic diagram of a LoRA model obtained after training using the LoRA method of the present invention;
[0069] Figure 5 It is a flow chart of step 6 of the present invention. DETAILED DESCRIPTION
[0070] Embodiment 1:
[0071] like Figure 1-Figure 5 A private domain knowledge protection method and system shown includes the following steps:
[0072] Step 1: Establish data input layer, data preprocessing layer, knowledge induction and classification layer, training set construction and optimization layer, model training and encryption protection layer, and user access control layer.
[0073] A document collection module is established at the data input layer, and the document collection module obtains documents from the Internet; the data sources of the Internet include local files, databases, and cloud storage, and the documents are knowledge documents, and the formats of the knowledge documents include text, tables, lists, or PDF.
[0074] Step 2: Establish a preprocessing module and an encryption module in the data preprocessing layer. The preprocessing module uses a multi-format parser to parse the document, extract and identify the text by paragraph, and generate paragraph structured data; the multi-format parser identifies and retains the original structure of the document, and completely extracts the knowledge structure of the document.
[0075] In this embodiment, the preprocessing of the document includes using a multi-format parser to parse the document in detail, and performing text extraction and text recognition in paragraph units. During the text extraction process, the parser will identify various formats in the document, such as titles, paragraphs, lists, and tables, and retain this information according to the structure of the original document. In this way, the knowledge structure of the document can be extracted as completely as possible, ensuring that the subsequent processing links can accurately understand the document content.
[0076] The encryption module encrypts the paragraph structured data using a symmetric encryption method;
[0077] When executing step 2, the specific steps include:
[0078] Step 2-1: The preprocessing module uses a multi-format parser to parse the document, extract and identify the text by paragraph, and generate paragraph structured data;
[0079] Multi-format parsers include PDF parser and text parser;
[0080] The data content of paragraph structured data includes the paragraph text and metadata of the document, and the metadata includes the paragraph number and title;
[0081] The data format of the paragraph structured data includes JSON format or XML format;
[0082] Step 2-2: Use the symmetric encryption algorithm AES-256 to encrypt the paragraph structured data and generate a symmetric encryption key for encrypting and decrypting data. The specific steps include the following:
[0083] Step 2-2-1: Convert the paragraph structured data into a byte stream format suitable for encryption;
[0084] Step 2-2-2: Generate a random initialization vector to enhance encryption security;
[0085] Step 2-2-3: Use the AES-256 algorithm to encrypt the data and obtain the ciphertext;
[0086] Step 2-2-4: Save the ciphertext as an encrypted data file, that is, an encrypted paragraph structured data file, and store the encrypted data content and the symmetric encryption key.
[0087] In this embodiment, a key management service (KMS) or a hardware security module (HSM) is used to ensure the security of the key.
[0088] Step 3: Establish a big model analysis module and a classification module in the knowledge induction and classification layer. The big model analysis module retrieves the paragraph structured data, decrypts it, extracts the document summary and keywords through the big model in the private domain, and vectorizes them to generate a semantically based high-dimensional vector;
[0089] The classification module classifies documents into specified categories based on the vectorized semantic similarity and generates classified document paragraph data;
[0090] When executing step 3, the specific steps are as follows:
[0091] Step 3-1: The large model analysis module retrieves the paragraph structured data, decrypts the data using the symmetric encryption key, and restores it to processable structured data;
[0092] When executing step 3-1, the specific steps for decrypting data using the encryption key of symmetric encryption are as follows:
[0093] Step 3-1-1: Retrieve the encrypted paragraph structured data file and use the symmetric encryption key generated and securely stored previously;
[0094] Step 3-1-2: Extract the initialization vector from the encrypted data;
[0095] Step 3-1-3: Decrypt the ciphertext using the AES-256 algorithm and the symmetric encryption key. Specifically, the ciphertext is converted back to the original paragraph structured data through the AES-256 decryption algorithm. The obtained original data will be restored to processable paragraph text and metadata.
[0096] Step 3-2: The big model analysis module extracts the document summary and file name description based on the structured data through the big model in the private domain;
[0097] Step 3-3: The large model analysis module generates keywords for the document and extracts representative keywords by analyzing the core concepts and subject words of the document;
[0098] Step 3-4: The large model analysis module uses the text embedding model to vectorize the document summary and keywords to generate a semantically based high-dimensional vector;
[0099] Step 3-5: The classification module classifies the documents into specified categories based on the vectorized semantic similarity and generates classified document paragraph data.
[0100] In this embodiment, a large model under the private domain is used for knowledge induction and classification. First, the large model extracts the summary and generates the file name description for each document. Subsequently, a set of representative keywords are extracted by analyzing the core concepts and subject words of the document. Next, the text embedding model can be used to semantically vectorize the summary and keywords of the document. The text embedding model converts the text into a high-dimensional vector to capture the deep semantic information of the text. The generated high-dimensional vector is used for retrieval based on semantic similarity, so as to accurately classify the document into predetermined categories. This method can effectively classify documents accurately according to their actual content.
[0101] Large models can use Transformer-based models (such as BERT, GPT), etc., and how to optimize them according to different document characteristics to improve analysis accuracy.
[0102] The classification module can use algorithms such as SVM, decision tree, deep learning classifier, etc. to classify documents into specified categories.
[0103] Step 4: Establish a key point summary module, a guiding question generation module, and an expansion and cleaning module in the training set construction and optimization layer. The key point summary module generates a paragraph summary.
[0104] The guiding question generation module asks guiding questions and creates question-answer pairs;
[0105] The expansion and cleaning module expands and cleans the question-answer pairs, and finally generates an optimized training set;
[0106] In this embodiment, a training set is constructed for each private domain knowledge set. First, the big model under the private domain is used to summarize the key points of each paragraph in the document in detail and guide questions.
[0107] When executing step 4, the specific steps include:
[0108] Step 4-1: The key points summary module summarizes the key points of the paragraphs based on the classified document paragraph data and generates a concise summary of the paragraph content;
[0109] Summarizing the key points of a paragraph involves analyzing the content of each paragraph, extracting the key points, and generating a concise summary of the key points. These key point summaries help the model understand the core information of the paragraph.
[0110] Step 4-2: The guiding question generation module asks guiding questions and generates question-answer pairs related to the paragraph content;
[0111] Ask guiding questions to the model: Based on the summary of key points, guide the model to generate relevant questions and answers. These questions can include glossary, key point explanation, and open question analysis. Glossary questions explain the proper nouns in the paragraph; key point explanation questions explain the core information of the paragraph in detail; open question analysis encourages the model to think deeply and analyze the content of the paragraph.
[0112] Step 4-3: The expansion and cleaning module performs derivative expansion of specified types on the generated question-answer pairs to enhance the diversity of the training set;
[0113] Step 4-4: The expansion and cleaning module cleans and scores the expanded question-answer pairs, filters out low-scoring data, and obtains an optimized training set.
[0114] This embodiment constructs question-answer pairs as the basis of the training set. Afterwards, these basic question-answer pairs are derived and expanded into specified types. For example, for documents on process methods, detailed questions and answers related to process steps can be generated; for documents on rules and regulations, questions and answers about the content of the regulations, implementation details, etc. can be generated. Through these derivation methods, the diversity and coverage of the training set can be further expanded and enhanced.
[0115] For the expanded question and answer pairs, further cleaning is required. A large model is used to score the original knowledge document content in terms of correctness, logic, and expression accuracy, and the low-scoring expanded data is filtered to exclude question and answer pairs that are inconsistent with the original document content, have confusing logic, and are unclear in expression.
[0116] Through the above generation and scoring methods, the coverage of the training set on specific knowledge is significantly improved, thereby improving the performance of the training model. The model can learn and understand private domain knowledge more comprehensively, improving its effectiveness and accuracy in practical applications.
[0117] Step 5: Establish a model training module and a trusted key management module in the model training and encryption protection layer. The model training module uses the LoRA method to train the large model through the optimized training set to generate a LoRA model, optimize the core features of the private domain knowledge set, and obtain the optimized LoRA model;
[0118] In this embodiment, multiple LoRA models are generated according to the diversity of the training set to better adapt to different application scenarios or data characteristics, thereby improving the performance and efficiency of the model.
[0119] The trusted key management module encrypts the optimized LoRA model with a trusted key to obtain an encrypted model file;
[0120] When executing step 5, the specific steps include:
[0121] Step 5-1: Treat the document paragraph data as a private domain knowledge set;
[0122] Step 5-2: The model training module uses the LoRA method to train the large model through a diversified training set, which specifically includes the following steps:
[0123] Step 5-2-1: Add low-rank matrix A and low-rank matrix B based on the large model;
[0124] Step 5-2-2: Only train and optimize the low-rank matrix A and low-rank matrix B, while keeping the original large model parameters unchanged;
[0125] Step 5-2-3: Enhance the function of the model by adjusting the low-rank matrix A and the low-rank matrix B to adapt it to the task requirements and obtain the LoRA model;
[0126] Step 5-3: Optimize the core features of the private domain knowledge set to obtain the optimized LoRA model;
[0127] Step 5-4: The trusted key management module performs trusted key encryption on the optimized LoRA model to obtain an encrypted model file. The trusted key encryption specifically uses the hardware security module to generate and manage encryption keys, which is specifically implemented through symmetric encryption.
[0128] In this embodiment, by retaining only the core features of the private domain knowledge set, the potential leakage risk in the model is reduced, and the performance and privacy protection capabilities of the LoRA model are optimized by combining the question-answer pairs after data expansion and the corresponding private domain knowledge set.
[0129] Step 6: Establish an authentication control module and a dynamic permission adjustment module in the user access control layer. The authentication control module manages user access rights through the RBAC mechanism and protects access to encrypted model files based on symmetric encryption technology. The dynamic permission adjustment module adjusts access rights.
[0130] When executing step 6, the specific steps include:
[0131] Step 6-1: The authentication control module manages user permissions through role-based access control (RBAC);
[0132] Step 6-2: The authentication control module protects model access through symmetric encryption technology, ensuring that only authorized users can decrypt and use the model;
[0133] Step 6-3: The dynamic permission adjustment module adjusts user access rights according to actual needs and delegates or reclaims access rights to the LoRA model.
[0134] In this embodiment, in order to manage and control user access to the model, an authentication control mechanism is integrated. The model deployment stage combines symmetric encryption technology and role-based access control (RBAC) mechanism to ensure that only authorized users can access and use the LoRA model in private domain knowledge. The RBAC mechanism effectively protects the security of the model by clarifying user roles and assigning corresponding permissions. In addition, the mechanism also allows dynamic adjustment of user permissions according to actual needs, and flexible management of model access, such as delegating or revoking access rights. These multi-level security protection measures maximize the security of the model and the confidentiality of private domain knowledge data, ensuring the safe and efficient application and management of the model.
[0135] Embodiment 2:
[0136] A private domain knowledge protection system described in Example 2 is implemented in conjunction with a private domain knowledge protection method described in Example 1, and includes a data input layer, a data preprocessing layer, a knowledge summarization and classification layer, a training set construction and optimization layer, a model training and encryption protection layer, and a user access control layer, wherein the data input layer, the data preprocessing layer, the knowledge summarization and classification layer, the training set construction and optimization layer, the model training and encryption protection layer, and the user access control layer communicate with each other via the Internet;
[0137] The data input layer includes a document collection module;
[0138] The data preprocessing layer includes a preprocessing module and an encryption module;
[0139] The knowledge induction and classification layer includes a large model analysis module and a classification module; a large language model is preset in the large model analysis module.
[0140] The training set construction and optimization layer includes a key point summarization module, a guiding question generation module, and an expansion and cleaning module;
[0141] The model training and encryption protection layer includes a model training module and a trusted key management module;
[0142] The user access control layer includes an authentication control module and a dynamic permission adjustment module.
[0143] In this embodiment, the document collection module, preprocessing module, encryption module, large model analysis module, classification module, key point summary module, guiding question generation module, expansion and cleaning module, model training module, trusted key management module, authentication control module and dynamic authority adjustment module are all servers.
[0144] A private domain knowledge protection method and system described in the present invention solves the technical problems of strictly isolating different LoRA models to ensure the accuracy of knowledge protection, using symmetric encryption technology and encrypting the model with trusted keys in the data preprocessing stage to protect data privacy. The present invention ensures the privacy and security of the original data in the entire processing flow by applying symmetric encryption technology (such as AES-256) in the data preprocessing stage. This method effectively prevents the data from being accessed or leaked without authorization during the preprocessing process. By encrypting the model with trusted key encryption technology, it ensures that the model ensures that only authorized users or systems can use keys for encryption and decryption operations, thereby ensuring the security of the data. A hybrid encryption strategy is adopted, and efficient symmetric encryption technology is used in the data preprocessing stage to ensure the efficiency of data processing; trusted key encryption technology is used in the model training stage to ensure data privacy and computing security. This phased encryption strategy can give full play to the advantages of different encryption technologies and achieve a balance between efficiency and security.
Claims
1. A method for protecting private domain knowledge, characterized in that: The steps include: Step 1: Establish data input layer, data preprocessing layer, knowledge induction and classification layer, training set construction and optimization layer, model training and encryption protection layer, and user access control layer. Establish a document collection module at the data input layer, and the document collection module obtains documents from the Internet; Step 2: Establish a preprocessing module and an encryption module in the data preprocessing layer. The preprocessing module uses a multi-format parser to parse the document, extract and identify the text by paragraph, and generate paragraph structured data. The encryption module encrypts the paragraph structured data using a symmetric encryption method; Step 3: Establish a big model analysis module and a classification module in the knowledge induction and classification layer. The big model analysis module retrieves the paragraph structured data, decrypts it, extracts the document summary and keywords through the big model in the private domain, and vectorizes them to generate a semantically based high-dimensional vector; The classification module classifies documents into specified categories based on the vectorized semantic similarity and generates classified document paragraph data; Step 4: Establish a key point summary module, a guiding question generation module, and an expansion and cleaning module in the training set construction and optimization layer. The key point summary module generates a paragraph summary. The guiding question generation module asks guiding questions and creates question-answer pairs; The expansion and cleaning module expands and cleans the question-answer pairs, and finally generates an optimized training set; Step 5: Establish a model training module and a trusted key management module in the model training and encryption protection layer. The model training module uses the LoRA method to train the large model through the optimized training set to generate a LoRA model, optimize the core features of the private domain knowledge set, and obtain the optimized LoRA model; The trusted key management module encrypts the optimized LoRA model with a trusted key to obtain an encrypted model file; When executing step 5, the specific steps include: Step 5-1: Treat the document paragraph data as a private domain knowledge set; Step 5-2: The model training module uses the LoRA method to train the large model through a diversified training set, which specifically includes the following steps: Step 5-2-1: Add low-rank matrix A and low-rank matrix B based on the large model; Step 5-2-2: Only train and optimize the low-rank matrix A and low-rank matrix B, while keeping the original large model parameters unchanged; Step 5-2-3: Enhance the function of the model by adjusting the low-rank matrix A and the low-rank matrix B to adapt it to the task requirements and obtain the LoRA model; Step 5-3: Optimize the core features of the private domain knowledge set to obtain the optimized LoRA model; Step 5-4: The trusted key management module performs trusted key encryption on the optimized LoRA model to obtain an encrypted model file. The trusted key encryption specifically uses the hardware security module to generate and manage encryption keys, which is specifically implemented through symmetric encryption; Step 6: Establish an authentication control module and a dynamic permission adjustment module in the user access control layer. The authentication control module manages user access rights through the RBAC mechanism and protects access to encrypted model files based on symmetric encryption technology. The dynamic permission adjustment module adjusts access rights.
2. A method for protecting private domain knowledge according to claim 1, characterized in that: When executing step 1, the data source of the Internet includes local files, databases, and cloud storage, and the document is a knowledge document, and the format of the knowledge document includes text, table, list, or PDF.
3. A method for protecting private domain knowledge according to claim 1, characterized in that: When executing step 2, the multi-format parser recognizes and retains the original structure of the document and completely extracts the knowledge structure of the document.
4. A method for protecting private domain knowledge according to claim 1, characterized in that: When executing step 2, the specific steps include: Step 2-1: The preprocessing module uses a multi-format parser to parse the document, extract and identify the text by paragraph, and generate paragraph structured data; Multi-format parsers include PDF parser and text parser; The data content of paragraph structured data includes the paragraph text and metadata of the document, and the metadata includes the paragraph number and title; The data format of the paragraph structured data includes JSON format or XML format; Step 2-2: Use the symmetric encryption algorithm AES-256 to encrypt the paragraph structured data and generate a symmetric encryption key for encrypting and decrypting data. The specific steps include the following: Step 2-2-1: Convert the paragraph structured data into a byte stream format suitable for encryption; Step 2-2-2: Generate a random initialization vector to enhance encryption security; Step 2-2-3: Use the AES-256 algorithm to encrypt the data and obtain the ciphertext; Step 2-2-4: Save the ciphertext as an encrypted data file, that is, an encrypted paragraph structured data file, and store the encrypted data content and the symmetric encryption key.
5. A method for protecting private domain knowledge according to claim 4, characterized in that: When executing step 3, the specific steps are as follows: Step 3-1: The large model analysis module retrieves the paragraph structured data, decrypts the data using the symmetric encryption key, and restores it to processable structured data; Step 3-2: The big model analysis module extracts the document summary and file name description based on the structured data through the big model in the private domain; Step 3-3: The large model analysis module generates keywords for the document and extracts representative keywords by analyzing the core concepts and subject words of the document; Step 3-4: The large model analysis module uses the text embedding model to vectorize the document summary and keywords to generate a semantically based high-dimensional vector; Step 3-5: The classification module classifies the documents into specified categories based on the vectorized semantic similarity and generates classified document paragraph data.
6. A method for protecting private domain knowledge according to claim 5, characterized in that: When executing step 3-1, the specific steps for decrypting data using the encryption key of symmetric encryption are as follows: Step 3-1-1: Retrieve the encrypted paragraph structured data file and use the symmetric encryption key generated and securely stored previously; Step 3-1-2: Extract the initialization vector from the encrypted data; Step 3-1-3: Decrypt the ciphertext using the AES-256 algorithm and the symmetric encryption key. Specifically, the ciphertext is converted back to the original paragraph structured data through the AES-256 decryption algorithm. The obtained original data will be restored to processable paragraph text and metadata.
7. A method for protecting private domain knowledge according to claim 1, characterized in that: When executing step 4, the specific steps include: Step 4-1: The key points summary module summarizes the key points of the paragraphs based on the classified document paragraph data and generates a concise summary of the paragraph content; Step 4-2: The guiding question generation module asks guiding questions and generates question-answer pairs related to the paragraph content; Step 4-3: The expansion and cleaning module performs derivative expansion of specified types on the generated question-answer pairs to enhance the diversity of the training set; Step 4-4: The expansion and cleaning module cleans and scores the expanded question-answer pairs, filters out low-scoring data, and obtains an optimized training set.
8. A method for protecting private domain knowledge according to claim 1, characterized in that: When executing step 6, the specific steps include: Step 6-1: The authentication control module manages user permissions through role-based access control (RBAC); Step 6-2: The authentication control module protects model access through symmetric encryption technology, ensuring that only authorized users can decrypt and use the model; Step 6-3: The dynamic permission adjustment module adjusts user access rights according to actual needs and delegates or reclaims access rights to the LoRA model.
9. A private domain knowledge protection system, applied to a private domain knowledge protection method according to any one of claims 1 to 8, characterized in that: It includes a data input layer, a data preprocessing layer, a knowledge summarization and classification layer, a training set construction and optimization layer, a model training and encryption protection layer, and a user access control layer. The data input layer, the data preprocessing layer, the knowledge summarization and classification layer, the training set construction and optimization layer, the model training and encryption protection layer, and the user access control layer communicate with each other through the Internet; The data input layer includes a document collection module; The data preprocessing layer includes a preprocessing module and an encryption module; The knowledge induction and classification layer includes a large model analysis module and a classification module; The training set construction and optimization layer includes a key point summarization module, a guiding question generation module, and an expansion and cleaning module; The model training and encryption protection layer includes a model training module and a trusted key management module; The user access control layer includes an authentication control module and a dynamic permission adjustment module.
Citation Information
Patent Citations
File encryption method and device, computer equipment and storage medium
CN118013557A
Educational administration management interaction method and system based on AI smart campus
CN118503937A