Cloud reasoning method, device and system based on data protection, and storage medium
By creating user security domains and large-model service security domains on the cloud server, using controllable computing technology and strict data isolation and encryption transmission, the problem of user data privacy protection in large-model services is solved, and the security of cloud inference is realized and balance of performance.
Patent Information
- Application Number
- CN202510066016.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2045-01-16
AI Technical Summary
In big model services, how to perform cloud inference on the premise of protecting user data privacy solves the contradiction between the big model service providers need data to train models and users are worried about privacy leakage.
By creating user security domains and large-model service security domains on the cloud server, using controlled computing technology and strict data isolation and encryption transmission, user data and historical session data are placed in their respective security domains, and the model-side security domain keys are used to utilize controlled computing technology and strict data isolation and encryption transmission. Generates each user key to achieve isolation between user data and model data.
While meeting the model inference needs of big model service providers, it protects user privacy, takes into account system performance and security, and prevents data leakage and unauthorized access.
Smart Images

Figure CN119520164A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software engineering technology, and in particular to a cloud-based reasoning method, device, storage medium and system based on data protection. Background Art
[0002] With the advent of the era of big models, human life has become extremely convenient, but it has also exacerbated the dilemma of data privacy and model privacy protection. During the transmission of user data, if encryption measures are not adopted, it is easy to be attacked by a man-in-the-middle attack, resulting in sensitive data leakage. At the same time, user data is stored in the cloud, which may lead to data leakage or abuse due to reasons such as internal employees of the cloud service provider, third-party access rights or configuration errors. Big model services usually run in a multi-tenant environment. If the isolation mechanism is not perfect, it is also easy to cause data leakage. In big model services, lax access control of historical session data and current requests may also lead to user privacy leakage. In the process of reasoning, if the big model is not handled properly, sensitive data entered by the user may be leaked. Therefore, in an industrial environment, how to reason models in the cloud while protecting user data privacy has become a technical focus to be solved.
[0003] The prior art discloses a method for controllable data use, which defines a new paradigm of privacy computing, that is, the storage / computing nodes of the data user are divided into security domains controlled by the data provider, and the private data can only be processed and handled in the security domain. The security domain is a logical concept, which refers to the storage and computing units protected by the corresponding keys and encryption algorithms. This method for controllable data use can ensure that the private data of the data provider is visible to the data user, while preventing the data user from copying the data in various ways out of the corresponding security domain for secondary sales. In addition, the above-mentioned new paradigm of privacy computing is also non-invasive to the original business system, that is, it will not make any modifications or restrictions to the original business code.
[0004] The above-mentioned new paradigm of privacy computing has some advantages, but it cannot meet the model reasoning needs of large model service providers, and cannot solve the contradiction between large model service providers' need for data to train models and users' concerns about privacy leakage. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a cloud-based reasoning method, device, storage medium and system based on data protection, so as to solve the contradiction between the large model service provider's need for data to train the model and the user's concern about privacy leakage, while meeting the model reasoning needs of the large model service provider.
[0006] To achieve the above objectives, in a first aspect, an embodiment of the present invention provides a cloud-based reasoning method based on data protection, comprising:
[0007] Receive inference requests initiated by users;
[0008] According to the inference request, calling a user service process to access multiple user security domains to read user data and historical session data of the user;
[0009] Sending the user data and the historical session data of the user to the inference service process through the user service process;
[0010] Loading the inference model from the large model service security domain through the inference service process to infer the user data and the historical session data of the user to obtain an inference result;
[0011] Returning the inference result to the user through the inference service process and the user service process;
[0012] Among them, multiple user security domains and large model service security domains are all stored in the cloud service end, and the cloud service end provides the user service process and the reasoning service process.
[0013] As a preferred implementation of the present application, before receiving the inference request initiated by the user, the method further includes creating multiple user security domains, specifically:
[0014] The user end generates or imports a Chang key; the Chang key is used to encrypt the master key in LUKS, indicating the control right of the user's security domain; the Chang key includes a Chang public key and a Chang private key;
[0015] The cloud service generates a document key based on the current system environment information; the document key includes a document private key and a document public key, and the document private key is sealed in the TPM;
[0016] Use the public key to seal the private key;
[0017] Using the private key as a key file, multiple user security domains are created for multiple users.
[0018] As a preferred implementation of the present application, before receiving the reasoning request initiated by the user, the method further includes creating a large model service security domain, specifically:
[0019] Obtain multiple user keys, each user key includes a user private key and a user public key;
[0020] Based on multiple user private keys, the model service private key is calculated using an asymmetric key algorithm based on elliptic curves;
[0021] Calculate the model service party public key according to the model service private key;
[0022] A large model service security domain is created based on the model service private key and the model service public key.
[0023] As a specific implementation of this application, the computing model service private key and the model service public key are specifically:
[0024] If the number of users is n, the order of the elliptic curve is p, and the generator is G, then:
[0025] The private key of user i is , the public key is ;
[0026] The model service private key is calculated in the user service process: , the model service public key is , .
[0027] In a second aspect, an embodiment of the present invention further provides a cloud-based reasoning device based on data protection, comprising a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method of the first aspect. An embodiment of the invention of the application further provides a computer-readable storage medium, which stores a computer program, the computer program includes program instructions, and the program instructions, when executed by the processor, cause the processor to execute the method of the first aspect.
[0028] In a fourth aspect, an embodiment of the present invention provides a cloud-based reasoning system based on data protection, including a user end and a cloud service end, wherein the user end is used to initiate a reasoning request;
[0029] The cloud service end stores multiple user security domains and large model service security domains, and the cloud service end provides user service processes and reasoning service processes; the cloud service end is used to:
[0030] According to the inference request, calling a user service process to access multiple user security domains to read user data and historical session data of the user;
[0031] Sending the user data and the historical session data of the user to the inference service process through the user service process;
[0032] Loading the inference model from the large model service security domain through the inference service process to infer the user data and the historical session data of the user to obtain an inference result;
[0033] The reasoning result is returned to the user through the reasoning service process and the user service process.
[0034] By implementing the embodiments of the present invention, a security domain is established through controllable computing technology and strict data isolation and encrypted transmission are implemented. User data and historical session data are placed in their respective security domains. The security domain key of the model side is generated by each user key. The user data and model data are isolated through the user service process and the reasoning service process. While performing model reasoning, user privacy is protected. Compared with traditional methods, this method protects user privacy while meeting the model reasoning requirements of large model service parties, and takes into account both system performance and security. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the specific implementation of the present invention or the technical solution in the prior art, the drawings required for use in the specific implementation or the description of the prior art are briefly introduced below.
[0036] Figure 1 is a flow chart of a cloud-based reasoning method based on data protection provided by an embodiment of the present invention;
[0037] Figure 2 is another flow chart of a cloud-based reasoning method based on data protection provided by an embodiment of the present invention;
[0038] Figure 3 It is a structural diagram of a cloud-based reasoning device based on data protection provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0041] The relevant terms are explained as follows:
[0042] Security domain technology: Use controllable computing products as the underlying technology to ensure the security of data processing. By building different security domains, data classification and isolation are achieved to ensure the security of each user's data and model data.
[0043] Data isolation and access control: Implement strict access control on different types of data to ensure that only authorized users can access the corresponding data.
[0044] Balance between system performance and security: While meeting the model inference requirements of large model service providers, it also protects user privacy and takes into account both system performance and security.
[0045] The inventive concept of the present invention is to place each user's user data and historical session data, model parameters, and intermediate data in different security domains, respectively, to protect the user's privacy and provide an effective solution for cloud-based reasoning models in industrial environments.
[0046] Please refer to Figure 1 and Figure 2 , a cloud-based reasoning method based on data protection provided by an embodiment of the present invention includes:
[0047] S1, create multiple user security domains.
[0048] In the specific implementation, a security domain is created for each user, and each user's data file is stored in the user security domain. The process of creating each user security domain is as follows:
[0049] (1) The user generates or imports a Chang key, which is a pair of asymmetric keys (Chang public key and Chang private key) used to encrypt the master key in LUKS and represents the control of the security domain.
[0050] (2) The system generates a text key based on the current system environment information (hardware, firmware, operating system, etc.). The text key is a pair of asymmetric keys. The private key is sealed in the TPM, and the public key can be made public. The TPM will generate a quote for the text key, that is, the text key certificate, including the signature of the public key and the PCR value.
[0051] (3) Chang's private key is sealed with Wen's public key to facilitate the subsequent use of Chang's private key.
[0052] (4) Create a security domain using Chang’s private key as the key file.
[0053] S2, create a large model service security domain.
[0054] In specific implementation, step S2 includes:
[0055] Obtain multiple user keys, each user key includes a user private key and a user public key;
[0056] According to multiple user private keys, a model service private key is calculated using an asymmetric key algorithm based on an elliptic curve; the asymmetric key algorithm based on an elliptic curve includes but is not limited to Secp256k1, SM2, etc.;
[0057] Calculate the model service party public key according to the model service private key;
[0058] A large model service security domain is created based on the model service private key and the model service public key.
[0059] Among them, the computing model service private key and model service public key are specifically:
[0060] If the number of users is n, the order of the elliptic curve is p, and the generator is G, then:
[0061] The private key of user i is , the public key is ;
[0062] The model service private key is calculated in the user service process: , the public key is , .
[0063] S3, receives the inference request initiated by the user.
[0064] S4, based on the inference request, calls the user service process to access multiple user security domains to read the user data and the user's historical session data.
[0065] The user service process accesses multiple user security domains. Generally, after a process reads a security domain, it cannot write to other security domains or non-security domains. However, this user service process is a trusted process and is not subject to the read and write constraints of the security domain. The process reads the user data and the user's historical session data and sends it to the inference service process. When the model inference is completed, the user service process receives the inference result from the inference service process and presents it to the user and the corresponding user security domain.
[0066] S5, the inference service process receives the user data and the historical session data of the user sent by the user service process, loads the inference model from the large model service security domain for inference, and obtains the inference result.
[0067] S6, the reasoning service process sends the reasoning result to the user service process.
[0068] S7: The user service process returns the inference result to the corresponding user.
[0069] The cloud-based reasoning method based on data protection provided by the embodiment of the present invention is implemented, a security domain is established through controllable computing technology, and strict data isolation and encrypted transmission are implemented. User data and historical session data are placed in their respective security domains. The security domain key of the model side is generated by each user key, and the isolation of user data and model data is achieved through the user service process and the reasoning service process. While performing model reasoning, user privacy is protected. Compared with traditional methods, this method protects user privacy while meeting the model reasoning requirements of large model service parties, and takes into account both system performance and security.
[0070] It should be emphasized that the advantages of the present invention are as follows:
[0071] 1. User privacy protection: It protects user data and prevents man-in-the-middle attacks and data leaks caused by unencrypted data.
[0072] 2. Model privacy protection: It can protect model parameters from unauthorized access or leakage, ensuring the security of the model.
[0073] 3. User data separation: It can implement strict access control of data flow, optimize cache mechanism, debug log records, etc., to ensure that sensitive data entered by users is not leaked.
[0074] Based on the same inventive concept, an embodiment of the present invention provides a cloud-based reasoning system based on data protection, including a user end and a cloud service end.
[0075] Among them, the user side is used to initiate inference requests and cooperate with the cloud service side to create multiple user security domains.
[0076] In specific implementation, the process of creating multiple user security domains is as follows:
[0077] The user end generates or imports a Chang key; the Chang key is used to encrypt the master key in LUKS, indicating the control right of the user's security domain; the Chang key includes a Chang public key and a Chang private key;
[0078] The cloud service generates a document key based on the current system environment information; the document key includes a document private key and a document public key, and the document private key is sealed in the TPM;
[0079] Use the public key to seal the private key;
[0080] Using the private key as a key file, multiple user security domains are created for multiple users.
[0081] Furthermore, the cloud service end is used to create a large model service security domain and complete model reasoning according to reasoning requests.
[0082] In the specific implementation, create a large model service security domain, specifically:
[0083] Obtain multiple user keys, each user key includes a user private key and a user public key;
[0084] Based on multiple user private keys, the model service private key is calculated using an asymmetric key algorithm based on elliptic curves;
[0085] Calculate the model service party public key according to the model service private key;
[0086] A large model service security domain is created based on the model service private key and the model service public key.
[0087] Among them, the computing model service private key and model service public key are specifically:
[0088] If the number of users is n, the order of the elliptic curve is p, and the generator is G, then:
[0089] The private key of user i is , the public key is ;
[0090] The model service party private key is calculated in the user service process: , the public key is , .
[0091] Furthermore, the process of completing model reasoning according to the reasoning request is as follows:
[0092] According to the inference request, calling a user service process to access multiple user security domains to read user data and historical session data of the user;
[0093] Sending the user data and the historical session data of the user to the inference service process through the user service process;
[0094] Loading the inference model from the large model service security domain through the inference service process to infer the user data and the historical session data of the user to obtain an inference result;
[0095] The reasoning result is returned to the user through the reasoning service process and the user service process.
[0096] Please refer to Figure 3 , the embodiment of the present invention further provides a cloud-based reasoning device based on data protection, which may include: one or more processors 101, one or more input devices 102, one or more output devices 103 and a memory 104, wherein the processors 101, the input devices 102, the output devices 103 and the memory 104 are interconnected via a bus 105. The memory 104 is used to store a computer program, wherein the computer program includes program instructions, and the processor 101 is configured to call the program instructions to execute the method of the above method embodiment.
[0097] It should be understood that in the embodiment of the present invention, the processor 101 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0098] The input device 102 may include a keyboard, etc., and the output device 103 may include a display (LCD, etc.), a speaker, etc.
[0099] The memory 104 may include a read-only memory and a random access memory, and provide instructions and data to the processor 101. A portion of the memory 104 may also include a non-volatile random access memory. For example, the memory 104 may also store information about the device type.
[0100] In a specific implementation, the processor 101, input device 102, and output device 103 described in the embodiment of the present invention can execute the implementation method described in the embodiment of the cloud-based reasoning method based on data protection provided in the embodiment of the present invention, which will not be repeated here.
[0101] Accordingly, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the above-mentioned cloud-based reasoning method based on data protection is implemented.
[0102] The computer-readable storage medium may be an internal storage unit of the system described in any of the foregoing embodiments, such as a hard disk or memory of the system. The computer-readable storage medium may also be an external storage device of the system, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the system. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the system and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the system. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0103] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0104] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0105] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0106] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0107] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0108] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A cloud-based reasoning method based on data protection, characterized in that: include: Receive inference requests initiated by users; According to the inference request, calling a user service process to access multiple user security domains to read user data and historical session data of the user; Sending the user data and the historical session data of the user to the inference service process through the user service process; Loading the inference model from the large model service security domain through the inference service process to infer the user data and the historical session data of the user to obtain an inference result; Returning the inference result to the user through the inference service process and the user service process; Among them, multiple user security domains and large model service security domains are all stored in the cloud service end, and the cloud service end provides the user service process and the reasoning service process.
2. The cloud-based reasoning method based on data protection according to claim 1, characterized in that: Before receiving the inference request initiated by the user, the method further includes creating multiple user security domains, specifically: The user end generates or imports a Chang key; the Chang key is used to encrypt the master key in LUKS, indicating the control right of the user's security domain; the Chang key includes a Chang public key and a Chang private key; The cloud service generates a document key based on the current system environment information; the document key includes a document private key and a document public key, and the document private key is sealed in the TPM; Use the public key to seal the private key; Using the private key as a key file, multiple user security domains are created for multiple users.
3. The cloud-based reasoning method based on data protection according to claim 1, characterized in that: Before receiving the inference request initiated by the user, the method further includes creating a large model service security domain, specifically: Obtain multiple user keys, each user key includes a user private key and a user public key; Based on multiple user private keys, the model service private key is calculated using an asymmetric key algorithm based on elliptic curves; Calculate the model service party public key according to the model service private key; A large model service security domain is created based on the model service private key and the model service public key.
4. The cloud-based reasoning method based on data protection as claimed in claim 3, characterized in that: The calculation model service private key and model service public key are as follows: If the number of users is n, the order of the elliptic curve is p, and the generator is G, then: The private key of user i is , the public key is ; The model service private key is calculated in the user service process: , the model service public key is , .
5. The cloud-based reasoning method based on data protection according to claim 3, characterized in that: Asymmetric key algorithms based on elliptic curves include the Secp256k1 algorithm and the SM2 algorithm.
6. A cloud-based reasoning device based on data protection, characterized in that: The method comprises a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 5.
8. A cloud-based reasoning system based on data protection, comprising a user end and a cloud service end, characterized in that: The user terminal is used to initiate an inference request; The cloud service end stores multiple user security domains and large model service security domains, and the cloud service end provides user service processes and reasoning service processes; the cloud service end is used to: According to the inference request, calling a user service process to access multiple user security domains to read user data and historical session data of the user; Sending the user data and the historical session data of the user to the inference service process through the user service process; Loading the inference model from the large model service security domain through the inference service process to infer the user data and the historical session data of the user to obtain an inference result; The reasoning result is returned to the user through the reasoning service process and the user service process.
9. The cloud-based reasoning system based on data protection according to claim 8, characterized in that: The user terminal is also used to generate or import a Chang key; the Chang key is used to encrypt the master key in LUKS, indicating the control right of the user security domain; the Chang key includes a Chang public key and a Chang private key; The cloud server is used for: Generate a text key based on the current system environment information; the text key includes a text private key and a text public key, and the text private key is sealed in the TPM; Use the public key to seal the private key; Using the private key as a key file, multiple user security domains are created for multiple users.
10. The cloud-based reasoning system based on data protection according to claim 8 or 9, characterized in that: The cloud service end is also used to create a large model service security domain, specifically: Obtain multiple user keys, each user key includes a user private key and a user public key; Based on multiple user private keys, the model service private key is calculated using an asymmetric key algorithm based on elliptic curves; Calculate the model service party public key according to the model service private key; A large model service security domain is created based on the model service private key and the model service public key.
Citation Information
Patent Citations
Data protection method, authentication server, data protection system, and data structure
CN110826079A
Large model reasoning method, device and equipment and storage medium
CN118035988A
User behavior data processing method and electronic equipment
CN119167420A
Generative artificial intelligence enterprise search
US20240202221A1