A method and system for secure and reliable use of large models based on confidential computing

By performing data desensitization and desensitization processing in the confidential computing environment of the desensitization service provider, combined with the confidential computing encrypted storage technology, the problem of data privacy leakage and security risks in the use of large models is solved, and the entire life of user data is realized. Cycle security and user experience convenience.

CN118350017BActive Publication Date: 2024-10-01NANHU LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410786293.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-10-01
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

There are data privacy leaks and security risks during the use of large models. Existing technologies such as centralized desensitization services cannot effectively solve the problem of data leakage to third parties, and the demand for high-performance hardware deployment on the client side is high and the popularity is not high.

Method used

Adopting a method based on confidential computing, by starting the service in the confidential computing environment of the desensitization server, establishing a secure connection between the client and the large model, performing data desensitization processing, and using confidential computing encapsulated storage technology to protect user authorization information. Ensure that data is desensitized and desensitized in a confidential computing environment to prevent third parties from obtaining clear text data.

Benefits of technology

It achieves the security of user data throughout the entire life cycle, prevents data leakage to third parties, and ensures the security of user authorization information. The user experience is like directly interacting with the large model, without changing the large model usage process, and reducing hardware requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118350017B_ABST
    Figure CN118350017B_ABST
Patent Text Reader

Abstract

This solution discloses a method and system for secure and reliable use of large models based on confidential computing, including: a desensitizing service provider starts a service in a confidential computing environment; a secure connection is established between the confidential computing environment, the user end, and the large model; the service receives the original data uploaded by the user end in the confidential computing environment and desensitizes the original data to obtain desensitized data; the service sends the desensitized data to the large model based on the secure connection between the confidential computing environment and the large model. This solution uses a third party to desensitize the use of large models, and proposes a targeted solution to the problem of third-party leakage. It applies confidential computing to large model usage scenarios, uses third-party services to perform desensitization, and deploys the main services of the third-party service in the confidential computing environment. Desensitization and resensitization of user data in the confidential computing environment are completed. Through this solution, the security of user data throughout its life cycle is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of large model authorized information security computing technology, and in particular, relates to a large model secure and trusted use method and system based on confidential computing. Background Art

[0002] At present, big models have been widely used in various scenarios, but the use of big models has a big privacy issue. When using big models, users will directly send some text containing user personal information and sensitive information to the big model for inference or training. This information will be transmitted to the server of the model provider, which may cause certain privacy leakage risks.

[0003] In order to overcome the data privacy issues when using large models, there are two initial approaches:

[0004] 1. De-anonymization services are deployed locally on user terminals, such as the Hide and Seek (HaS) technology for large model privacy protection disclosed by Tencent Security Xuanwu Lab;

[0005] 2. Migrate the large model to the user's local location.

[0006] Of the above two methods, the first one has a relatively high implementation cost, requires local deployment of services and hardware adaptation, and is not convenient to use; the second one also requires users to deploy high-performance hardware devices to support the operation of large models, but ordinary customers do not have such conditions, and the application is not widely used.

[0007] Centralized desensitization services can solve the data privacy issues of large models. Users uniformly send large model inference information to the centralized desensitization service provider. The server anonymizes or filters sensitive information, and then sends it to the large model for inference / training. The large model inference results are then returned to the user. No deployment is required on the user side, and there are no requirements for the hardware on the user side. However, the technology using centralized desensitization services does not realize the problem of data leakage to third parties. That is, based on this technology, the large model does obtain desensitized data, but the original data will still be submitted to the central anonymization service, that is, the central anonymization service will still be exposed to sensitive information, and this method requires that the relevant large model use authorization information (such as the username, password or token used by the large model) is also transmitted to the large model through the central anonymization service. The central anonymization service can not only obtain sensitive information, but also obtain the user's large model use authorization information, and there are still security risks. Summary of the invention

[0008] The purpose of the present invention is to solve the above problems and to construct a method for secure and reliable use of a large model based on confidential computing, which method includes:

[0009] The desensitization service provider starts the service in a confidential computing environment;

[0010] The confidential computing environment establishes a secure connection with the user end;

[0011] The confidential computing environment has a secure connection with the big model;

[0012] The service receives original data uploaded by the user in a confidential computing environment and performs desensitization processing on the original data to obtain desensitized data;

[0013] Based on the secure connection between the confidential computing environment and the big model, the service sends the desensitized data to the big model for training, analysis, and reasoning.

[0014] In the above-mentioned large-model secure and trusted usage method based on confidential computing, after the user terminal performs trustworthy verification on the confidential computing environment and verifies that it is trustworthy, the confidential computing environment establishes a secure connection with the user terminal.

[0015] In the above-mentioned large model secure and trusted use method based on confidential computing, the method for the user end to perform trusted verification on the confidential computing environment includes:

[0016] The service starts the confidential computing environment service and calls the chip-level confidential computing API to generate a chip-level report;

[0017] The service generates a public-private key pair PS in a confidential computing environment, and generates a self-signed certificate signed by the private key S therein;

[0018] Send the chip-level report together with the self-signed certificate to the user end;

[0019] The user end uses the public key P to verify the self-signed certificate and the validity of the chip-level report through the confidential computing certificate chain, and verifies the validity of the service through the service-related information (for example, the application hash value) in the chip-level report. If it is valid and the self-signed certificate verification is passed, it is verified as credible, otherwise, it is verified as untrustworthy.

[0020] In the above-mentioned large-model secure and trusted usage method based on confidential computing, after verification, the user terminal establishes a remote secure connection with the confidential computing environment based on the self-signed certificate and the chip-level report information request.

[0021] In the above-mentioned method for secure and trusted use of large models based on confidential computing, the service running in a confidential computing environment provides a user web service interface including a dialog box between the user and the large model to the user terminal to receive the original data, and desensitizes the original data after receiving the original data.

[0022] In the above-mentioned large model secure and trusted use method based on confidential computing, the service establishes a mapping table between sensitive data and its replacement data in the confidential computing environment during the desensitization process;

[0023] The method also includes that the service receives the inference results returned by the large model based on the secure connection between the confidential computing environment and the large model, and restores the relevant desensitized data in the inference results to sensitive data based on the mapping table and returns it to the user end through the secure connection.

[0024] In the above-mentioned method for secure and trusted use of a large model based on confidential computing, the method further includes: a service running in a confidential computing environment receives authorization information required by a user to use the large model uploaded by the user through a secure connection, and seals the authorization information based on a confidential computing trusted sealing technology;

[0025] After the service processes the original data to obtain desensitized data, it reads the authorization information corresponding to the current user based on the trusted sealing technology, and sends the authorization information to the big model based on the secure connection between the confidential computing environment and the big model to trigger the user to use the big model. Taking the authorization information as an example, the sealed data can be a user name-token correspondence table. When used, the user token is extracted based on the user identity.

[0026] A large model secure and trusted use system based on confidential computing, including a user terminal, a desensitizing service provider and a large model provider, wherein the desensitizing service provider includes a confidential computing environment, wherein the confidential computing environment establishes a secure connection with the user terminal and the large model provider, wherein at least the desensitizing service, the interaction service with the large model, and the confidential computing service of the desensitizing service provider are started and run in the confidential computing environment to perform desensitizing processing on the original data uploaded by the user through the secure connection and then provide the data to the large model provider through the secure connection.

[0027] In the above-mentioned large model secure and trusted use system based on confidential computing, the desensitizing service provider also includes a user web service, which is started and runs in a confidential computing environment to provide a user web service interface including a dialog box between the user and the large model to the user end for receiving the original data;

[0028] During the desensitizing process performed by the desensitizing service, a mapping table between sensitive data and its replacement data is established in the confidential computing environment; and the desensitizing service also includes a resensitization service, which is started and runs in the confidential computing environment, and is used to restore the relevant desensitized data in the inference results returned by the large model into sensitive data based on the mapping table, and return it to the user end through a secure connection.

[0029] Furthermore, during the desensitization process,

[0030] In the above-mentioned large model secure and trusted use system based on confidential computing, the confidential computing service is also used to receive the authorization information required by the user to use the large model uploaded by the user through a secure connection, and seal the authorization information based on the confidential computing trusted sealing technology;

[0031] When a user needs to use the big model, the authorization information corresponding to the current user is read based on the trusted sealing technology, and the authorization information is sent to the big model through the big model interaction service based on the secure connection between the confidential computing environment and the big model to trigger the user's use of the big model.

[0032] The advantages of the present invention are:

[0033] This solution is aware of the third-party leakage problem of the central anonymization service and proposes a targeted solution. It applies confidential computing to large model usage scenarios, uses third-party services for desensitization, and deploys the main services of third-party services in a confidential computing environment. Desensitization and resensitization of user data are completed in the confidential computing environment. Through this solution, the full life cycle security of user data (including user reasoning data, reasoning result data, user large model usage token information, etc.) is achieved, and it cannot be obtained by any party including third-party services and large models.

[0034] The token used by the big model user can be trusted and sealed in a third-party confidential computing desensitization service provider based on the process of this solution, and cannot be obtained. The third-party confidential computing desensitization service uses this token to interact with the big model in a confidential computing environment, and at the same time cannot see any plaintext data, which can ensure the security of the token. Users do not need to send token-related information every time they interact with the big model;

[0035] This solution can protect sensitive information without any changes to the big model or the process of using the big model, and is highly feasible.

[0036] After the user registers at the third-party service, the user experience is just like interacting with the big model directly, with no changes in the process, making it very convenient to use. The user's registration at the desensitizing service provider can be completed in the confidential computing environment when connecting for the first time. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is a system architecture and implementation flow chart for secure and trusted use of a large model based on confidential computing in Embodiment 1 of the present invention;

[0038] Figure 2 A flowchart of establishing a secure connection between a confidential user terminal and a confidential computing environment in Embodiment 1 of the present invention;

[0039] Figure 3This is the system architecture and implementation flow chart for the secure and trusted use of a large model based on confidential computing in Example 3 of the present invention. DETAILED DESCRIPTION

[0040] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0041] This solution provides a method and system for secure and reliable use of large models based on confidential computing, which consists of three parts: the user end, the desensitizing service provider and the large model party. The desensitizing service provider is a third-party centralized platform, and related services are deployed in a confidential computing environment.

[0042] Embodiment 1

[0043] like Figure 1 As shown in the figure, the implementation process of this solution is as follows:

[0044] 1. The desensitization service provider starts services in the confidential computing environment. These services started and run in confidential computing include user web services, desensitization services, resensitization services, services for interacting with large models, and confidential computing services. Confidential computing refers to confidential computing / privacy computing based on the CPU level. Encrypted data is only decrypted and supported in the high-trust environment (encrypted memory) based on the CPU level TEE. After the calculation is completed, the relevant data in the high-trust environment is destroyed, and the decrypted plaintext data will not be leaked in the entire process. Data-based computing runs in a high-trust environment (encrypted memory) based on the CPU level TEE. No one (including the highest authority of the host or the owner of the system Kernel kernel level control) can invade the CPU-level trusted execution environment to tamper with the calculation.

[0045] 2. If Figure 2 As shown, in the confidential computing environment of the desensitizing service provider, the confidential computing service generates a public-private key pair PS, and uses the private key S therein to issue and generate a self-signed certificate, which contains a series of certificate information, such as the identity of the holder, the validity period of the certificate, etc.

[0046] 3. The user terminal and the confidential computing environment start the confidential computing remote authentication process. The confidential computing service calls the chip-level confidential computing API to generate a chip-level report. The report contains the unique identifier, configuration, version information, service startup information, and application service unique identifier (such as application service hash value) of the confidential computing environment.

[0047] 4. The confidential computing service sends the chip-level report and the self-signed certificate to the user.

[0048] 5. The user end verifies the self-signed certificate using the public key P obtained in advance or provided by the self-signed certificate, verifies the validity of the chip-level report through the confidential computing certificate chain, and extracts the service-related information (e.g., application hash value) in the chip-level report to verify whether the application is valid (e.g., whether it is in the authorized list, etc.). Note: The service provider cannot forge the chip-level report and the application information in it, so the user can trust the content of the chip-level report - even if the service provider is not trustworthy.

[0049] 6. The client establishes a remote secure connection with the confidential computing environment based on the self-signed certificate and chip-level report of the desensitizing service provider. The client is directly connected to the service in the remote confidential computing environment, and the non-confidential computing environment of the desensitizing service provider (including the highest authority of the desensitizing service provider host) cannot view this secure connection and any plaintext information in the confidential computing environment.

[0050] 7. Based on this secure connection, the user sends the authorization information required for the user to use the large model, such as the large model user token or user key, to the confidential computing environment of the desensitizing service provider. The confidential computing service in the confidential computing environment seals the authorization information in the confidential computing hard disk based on the confidential computing trusted sealing technology. The sealed data can be a user name-token correspondence table. If the desensitizing service provider only connects to one large model party, the correspondence table only needs to record the user name-token correspondence; if the desensitizing service connects to more than one large model party, the correspondence table needs to record the user-token-large model correspondence. The data sealed by the confidential computing trustworthiness cannot be obtained by the highest authority of the desensitizing service provider host.

[0051] 8. The user logs in to the user web service interface of the desensitizing service provider. Because the user web service of the desensitizing service provider runs in a confidential computing environment, all content sent by the user through this interface is directly sent to the confidential computing environment of the desensitizing service provider, and the desensitizing service provider itself cannot view any information sent by the user.

[0052] 9. The user web service interface includes a dialog box between the user and the large model. The user sends the original data to the desensitizing service provider based on the user web service interface.

[0053] 10. The services run by the desensitization service provider in the confidential computing environment include desensitization services. At this time, the user's relevant sensitive information is extracted and desensitized, and a sensitive data and alternative data mapping table is generated. For example, the original data uploaded by the user is "I like computers, my name is Wang, my phone number is 138*******, I am 32 years old this year, I am interested in traveling, please help me write a self-introduction for finding a job", and the desensitization service will desensitize it to "I like computers, my name is Zhang, my phone number is 12322233344, I am in my thirties this year, I am interested in traveling, please help me write a self-introduction for finding a job", in this case, the mapping table is Wang <-> Zhang, 138******* <-> 12322233344, 32 years old <-> over 30 years old. All the private information mentioned by the user in the process of chatting with the big model, such as the name "Wang", will be uniformly replaced with "Zhang". How to extract sensitive information and how to process it are not within the scope of this patent.

[0054] 11. The desensitized data can be displayed to the user based on the user web service, and the transmission channel is securely connected based on step 6. After the desensitized data is displayed to the user, the user may be required to click to confirm before proceeding to the next step, or the desensitized data may be displayed to the user without user confirmation and directly proceed to the next step. This process is selected by those skilled in the art according to the circumstances.

[0055] 12. The confidential computing service reads the user token corresponding to the user based on trusted sealing technology, and sends the desensitized reasoning data to the big model for reasoning through the interaction service with the big model.

[0056] 13. The large model process remains unchanged, and large model inference is performed, and the results are returned to the confidential computing environment of the desensitizing service provider.

[0057] 14. The services run by the desensitizing service provider in the confidential computing environment include data desensitization services. Based on the data correspondence table established in step 10, the desensitized data related to the inference results is restored to sensitive data. For example, in the above example, the inference result of the large model is "Hello, my name is Zhang, my phone number is 12322233344, and I am in my thirties. I have a strong interest in computers, which is not only my career choice, but also a great pleasure in my life. I have loved exploring the mysteries of science and technology since I was a child. As time goes by, this interest has gradually turned into a love for computer science. I am a proactive and eager to learn person. In addition to my passion for computers, I am also a person who loves traveling. I think traveling can not only broaden my horizons, but also bring new inspiration and creativity." The result after resensitization is the result data resensitized as: "Hello, my name is Wang, my phone number is 138*******, and I am thirty-two years old. I have a strong interest in computers, which is not only my career choice, but also a great pleasure in my life. I have loved exploring the mysteries of science and technology since I was a child. As time goes by, this interest has gradually turned into a love for computer science. I am a proactive and eager to learn person. In addition to my passion for computers, I am also a person who loves traveling. I think traveling can not only broaden my horizons, but also bring new inspiration and creativity."

[0058] Preferably, the replacement information for desensitizing the same user is set in the same mapping table, and the replacement information with higher uniqueness is used as the primary key of the mapping table to determine the mapping table, and then the determined unique mapping table is used to determine the mapping relationship of all replacement information. For example, the above-mentioned Wang <-> Zhang, 138******* <-> 12322233344, thirty-two years old <-> over thirty years old, the three replacement information are in the same mapping table, and all users aged 30-40 will be replaced with "over thirty years old". This replacement information has lower uniqueness, while the name and phone number are replacement information with higher uniqueness. The two replacement information can be used at the same time to uniquely determine the mapping table, so as to map accurate information for the user and perform desensitization.

[0059] 15. The desensitizing service provider’s confidential computing service sends the resulting desensitized data to the user based on the secure channel established in step 6.

[0060] Based on the above process, during the large model inference process, the user's original data is sent to the desensitizing service provider. The desensitizing service provider desensitizes the user's original data in a confidential computing environment, and triggers the use of the large model based on the user's large model authorization information (user key or user token). Finally, the inference result returned by the large model is returned to the user. The large model and the desensitizing service also communicate through a secure connection to ensure the security of the authorization information, and the secure connection is established in advance. The specific establishment method is not repeated here.

[0061] During the entire process, the desensitizing service provider cannot access any sensitive plaintext information of the user, and the user's sensitive information (including the user's large model authorization information) cannot be obtained by any other party, including the third-party desensitizing service provider, which can effectively avoid the security risk of service data being leaked to the third-party central anonymization service.

[0062] Embodiment 2

[0063] This embodiment is similar to the first embodiment, except that, in this embodiment, the inference result returned by the large model is directly returned to the user end, rather than being returned to the user end after being resensitized.

[0064] Embodiment 3

[0065] This embodiment is similar to the first embodiment, except that the above embodiment is mainly applied to the scenario where the user uses a large model for reasoning. In this embodiment, the above process can also be used in the scenario of large model training, such as Figure 3 As shown, for large model training scenarios, there is no need for a desensitization service, so there is no need for a sensitive data and alternative data mapping table, and there is no need to seal the username-token correspondence table.

[0066] The specific embodiments described in this embodiment are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the attached claims.

Claims

1. A method for secure and reliable use of a large model based on confidential computing, characterized in that: The method includes: The desensitization service provider starts the service in a confidential computing environment; The confidential computing environment establishes a secure connection with the user end based on the self-signed certificate of the desensitized service provider and the chip-level report The confidential computing environment has a secure connection with the big model; The service running in the confidential computing environment receives the authorization information required by the user to use the large model uploaded by the user through a secure connection, and seals the authorization information based on the confidential computing trusted sealing technology; The service receives original data uploaded by the user in a confidential computing environment, performs a desensitization process on the sensitive information in the original data to obtain desensitized data, and during the desensitization process, establishes a mapping table between the sensitive data and its replacement data in the confidential computing environment; After the service processes the original data to obtain desensitized data, it reads the authorization information corresponding to the current user based on the trusted sealing technology, and sends the desensitized data and authorization information to the big model based on the secure connection between the confidential computing environment and the big model to trigger the user to use the big model; The inference result returned by the large model is received, and based on the mapping table, the relevant desensitized data in the inference result is restored to sensitive data and then returned to the user end through a secure connection.

2. The method for secure and reliable use of a large model based on confidential computing according to claim 1 is characterized in that: After the user terminal performs trustworthy verification on the confidential computing environment and verifies that it is trustworthy, the confidential computing environment establishes a secure connection with the user terminal.

3. The method for secure and reliable use of a large model based on confidential computing according to claim 2 is characterized in that: The method for the user end to perform trustworthy verification on the confidential computing environment includes: The service starts the confidential computing environment service and calls the chip-level confidential computing API to generate a chip-level report; The service generates a public-private key pair PS in a confidential computing environment, and generates a self-signed certificate signed by the private key S therein; Sending the chip-level report together with the self-signed certificate to the user end; The user end uses the public key P to verify the self-signed certificate and the validity of the chip-level report through the confidential computing certificate chain, and verifies the validity of the service through the service-related information in the chip-level report.

4. The method for secure and reliable use of a large model based on confidential computing according to claim 3 is characterized in that: After verification, the user terminal establishes a remote secure connection with the confidential computing environment based on the self-signed certificate and the chip-level report information request.

5. The method for secure and reliable use of a large model based on confidential computing according to claim 1 is characterized in that: The service running in the confidential computing environment provides a user web service interface including a dialog box between the user and the large model to the user end to receive the original data, and desensitizes the original data after receiving the original data.

6. A large-model secure and trusted use system based on confidential computing, characterized in that: It includes a user end, a desensitizing service provider and a large model provider, and the desensitizing service provider includes a confidential computing environment for executing the method described in any one of claims 1-5.