A method and system for encrypting sensitive data based on a large model
By introducing trusted third-party institutions and cryptographic technology, sensitive data in large models are encrypted and stored, and operation logs are uploaded to the chain, which solves the problems of sensitive data leakage and low identity authentication security in large models and achieves higher security and controllability.
Patent Information
- Application Number
- CN202311826397.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2043-12-27
AI Technical Summary
During the training process, large models may store sensitive data of users or training samples, leading to unauthorized data leakage and illegal use. In addition, user identity authentication security is low, and abnormal operations are difficult to trace.
By introducing trusted third-party organizations (CA and blockchain platform) and cryptographic technology, we ensure the encrypted storage of sensitive data and the on-chain storage of operation logs through user public key certificate verification, SM4 symmetric key encryption and blockchain evidence storage. We also generate a unique key based on the user certificate serial number to achieve identity authentication and data traceability.
It improves the security and reliability of large-scale model applications, ensures that sensitive data is not leaked, user identity authentication is secure, abnormal operations are traceable, and enhances the controllability and reliability of the system.
Smart Images

Figure CN117978439B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of model security technology, and more particularly, to a method and system for encrypting sensitive data based on a large model. Background Art
[0002] Cryptography is a national weapon, the security gene of information development, and the core technology for ensuring network and data security. It has also shown a trend of deep integration with various industries. As the most popular large-scale model field in the current science and technology field, cryptography technology can also solve many security problems.
[0003] Large models are machine learning models with numerous parameters and complex structures. These models can be applied to large-scale data and complex problems. After multiple rounds of technological iteration and upgrades, large models have gradually matured and ushered in a new wave of technological enthusiasm. However, their application also presents some security risks. For example, platforms attract a large number of users worldwide, and a large amount of personal data is accumulated, which poses a high risk of data leakage. Malicious users can use incorrect data to train models, and such behavior cannot be identified or traced. During the training process, the model may store sensitive personal data of users or training samples, leading to illegal use of data without user authorization. Summary of the Invention
[0004] According to the present invention, a method and system for encrypting sensitive data based on a large model are provided to solve the technical problem that the model may store sensitive data of personal users or training samples during training, resulting in illegal use of data without user authorization.
[0005] According to a first aspect of the present invention, a method for encrypting sensitive data based on a large model is provided. The method is run on a large model platform, a third-party CA / KMC, and a trusted third-party blockchain evidence storage platform, and includes:
[0006] After the user successfully logs in to the big model platform, the user creates a session and inputs training samples to the big model platform;
[0007] After receiving the training sample, the large model platform backend determines whether the training sample input by the user contains sensitive data. If it does not contain sensitive data, the model calculation is performed normally and the result is returned to the user.
[0008] If sensitive data is included, the big model calls the interface provided by the third-party KMC to obtain the master key, combines the user's certificate serial number as the encryption factor, converts the master key and encryption factor to generate an SM4 symmetric key, and encrypts and stores the sensitive data; calls the third-party trusted blockchain platform interface to store the user's sensitive data and operation logs on the chain.
[0009] Optionally, before the user successfully logs in to the large model platform, it includes:
[0010] When a user sends user information and registration information to a trusted third-party CA organization to apply for a personal digital certificate;
[0011] The third-party CA organization reviews the user information. If the review fails, a registration failure is returned to the user terminal.
[0012] Optionally, before the user successfully logs in to the large model platform, it includes:
[0013] If the review is successful, the user's personal digital certificate will be issued and returned to the user;
[0014] The user end writes the hardware UKey, publishes the user public key to LDAP, and synchronizes it to the large model platform.
[0015] Optionally, before the user successfully logs in to the large model platform, it also includes:
[0016] When the user inserts the hardware Ukey and logs into the large model platform, the user's personal digital certificate chain and user public key certificate are verified;
[0017] After the large model platform receives the user's public key certificate, it stores the user's public key certificate in the local background database.
[0018] Optionally, before the user successfully logs in to the large model platform, it also includes:
[0019] When a user logs in to the big model platform, the user's personal digital certificate chain and user public key certificate are verified. If the verification fails, the user login fails and the user cannot use the big model; otherwise, the user login is successful.
[0020] According to another aspect of the present invention, a system for encrypting sensitive data based on a large model is provided. The system runs on a large model platform, a third-party CA / KMC, and a trusted third-party blockchain evidence storage platform. The system includes:
[0021] The training sample input module is used to create a session on the user side and input training samples to the big model platform after the user successfully logs in to the big model platform;
[0022] The sensitive data judgment module is used to determine whether the training sample input by the user contains sensitive data after the large model platform backend receives the training sample. If it does not contain sensitive data, the model calculation is performed normally and the result is returned to the user;
[0023] The encryption sensitive data module is used to call the interface provided by the third-party KMC to obtain the master key if it contains sensitive data. The master key and the encryption factor are combined as the encryption factor to generate an SM4 symmetric key to encrypt and store the sensitive data; the third-party trusted blockchain platform interface is called to store the user's sensitive data and operation logs on the chain.
[0024] Optionally, the system further comprises:
[0025] The module for applying for a personal digital certificate is used when a user sends user information and registration information to a trusted third-party CA organization to apply for a personal digital certificate;
[0026] The registration failure return module is used for a third-party CA organization to review the user information. If the review fails, a registration failure is returned to the user terminal.
[0027] Optionally, the system further comprises:
[0028] The personal certificate issuance module is used to issue the user's personal digital certificate if the review is successful and return the user's personal digital certificate to the user;
[0029] The user public key publishing module is used on the user side and written into the hardware UKey, and the user public key is published to LDAP and synchronized to the large model platform.
[0030] Optionally, the system further comprises:
[0031] The certificate verification module is used to verify the user's personal digital certificate chain and user public key certificate when the user inserts the hardware Ukey and logs into the large model platform;
[0032] The user public key certificate storage module is used to store the user public key certificate in the local background database after the large model platform receives the user public key certificate.
[0033] Optionally, the system further comprises:
[0034] The personal digital certificate link verification module is used to verify the user's personal digital certificate chain and user public key certificate after the user logs in to the big model platform. If the verification fails, the user login fails and the user cannot use the big model; otherwise, the user login is successful.
[0035] Therefore, in order to address the security risks of user identity authentication in large-scale model usage scenarios, the difficulty in tracing abnormal operations, and the risk of data leakage of sensitive data, trusted third-party organizations (CA, blockchain platform) and cryptographic technology have been introduced, and targeted solutions have been proposed, which can improve the security, reliability and controllability of large-scale model applications from the outside. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:
[0037] Figure 1 This is a flow chart of a method for encrypting sensitive data based on a large model according to this embodiment;
[0038] Figure 2 This is an architectural diagram of encrypting sensitive data based on a large model as described in this embodiment;
[0039] Figure 3 This is a schematic diagram of a system for encrypting sensitive data based on a large model as described in this embodiment. DETAILED DESCRIPTION
[0040] Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings. However, the present invention may be embodied in many different forms and is not limited to the embodiments described herein. These embodiments are provided to provide a thorough and complete disclosure of the present invention and to fully convey the scope of the present invention to those skilled in the art. The terminology used in the exemplary embodiments shown in the accompanying drawings is not intended to limit the present invention. In the accompanying drawings, identical elements are denoted by the same reference numerals.
[0041] Unless otherwise specified, the terms used herein (including technical terms) have the meanings commonly understood by those skilled in the art. In addition, it is understood that terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal meanings.
[0042] According to a first aspect of the present invention, a method 100 for encrypting sensitive data based on a large model is provided, wherein the method is run on a large model platform, a third-party CA / KMC, and a trusted third-party blockchain evidence storage platform. Figure 1 As shown, the method 100 includes:
[0043] S101: After the user successfully logs in to the big model platform, the user creates a session and inputs training samples to the big model platform;
[0044] S102: After receiving the training sample, the large model platform backend determines whether the training sample input by the user contains sensitive data. If not, the model calculation is performed normally and the result is returned to the user.
[0045] S103: If sensitive data is contained, the large model calls the interface provided by the third-party KMC to obtain the master key, combines the user's certificate serial number as the encryption factor, converts the master key and the encryption factor to generate an SM4 symmetric key, and encrypts and stores the sensitive data; calls the third-party trusted blockchain platform interface to store the user's sensitive data and operation logs on the chain.
[0046] Specifically, this implementation includes three main parts: a large model platform, a third-party CA / KMC, and a trusted third-party blockchain evidence storage platform. Figure 2 As shown, the process for users to obtain large model services is as follows:
[0047] 1) The user submits registration information to a trusted third-party CA organization and applies for a personal digital certificate;
[0048] 2) The third-party CA organization reviews the user information. If the review fails, the registration fails. Otherwise, if the review succeeds, the user certificate is returned to the user and written into the hardware UKey. At the same time, the user public key is published to LDAP and synchronized to the large model platform.
[0049] 3) After receiving the user's public key certificate, the large model platform stores it in the local backend database;
[0050] 4) The user inserts the Ukey and logs into the large model platform;
[0051] 5) The platform verifies the certificate chain and the user's public key certificate. If the verification fails, the user login fails and the user cannot use the large model; otherwise, the user login is successful;
[0052] 6) The user creates a session and inputs training samples into the large model platform;
[0053] 7) The platform backend determines whether the training sample input by the user contains sensitive data. If not, the model calculation is performed normally and the result is returned to the user. If it contains sensitive data, the platform proceeds to step 8).
[0054] 8) The platform calls the interface provided by the third-party KMC to obtain a master key, and combines it with the user's certificate serial number as an encryption factor. The two are converted to generate an SM4 symmetric key to encrypt and store sensitive data; at the same time, the third-party trusted blockchain platform interface is called to store the user's sensitive data, operation logs, etc. on the chain to ensure traceability in the future.
[0055] 9) The platform returns the results to the user.
[0056] In this method, users log in using a national secret certificate, and identity authentication is based on verification of the user's public key certificate. A sensitive information feature library is constructed, and user questions containing sensitive data are stored on-chain. If sensitive data is identified in the training model's sample set, it is automatically encrypted and stored using the SM4 national secret algorithm. The encryption key is provided by a trusted third party, the KMC. This key is generated by mixing the encryption factor and the key provided by the KMC center to ensure that the keys of different users are unique.
[0057] The username and password login method is not only insecure but also carries the risk of identity abuse. To access services through the Big Model API, users must obtain a certificate from a trusted third-party CA, upload their public key to the Big Model system, and then log in using a national secret certificate for authentication.
[0058] In order to reduce the risk of data poisoning, it is necessary to screen the questions asked by users and identify the sensitive data in the questions. If a match is found in the sensitive data feature library, the consultation question needs to be stored on the chain so that the risk control model can be combined to track such users and trace their behavior and problems.
[0059] The large model platform gathers a large amount of sensitive personal information, and the training samples may also contain sensitive content such as ID numbers and commercial data. For this type of data, data encryption storage is required to avoid the leakage of sensitive data. To ensure one user and one key, encryption adopts the national secret algorithm SM4. The key is a mixture of the encryption factor representing the user's unique identity (such as the certificate serial number) and the key provided by the third-party KMC, and is updated regularly.
[0060] Optionally, before the user successfully logs in to the large model platform, it includes:
[0061] When a user sends user information and registration information to a trusted third-party CA organization to apply for a personal digital certificate;
[0062] The third-party CA organization reviews the user information. If the review fails, a registration failure is returned to the user terminal.
[0063] Optionally, before the user successfully logs in to the large model platform, it includes:
[0064] If the review is successful, the user's personal digital certificate will be issued and returned to the user;
[0065] The user end writes the hardware UKey, publishes the user public key to LDAP, and synchronizes it to the large model platform.
[0066] Optionally, before the user successfully logs in to the large model platform, it also includes:
[0067] When the user inserts the hardware Ukey and logs into the large model platform, the user's personal digital certificate chain and user public key certificate are verified;
[0068] After the large model platform receives the user's public key certificate, it stores the user's public key certificate in the local background database.
[0069] Optionally, before the user successfully logs in to the large model platform, it also includes:
[0070] When a user logs in to the big model platform, the user's personal digital certificate chain and user public key certificate are verified. If the verification fails, the user login fails and the user cannot use the big model; otherwise, the user login is successful.
[0071] Therefore, in order to address the security risks of user identity authentication in large-scale model usage scenarios, the difficulty in tracing abnormal operations, and the risk of data leakage of sensitive data, trusted third-party organizations (CA, blockchain platform) and cryptographic technology have been introduced, and targeted solutions have been proposed, which can improve the security, reliability and controllability of large-scale model applications from the outside.
[0072] According to another aspect of the present invention, a system 300 for encrypting sensitive data based on a large model is provided. The system runs on a large model platform, a third-party CA / KMC, and a trusted third-party blockchain evidence storage platform. Figure 3 As shown, the system 300 includes:
[0073] Input training sample module 310, which is used for creating a session on the user side and inputting training samples to the big model platform after the user successfully logs in to the big model platform;
[0074] Sensitive data determination module 320 is used for determining whether the training sample input by the user contains sensitive data after the large model platform backend receives the training sample. If not, the model calculation is performed normally and the result is returned to the user;
[0075] The encryption sensitive data module 330 is used to call the interface provided by the third-party KMC to obtain the master key if it contains sensitive data. It combines the user's certificate serial number as the encryption factor, converts the master key and the encryption factor to generate an SM4 symmetric key, and encrypts and stores the sensitive data; calls the third-party trusted blockchain platform interface to store the user's sensitive data and operation logs on the chain.
[0076] Optionally, the system further comprises:
[0077] The module for applying for a personal digital certificate is used when a user sends user information and registration information to a trusted third-party CA organization to apply for a personal digital certificate;
[0078] The registration failure return module is used for a third-party CA organization to review the user information. If the review fails, a registration failure is returned to the user terminal.
[0079] Optionally, the system further comprises:
[0080] The personal certificate issuance module is used to issue the user's personal digital certificate if the review is successful and return the user's personal digital certificate to the user;
[0081] The user public key publishing module is used on the user side and written into the hardware UKey, and the user public key is published to LDAP and synchronized to the large model platform.
[0082] Optionally, the system further comprises:
[0083] The certificate verification module is used to verify the user's personal digital certificate chain and user public key certificate when the user inserts the hardware Ukey and logs into the large model platform;
[0084] The user public key certificate storage module is used to store the user public key certificate in the local background database after the large model platform receives the user public key certificate.
[0085] Optionally, the system further comprises:
[0086] The personal digital certificate link verification module is used to verify the user's personal digital certificate chain and user public key certificate after the user logs in to the big model platform. If the verification fails, the user login fails and the user cannot use the big model; otherwise, the user login is successful.
[0087] A system 300 for encrypting sensitive data based on a large model according to an embodiment of the present invention corresponds to a method 100 for encrypting sensitive data based on a large model according to another embodiment of the present invention, and will not be described in detail here.
[0088] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiment of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal translation scripting language JavaScript, etc.
[0089] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0090] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0091] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0092] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0093] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A method for encrypting sensitive data based on a large model, characterized in that: The method is run on a large model platform, a third-party CA organization, a third-party KMC, and a trusted third-party blockchain evidence storage platform, and includes: The user obtains a personal digital certificate through a trusted third-party CA organization, which is used for identity authentication when logging into the large model platform; After the user successfully logs in to the big model platform, the user creates a session and inputs training samples to the big model platform; After receiving the training sample, the large model platform backend determines whether the training sample input by the user contains sensitive data. If it does not contain sensitive data, the model calculation is performed normally and the result is returned to the user. If sensitive data is included, the large model calls the interface provided by the third-party KMC to obtain the master key, combines the user's certificate serial number as the encryption factor, converts the master key and encryption factor to generate an SM4 symmetric key, encrypts and stores the sensitive data, and calls the third-party trusted blockchain platform interface to store the user's sensitive data and operation logs on the chain.
2. The method according to claim 1, characterized in that Before a user successfully logs into the large model platform, it includes: The user sends user information and registration information to a trusted third-party CA organization to apply for a personal digital certificate; The third-party CA organization reviews the user information. If the review fails, a registration failure is returned to the user terminal.
3. The method according to claim 2, characterized in that Before a user successfully logs into the large model platform, it includes: If the review is successful, the user's personal digital certificate will be issued and returned to the user; The user end writes the personal digital certificate into the hardware UKey, publishes the user public key to LDAP, and synchronizes it to the large model platform.
4. The method according to claim 3, characterized in that Before the user successfully logs in to the large model platform, it also includes: When the user inserts the hardware Ukey and logs into the large model platform, the user's personal digital certificate chain and user public key certificate are verified; After the large model platform receives the user's public key certificate, it stores the user's public key certificate in the local background database.
5. The method according to claim 4, characterized in that Before the user successfully logs in to the large model platform, it also includes: When a user logs in to the big model platform, the user's personal digital certificate chain and user public key certificate are verified. If the verification fails, the user login fails and the user cannot use the big model; otherwise, the user login is successful.
6. A system for encrypting sensitive data based on a large model, characterized in that: The system runs on a large model platform, a third-party CA organization, a third-party KMC, and a trusted third-party blockchain evidence storage platform. The system includes: The training sample input module is used to create a session on the user side and input training samples to the big model platform after the user successfully logs in to the big model platform; Before a user successfully logs into the Big Model Platform, the user obtains a personal digital certificate from a trusted third-party CA organization. The personal digital certificate is used for identity authentication when the user logs into the Big Model Platform. The sensitive data judgment module is used to determine whether the training sample input by the user contains sensitive data after the large model platform backend receives the training sample. If it does not contain sensitive data, the model calculation is performed normally and the result is returned to the user; The encryption sensitive data module is used to call the interface provided by the third-party KMC to obtain the master key if it contains sensitive data. The master key and the encryption factor are combined as the encryption factor to generate an SM4 symmetric key to encrypt and store the sensitive data; the third-party trusted blockchain platform interface is called to store the user's sensitive data and operation logs on the chain.
7. The system according to claim 6, characterized in that The system further comprises: The module for applying for personal digital certificates is used by users to send user information and registration information to a trusted third-party CA organization to apply for personal digital certificates; The registration failure return module is used for a third-party CA organization to review the user information. If the review fails, a registration failure is returned to the user terminal.
8. The system according to claim 7, characterized in that The system further comprises: The personal certificate issuance module is used to issue the user's personal digital certificate if the review is successful and return the user's personal digital certificate to the user; The user public key publishing module is used by the user to write the personal digital certificate into the hardware UKey, publish the user public key to LDAP, and synchronize it to the large model platform.
9. The system according to claim 8, characterized in that The system further comprises: The certificate verification module is used to verify the user's personal digital certificate chain and user public key certificate when the user inserts the hardware Ukey and logs into the large model platform; The user public key certificate storage module is used to store the user public key certificate in the local background database after the large model platform receives the user public key certificate.
10. The system according to claim 9, characterized in that The system further comprises: The module for verifying the personal digital certificate chain is used to verify the user's personal digital certificate chain and user public key certificate after the user logs in to the big model platform. If the verification fails, the user login fails and the user cannot use the big model; otherwise, the user login is successful.
Citation Information
Patent Citations
Method and device for realizing community sensitive data protection based on block chain technology
CN115694932A
Federal large model aggregation operation encryption method and device
CN117235763A