User program running method, device and system capable of protecting privacy

Through collaborative work between the container management platform and the service platform, it is ensured that user programs are stored and run after the security certification of the container TEE is passed, which solves the leakage risk of user programs stored in the distributed file system and improves privacy. Security.

CN118536162APending Publication Date: 2024-08-23ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410707831.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

When using TEE containers in the existing technology, there is a risk of leakage when the user program is stored in the distributed file system, and the security of the container cannot be determined, resulting in security risks when the user program is running.

Method used

By establishing the process of task execution request and program acquisition request between the container management platform and the service platform, it is ensured that after the security authentication of the container TEE is passed, the confidential user program is stored and run locally in the container TEE, using the randomly generated The public key and private key are used for encryption and decryption.

Benefits of technology

It improves the privacy security of user programs from the service platform to the TEE container, ensures that user programs are stored and run after verifying the security of the container, and reduces leakage and security risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536162A
    Figure CN118536162A
Patent Text Reader

Abstract

The embodiment of the invention provides a privacy-protecting user program running method, device and system. In order to protect the privacy of the user program, when the service platform receives the user program, the storage address of the user program in the container management platform is determined, and a task execution request for the user program is generated based on the storage address. And the container management platform creates a container based on the received task execution request, and starts a trusted execution environment TEE in the container. An application program in the container TEE sends a program acquisition request to the service platform. And the service platform sends the encrypted user program to the container TEE after passing the authentication of the container TEE. The user program is stored locally to the container TEE, and then the user program is run in the container TEE.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of computer technology, and more particularly, to a method, device, and system for running a user program with privacy protection. Background Art

[0002] Trusted Execution Environment (TEE) is a secure and trusted execution environment in a computing device that is protected by hardware. TEE provides an isolated execution environment so that the code / data running in the TEE can be guaranteed not to be interfered with by the regular operating system, thereby ensuring the security, confidentiality and integrity of the code / data placed in the TEE. TEE can be applied in the container management platform Kubernetes (K8s for short), so that through the combination of TEE and K8s, a trusted task execution platform is provided for user programs to be run in the service platform.

[0003] K8s is an open source system for automatically deploying, scaling, and managing containerized applications. The container management platform (referred to as K8s platform) that uses the K8s environment can be used to manage containerized applications on multiple hosts. Computing tasks can be executed in containers, and containers can isolate the internal environment from the external environment so that the execution process of tasks is not affected by the external environment. The container group (Pod) is the smallest deployable unit in K8s. A Pod can contain an application container (in some cases, multiple containers), storage resources, a unique network IP address (Internet Protocol Address), and some options to determine how the container should run. Pod represents an independent application running instance in K8s, which may consist of a single container or several tightly coupled containers. Docker is the most widely used container engine in K8s Pod, and K8s Pod also supports other types of container engines.

[0004] TEE can be run in Pod, that is, a Pod running TEE can be started in K8s environment. When deploying containers running TEE in K8s, these containers usually rely on underlying hardware support, such as Intel SGX (Software Guard Extensions) or AMD SEV (Platform Security Processor). These TEE Pods need to load a specific image, which includes all the software and libraries required for operation, such as operating systems and applications compatible with TEE technology. For running a lightweight, secure Linux operating system such as Occlum in TEE, Occlum needs to be pre-installed in the image. Occlum is a library operating system specifically designed to create and execute secure isolated execution environments in Intel SGX environments, and can use the hardware features of SGX to provide additional security.

[0005] When deploying such a TEE container, you generally need to make the following preparations:

[0006] Image preparation: The image must include the Occlum environment and all necessary pre-configured software and dependencies to ensure that the container can run correctly in the TEE.

[0007] Hardware dependency: Before starting this TEE container, ensure that the physical server of the K8s cluster supports and enables the corresponding hardware extensions (such as Intel SGX).

[0008] K8s support: K8s needs to be configured to support TEEs, which may involve using specific plugins or adjusting cluster settings to manage and schedule these special hardware-dependent containers.

[0009] Security and isolation: The hardware-level security isolation provided by TEE needs to be properly reflected in the K8s configuration to ensure isolation between containers and between containers and the host machine.

[0010] Starting such a TEE container generally involves the following steps:

[0011] Define Pod configuration: First, you need to create a configuration file in YAML format to define the specifications of the Pod, including the container image used, required resources, network configuration, etc. For containers running TEE, the image needs to be pre-installed with all necessary components and libraries, including special operating systems and applications compatible with TEE (such as Occlum running in Intel SGX).

[0012] Deploy Pod: Use the kubectl apply-f <configuration file> command to submit the Pod configuration to the K8s cluster. The K8s scheduler will decide on which node to deploy the Pod based on the Pod's requirements and the cluster's resource status.

[0013] Pull container image: After the Pod is deployed, K8s pulls the specified container image on the selected node through the container runtime. The container runtime can refer to Docker's runtime, which is the execution environment in the Docker container management process. For TEE containers, the image generally needs to include the necessary TEE support and configuration.

[0014] Start the container: After the container image is successfully pulled, K8s uses the container runtime to start the container on the node. This step initializes the operating system in the container and prepares to execute user-defined applications.

[0015] Start the TEE OS: In the case of starting a TEE container, a specific OS or library OS (such as Occlum) compatible with TEE technology (such as Intel SGX) will be started inside the container. This is usually done automatically through the container startup script, which configures and starts all necessary TEE components.

[0016] Run applications: Once the TEE operating system or environment is started and initialized, the intended application can be started in this secure environment. The execution of the application can benefit from the security protections provided by TEE, such as memory encryption and execution isolation.

[0017] Monitoring and management: K8s continues to monitor and manage running Pods and containers, including resource usage, health checks, automatic recovery, and other functions.

[0018] In this process, TEE startup and management involve K8s operations similar to ordinary containers, but it is necessary to ensure that the underlying hardware and images support specific TEE technologies. In addition, cluster administrators may need to perform specific cluster configurations or use specialized K8s plug-ins to support these operations.

[0019] The combination of the above-mentioned TEE and K8s can provide a trusted task execution platform for user programs to be run in the service platform, and can be combined with BigDL PPML, a commonly used distributed computing architecture in the field of big data or artificial intelligence (AI), to execute privacy-preserving machine learning solutions, allowing conventional, standard big data and AI solutions to run in a secure environment.

[0020] In addition to the K8s platform, a management platform can also be set up to provide task management to users. Through the management platform, users can perform operations such as submitting tasks, stopping tasks, registering data, and authorization.

[0021] Figure 7 It is a user program running scheme for implementing privacy protection in the prior art. In this scheme, the TEE container image does not include the user program, and the user program exists in a third-party storage, so that users can flexibly deploy the user program without having to make related images containing the user program in advance. If the user program is made in the image in advance, since the image file is usually stored in plain text, the privacy security of the user program cannot be guaranteed. Usually, the user can upload the user program to a distributed file system such as HDFS (Hadoop Distributed File System) or OSS (Object Storage Service). Then, the user can initiate a request to execute the user program to the service platform. The service platform can issue an instruction to execute the user program to the K8s platform. After receiving the task execution instruction from the service platform, the K8s platform pulls the TEE container image, and creates a TEE container based on the pulled TEE container image (including creating a Pod and a runtime such as docker, and loading TEE OS and other related content), and then sends a request to obtain the user program to the distributed file system through the TEE container, obtains the user program from the distributed file system, and stores the user program in the TEE container and executes it.

[0022] In this way, the user stores the user program to be executed in the TEE container in the distributed file system, which poses a risk of leaking the user program. Moreover, in this way, the user program is actually stored in the distributed file system without verifying the security of the TEE in the container. The user cannot determine the security of the container TEE to be run, which leads to security risks when the user program is run in it. Summary of the invention

[0023] One or more embodiments of this specification describe a privacy-protected user program operation method, device, and system to improve the privacy protection of user programs when running user programs. The specific technical solution is as follows.

[0024] In a first aspect, an embodiment provides a privacy-protected user program running method, which is executed through a container management platform, including:

[0025] Receiving a task execution request sent by a service platform; the task execution request is used to request to run a user program;

[0026] Creating a container based on the task execution request, and starting the TEE in the container;

[0027] Sending a program acquisition request to the service platform through the container;

[0028] Receiving the secret user program returned by the service platform through the container, and storing the user program locally in the TEE; wherein the user program is returned by the service platform after the TEE is authenticated;

[0029] The user program is run in the TEE.

[0030] In one implementation, the task execution request carries a specified storage address of the user program; the step of storing the user program locally in the TEE includes: storing the user program in the specified storage address of the TEE.

[0031] In one embodiment, the image file of the container includes a first program; the method further includes: in response to starting the TEE, running the first program in the TEE;

[0032] The step of sending a program acquisition request to the service platform includes: sending a program acquisition request to the service platform through the first program;

[0033] The step of receiving the encrypted user program returned by the service platform and storing the user program in the designated storage address of the TEE includes: receiving the encrypted user program returned by the service platform through the first program, decrypting the encrypted user program into plain text through the first program, and storing the plain text user program in the designated storage address.

[0034] In one embodiment, the method further comprises:

[0035] When the first program is running, randomly generating a first public key and a corresponding first private key, and setting the first public key in the program acquisition request;

[0036] The step of decrypting the encrypted user program into plain text by the first program includes:

[0037] The first program uses the first private key to decrypt the encrypted user program into plain text.

[0038] In a second aspect, the embodiment provides a privacy-protecting user program running method, which is executed through a service platform, including:

[0039] Receive the user program to be run;

[0040] generating a task execution request for the user program;

[0041] Sending the task execution request to the container management platform so that the task management platform creates a container in response to the task execution request; the container includes a TEE;

[0042] After the TEE is authenticated, in response to a program acquisition request sent by the container, the secret user program is sent to the container, so that the container stores the user program locally in the TEE and runs the user program in the TEE.

[0043] In one embodiment, the service platform includes a TEE; and the method is executed in the TEE.

[0044] In one embodiment, the step of generating a task execution request for the user program includes:

[0045] Determining a designated storage address of the user program in the container management platform;

[0046] Based on the designated storage address, a task execution request for the user program is generated.

[0047] In one embodiment, the step of generating a task execution request for the user program includes:

[0048] The designated storage address is set in a designated field of the task execution request; the designated field is used to indicate the storage location of the user program.

[0049] In one embodiment, the step of sending the encrypted user program to the container in response to the program acquisition request sent by the container includes:

[0050] In response to a program acquisition request sent by the first program in the container, the encrypted user program is sent to the first program, so that the first program decrypts the encrypted user program into plain text, and stores the plain text user program locally in the TEE, and the first program runs in the TEE.

[0051] In one implementation, the program acquisition request carries a first public key;

[0052] The step of sending the encrypted user program to the first program includes:

[0053] The user program is encrypted using the first public key to obtain the encrypted user program, and the encrypted user program is sent to the first program.

[0054] In one embodiment, the method further comprises:

[0055] When receiving the program acquisition request sent by the first program, the first program is authenticated based on the program acquisition request, and when the authentication is successful, the step of encrypting the user program using the first public key is performed.

[0056] In one implementation, the step of determining the designated storage address of the user program in the container management platform includes: using a preset address as the designated storage address; or generating the designated storage address according to a designated rule.

[0057] In a third aspect, the embodiment provides a user program running device for protecting privacy, which is deployed in a container management platform and includes:

[0058] A first receiving module is configured to receive a task execution request sent by the service platform; the task execution request is used to request to run a user program;

[0059] A first creation module is configured to create a container based on the task execution request and start the TEE in the container;

[0060] A third sending module is configured to send a program acquisition request to the service platform through the container;

[0061] A first storage module is configured to receive the secret user program returned by the service platform through the container, and store the user program locally in the TEE; wherein the user program is returned by the service platform after the TEE is authenticated;

[0062] The first running module is configured to run the user program in the TEE.

[0063] In a fourth aspect, the embodiment provides a user program running device for protecting privacy, which is deployed in a service platform and includes:

[0064] A first receiving module is configured to receive a user program to be run;

[0065] A first generating module, configured to generate a task execution request for the user program;

[0066] A first sending module is configured to send the task execution request to the container management platform, so that the task management platform creates a container in response to the task execution request; the container includes a TEE;

[0067] The second sending module is configured to send the secret user program to the container in response to a program acquisition request sent by the container after the authentication of the TEE is passed, so that the container stores the user program locally in the TEE and runs the user program in the TEE.

[0068] In a fifth aspect, the embodiment provides a user program running system for protecting privacy, including a service platform and a container management platform:

[0069] The service platform is used to receive a user program to be run, generate a task execution request for the user program, and send the task execution request to the container management platform;

[0070] The container management platform is used to create a container based on the received task execution request, start the TEE in the container, and send a program acquisition request to the service platform through the container;

[0071] The service platform is configured to send the secret user program to the container in response to the program acquisition request after the TEE is authenticated;

[0072] The container is used to receive the encrypted user program returned by the service platform, store the user program locally in the TEE, and run the user program in the TEE.

[0073] In a sixth aspect, an embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute any one of the methods in the first aspect and the second aspect.

[0074] In a seventh aspect, an embodiment provides a computing device, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in any one of the first aspect and the second aspect is implemented.

[0075] In the method and device provided in the embodiments of this specification, the service platform sends a task execution request for the user program to the container management platform. After creating the container, the container management platform directly requests the user program from the service platform through the container. After the service platform passes the authentication of the container TEE, it sends the secret user program to the container. The container stores the secret user program locally in the TEE and runs the user program in the TEE. This method can store the user program in the container TEE after verifying the security of the TEE in the container, and run the user program in the container TEE, thereby improving the privacy security of the user program from the service platform to running in the TEE. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0077] Figure 1A A schematic diagram of an implementation scenario of an embodiment disclosed in this specification;

[0078] Figure 1B A schematic diagram of an implementation scenario under the PPML architecture disclosed in this specification;

[0079] Figure 2 A flowchart of a method for running a user program to protect privacy provided by an embodiment;

[0080] Figure 3 A schematic diagram of a process flow when a program is executed in a container TEE provided in an embodiment;

[0081] Figure 4 A schematic block diagram of a user program running device for protecting privacy provided by an embodiment;

[0082] Figure 5 A schematic block diagram of another privacy-protecting user program running device provided in an embodiment;

[0083] Figure 6 A schematic block diagram of a user program running system for protecting privacy provided by an embodiment;

[0084] Figure 7 The present invention is a user program running solution for realizing privacy protection in the prior art. DETAILED DESCRIPTION

[0085] The solution provided in this specification is described below in conjunction with the accompanying drawings.

[0086] Figure 1AA schematic diagram of an implementation scenario of an embodiment disclosed in this specification. It includes a service platform and a container management platform (such as Kubernetes, referred to as K8s). The service platform and the container management platform are connected through network communication. When the service platform has a computing task for a user program, it will send a task execution request to the container management platform. When the container management platform receives the task execution request issued by the service platform, it creates a container TEE and sends a program acquisition request to the service platform. The service platform will authenticate the container TEE. After the authentication is passed, the container management platform is allowed to obtain the user program from the service platform and store it in its local container TEE, and then run the user program in the container TEE to perform the corresponding task.

[0087] Combine the following Figure 2 This embodiment is described in detail. Figure 2 A flowchart of a method for running a user program to protect privacy provided by an embodiment. The method includes the following steps.

[0088] In step S210 , the service platform receives a user program to be executed and generates a task execution request for the user program.

[0089] In step S220, the service platform sends the task execution request to the container management platform K8s, and K8s receives the task execution request sent by the service platform.

[0090] The task execution request is used to request to run the user program in the container. The task execution request may carry the specified storage address of the user program.

[0091] User programs are user applications or files to be executed, which belong to user data. For example, user programs can be, but are not limited to, deep learning models in the field of big data or AI that require privacy protection. Users can upload user programs to be run to the service platform through user devices, and the service platform receives the user programs uploaded by user devices.

[0092] The service platform can assume the role of task management, that is, the role of the management platform mentioned above. Through the service platform, users can perform operations such as submitting tasks, stopping tasks, data registration and authorization. For users, the service platform is a trusted device of a trusted party.

[0093] In order to improve the security of private data, the service platform can run a TEE environment, and all methods executed by the service platform are executed in the TEE of the service platform. The user device can first authenticate the TEE in the service platform. After the authentication is passed, the user program is encrypted using the public key of the service platform TEE, and the encrypted data is sent to the TEE of the service platform. The service platform receives the user program to be run in the TEE, decrypts the encrypted data using the corresponding private key, and obtains the plaintext user program. In this process, the user program is stored in a trusted environment.

[0094] The service platform can determine the designated storage address of the user program in K8s. The determined designated storage address is the address where the user program will be stored in the container TEE of K8s. The designated storage address is the local storage address of the container TEE. When the service platform determines the designated storage address, the user program has not yet been stored at the designated storage address. The service platform can use a preset address as the designated storage address, or generate the designated storage address according to a specified rule. The designated storage address is a relative address.

[0095] Next, the service platform can generate a task execution request based on the specified storage address. Specifically, the service platform can set the specified storage address in the specified field of the task execution request, which is used to indicate the storage location of the user program. When the storage location points to the local address of K8s, the container can obtain the user program from the local address of the corresponding container TEE when executing the task. The task execution request may include a task description file. The specified field may exist in the task description file. The task description file may also include the identification of the required image file.

[0096] For the service platform, this embodiment does not need to make too many modifications to the code in the service platform, but only needs to modify the parameters in the task execution request.

[0097] In step S230, K8s creates a Pod (container or container group) in response to the received task execution request, and starts TEE in the Pod.

[0098] K8s can create a TEE container based on the information carried in the task execution request, which can specifically include creating a Pod and a runtime such as docker, as well as loading TEE OS (Operating System, OS) and other related content. For example, a Pod can be created based on a task description file. The task description file contains the identifier of the image file, and the image file contains all the files required by TEEOS. When the Pod obtains the image file based on the identifier, it can run the image file in the Pod, including starting and running the TEE OS. When creating a container, you can start a normal operating system, that is, a non-TEE operating system, in the container, and start and run the TEE OS in the normal operating system. Starting TEE in a container includes starting the TEE OS.

[0099] The TEE OS running in the container allows applications to directly access the underlying hardware, thereby providing a more efficient environment for the execution of applications. TEE OS can be, but is not limited to, using a library operating system (LibOS), such as Occlum. TEE OS can usually adopt the design of a "library operating system" (LibOS), which is more streamlined and specialized than the traditional general-purpose OS kernel. In this way, applications can bypass the complex OS kernel and directly call the system call interface provided by LibOS to directly access the underlying hardware resources, such as CPU, GPU, network card, etc. This "de-kernelization" design eliminates the overhead of traditional OS kernels for hardware access, allowing applications to run efficiently in an environment close to "bare metal", with less system overhead and lower resource usage. For example, Occlum is a library operating system based on Intel SGX, which provides a POSIX-like system interface for protected applications in the Intel SGX environment, and has the functions of managing memory, files, processes, etc., so that applications can run efficiently in SGX secure containers. It should be noted that in a TEE environment, although applications can use TEE OS / LibOS to more effectively utilize hardware resources, they usually do not directly access the hardware, but access the hardware through the abstraction layer provided by TEE OS / LibOS to maintain security and isolation. TEE OS or LibOS can optimize these accesses and improve performance, but usually still maintain a certain abstraction layer.

[0100] The library operating system (LibOS) can provide POSIX-like interfaces, aiming to enable applications to run in an execution environment close to the POSIX environment, thereby maximizing the reuse of existing application code and reducing porting work. POSIX (Portable Operating System Interface) is a set of standard operating system interfaces defined for Unix operating systems, aiming to enhance portability. POSIX-like system interfaces are a set of system call interfaces that are similar to POSIX interfaces, but not exactly the same as them. They mimic common system interfaces defined by the POSIX standard, such as process management, file access, network communication, etc., but may differ or be extended in details. Some typical POSIX-like system interfaces include: process control interfaces (fork, exec, exit, etc.), file access interfaces (open, read, write, etc.), memory management interfaces (malloc, mmap, etc.), network communication interfaces (socket, bind, etc.), and signal interfaces (signal, sigsuspend, etc.).

[0101] In short, the design of running TEE OS in a container combines the advantages of container isolation and LibOS's direct access to hardware, providing an efficient, lightweight, and secure operating environment for applications. It is suitable for scenarios with high requirements for performance and isolation.

[0102] It is understandable that the TEE OS described here is not necessary, and it is also possible not to start the OS and only run the TEE environment. It should be noted that the container TEE mentioned in this specification refers to the TEE running in the container, and the TEE container mentioned refers to the container running the TEE.

[0103] In step S240, K8s sends a program acquisition request to the service platform through the Pod, and the service platform receives the program acquisition request sent by K8s through the Pod.

[0104] In step S250, after the service platform authenticates the container TEE, it responds to the program acquisition request sent by the container and sends the encrypted user program to the Pod. In step S260, the encrypted user program sent by the service platform is received by the Pod, and the user program is stored locally in the container TEE.

[0105] The above program acquisition request is used to acquire the user program. The container can generate the program acquisition request in its ordinary operating system or in its TEE, and send the program acquisition request to the service platform.

[0106] After receiving the program acquisition request sent by K8s through the Pod, the service platform can send an authentication request to K8s. K8s generates an authentication report in response to the authentication request received from the service platform and sends the authentication report to the service platform. The service platform authenticates the container TEE based on the authentication report.

[0107] Alternatively, the service platform may send an authentication request to K8s after sending a task execution request to K8s and before receiving a program acquisition request sent by K8s. The program acquisition request itself may also be an authentication report, that is, the program acquisition request is compatible with the function of the authentication report. For example, a specified identifier may be carried in a specified field of the authentication report to indicate the acquisition of the user program. In SGX technology, an authentication report may be called a quote.

[0108] After the service platform authenticates the container TEE, it sends the secret user program to the Pod, so that the Pod stores the user program locally in the container TEE, which can ensure the privacy and security of the user program. This is mainly ensured in two aspects: the security of the TEE itself and the authentication process of the service platform for the TEE.

[0109] The security of TEE itself is explained below.

[0110] TEE is a trusted execution environment that is completely isolated from the outside and is based on the security extension of CPU hardware. TEE can act as a black box. The code / data executed in TEE cannot be peeped even at the operating system layer, and can only be operated through the pre-defined interfaces in the code. Therefore, the use of TEE technology can perform trusted computing while protecting private data.

[0111] In TEE technology, SGX technology is used as an example to illustrate. Computing devices can create enclaves (enclaves or enclaves) based on SGX technology as TEEs for performing data processing. Among them, the computing device uses the newly added processor instructions in the CPU to allocate a part of the area EPC (Enclave Page Cache, enclave page cache or enclave page cache) in the memory for the above-mentioned Enclave to reside. The memory area corresponding to the above-mentioned EPC is encrypted by the memory encryption engine (Memory Encryption Engine, MEE) inside the CPU. The content in the memory area (code / data in the enclave) can only be decrypted in the CPU core, and the key used for encryption and decryption is only generated and stored in the CPU when the EPC is started. It can be seen that the security boundary of the Enclave only includes itself and the CPU. Neither privileged software nor non-privileged software can access the Enclave. Even the operating system administrator and VMM (Virtual Machine Monitor, virtual machine monitor; or Hypervisor) cannot affect the code / data in the Enclave, so it has high security. Under the premise of the above security guarantees, the CPU can process data in the Enclave with high computing efficiency, thus taking into account both data security and computing efficiency. In addition, data entering and leaving the TEE is usually encrypted to ensure data privacy.

[0112] The following describes the service platform's authentication process for TEE.

[0113] Before explaining the service platform's authentication of TEE, we first explain TEE's local authentication and remote authentication.

[0114] Taking SGX technology as an example, due to the isolation characteristics of the above-mentioned Enclave, the created Enclave often needs to prove itself to be trustworthy first, which involves Enclave authentication, such as local authentication and remote authentication mentioned below.

[0115] Before initiating remote authentication, the CPU can detect whether there is an attestation key. If not, initialization is initiated. The initialization process can be based on the key generation protocol, through interaction with the server providing TEE service (hereinafter referred to as the server), and generate EPID (Enhanced Privacy IDentification) according to the generation rules of the Provisioning Key. The EPID is used as an attestation key and is generally used as a private key in an asymmetric encryption key. The generated EPID can be stored in an Enclave for subsequent signing. This Enclave is generally called a Quoting Enclave. In addition, the EPID can also be stored in the CPU register. Only the architecture-level Enclave has the authority to obtain it from the CPU. In this way, the Quoting Enclave can also obtain the EPID from the CPU register.

[0116] As mentioned above, during the process of generating EPID, SGX (specifically the Enclave mentioned above) can interact with the server, so that the server can obtain the public key corresponding to the EPID through the interaction process. In particular, the public key corresponding to the EPID will not be made public and is only kept by the server. This feature is suitable for authentication by the server (also called IAS, Attestation Server) in the subsequent remote authentication process.

[0117] The developer of the application (also called the issuer) can sign the code or data to be loaded into the Enclave (for example, the application loaded into the TEE) with the developer's private key and pass it to SGX through the application. In addition, the issuer's public key can also be passed to SGX (it can also be the certificate of the issuer, which includes information signed by the issuer, and the information can include the issuer's public key; the information can also include the hash value of the code or data to be loaded into the Enclave, and the hash value can be used by SGX to verify the integrity of the loaded code or data). During the execution of the application, an application can be applied to SGX through the instruction set integrated in the CPU to create an Enclave. This Enclave is generally called Application Enclave (equivalent to the above Enclave). When creating an Application Enclave, SGX needs to perform page allocation, copy program code / data and measurement operations. The measurement, specifically, can be measured by the CPU to measure the hash value of the code / data loaded into each page, so that after loading is completed, the hash value of the Application Enclave loaded with code / data is obtained. This hash value is generally called MR Enclave, and the hash algorithm generally uses SHA256. MREnclave can be stored in a structure called SECS (SGX enclave control structure). SECS is located in an EPC page of the enclave to which it belongs and is used to record the metadata of the enclave. The metadata includes sensitive information such as the cryptographic measurement of the enclave (i.e., MREnclave), so this structure can only be accessed and modified by the SGX management mechanism of the CPU.

[0118] Based on the characteristics of the Hash algorithm, tampering with code / data, allocating extra pages, and copying malicious code, any of these three, even if only a small change, will lead to a very different result of MREnclave; different Application Enclaves have different MREnclave values. Based on this property, MREnclave can identify the Enclave on the one hand, and can also be used to verify the integrity of the Application Enclave on the other hand. Through the measurement operation, the hash value contained in the above certificate can be used to verify the integrity of the Application Enclave (the hash value contained in the certificate is the same as the generation rule of MREnclave, so it should be consistent under normal circumstances) to determine whether the privileged software has tampered with the program / data during the creation process, such as whether extra pages are allocated, whether malicious code is copied, or whether the copied data is tampered with, etc.

[0119] Specifically, when SGX creates an Application Enclave, it can compare the aforementioned MREnclave with the hash value in the certificate signed by the Application Enclave issuer through an initialization instruction. If they match, it means that the code / data loaded into the Application Enclave is consistent with the expected one, that is, the code / data of the issuer; otherwise, if they do not match, it means that there is a problem in the creation process and a failure result is returned. If they match, SGX also hashes the issuer's public key in the certificate to obtain MRSigner. Similarly, MRSigner can be used to identify the issuer. The MRSigner can also be saved in the aforementioned SECS.

[0120] In this way, the SECS structure is equivalent to the identity of the Enclave from a certain perspective. It has two identities of the Enclave at the same time: MREnclave is the measurement of the Enclave, and MRSigner is the measurement of the issuer.

[0121] The content in the Application Enclave needs to be remotely authenticated to prove that it is a legitimate and trusted Enclave created in SGX. As mentioned earlier, the content in the Application Enclave needs to be remotely authenticated after being signed by the EPID in the Quoting Enclave, which requires interaction between the Application Enclave and the Quoting Enclave. Prior to this, the Application Enclave needs to prove to the Quoting Enclave that it is an Enclave on the same SGX and is trustworthy. The process of the Application Enclave proving to the Quoting Enclave that it is an Enclave on the same SGX is called local authentication.

[0122] The local proof process can use a message authentication code (MAC) algorithm. The Application Enclave can obtain the MREnclave of the Quoting Enclave and can generate a signed report structure (Report). Specifically, the Application Enclave can call the EREPORT instruction provided by the CPU. The CPU can use a root key and combine the MREnclave of the Quoting Enclave obtained by the Application Enclave to generate a symmetric key - the REPORT Key. At the same time, by calling the EREPORT instruction, the identity information and attributes of the Application Enclave and the platform hardware TCB information can be obtained as the content of the Report; in addition, the Report can also attach data that the user wants to interact with. When calling the EREPORT instruction, the MAC algorithm will also be used to calculate the REPORT Key and the above Report to obtain the first MAC code. The first MAC code can be used as the signature of the Report for integrity verification. The above Application Enclave calls the CPU's EREPORT instruction, and the CPU can directly obtain the Application Enclave's identity information and attributes, and the platform hardware TCB information internally, thereby ensuring that this information will not be interfered with by the Application Enclave and will not be tampered with; moreover, the CPU uses the root key and combines the Quoting Enclave's MR Enclave to generate a REPORT Key, and this process is also executed inside the CPU, so even the Application ENClave will not know the root key, so the root key will not be leaked. After receiving the Report and the first MAC code, the Quoting Enclave can call the EGETKEY instruction provided by the CPU and use its own MR Enclave as an input parameter, so that the CPU obtains the same REPORT Key based on the same root key and the same MR Enclave as in the EREPORT instruction. Furthermore, the Quoting Enclave can use the same MAC algorithm to calculate the second MAC code from the obtained REPORT Key and the received Report. If the second MAC code is the same as the received first MAC code, it means that the integrity of the Report sent by the Application Enclave is not destroyed, which means that the identity information and attributes of the Application Enclave and the platform hardware TCB information contained in the Report are complete.Since only two enclaves on the same SGX can generate the same Report Key through the EREPOR instruction and EGETKEY instruction provided by the CPU combined with the same CPU root key, when the verification MAC code passes, the Quoting Enclave can confirm that the Application Enclave is an Enclave on the same SGX.

[0123] Through the above process, local authentication is completed, that is, the Quoting Enclave can confirm that the Application Enclave is an Enclave on the same SGX. Based on the local proof, the software outside the SGX can challenge the Application Enclave (the software outside the SGX is also called the challenger), requiring the Application Enclave to prove to the challenger that it is a legitimate Enclave and that a trusted program is running in it. After completing the remote authentication, the challenger can use the services provided by the Application Enclave.

[0124] In remote authentication, the challenger (for example, a service platform) can first challenge the Application Enclave, requiring the Application Enclave to prove that it is a legitimate Enclave and that a trusted program is running in it. After receiving the challenge, the Application Enclave can generate a report, which is generally called a Quote. This Quote report can include the hash value of the code / data loaded in the Application Enclave, that is, the aforementioned MREnclave, and can also include the aforementioned MRSigner. After the aforementioned local proof, the content in the Quote can be signed by the Quoting Enclave using EPID, for example, recorded as Signature1. This signature can be the signature made by the Quoting Enclave using EPID on the MREnclave, or the signature made on the MREnclave and MRSigner. After that, the Application Enclave can send the Quote report to the challenger. Since the challenger does not hold the public key corresponding to the EPID, the challenger cannot verify the signature, and the public key corresponding to the EPID is held by Intel Attestation Services (IAS), so the challenger sends the Quote to IAS for signature verification. After receiving the Quote, IAS can verify the correctness of the signature in the Quote with the public key corresponding to the EPID, and return an Attestation Verification Report (AVR). The AVR report can include the Quote report and the verification result of the signature in the Quote, such as whether the signature verification is correct or wrong. IAS can sign the content of the AVR report with the private key of the server, and attach the signature (for example, recorded as Signature2) and the certificate to the AVR report, and return the AVR report to the challenger. After receiving the AVR report, the challenger can use the public key in the certificate (corresponding to the private key of the server) to verify the signature of the server. In addition, the AVR report may not include the certificate, but the challenger can download the server's certificate by himself (the official website and other authoritative websites can provide the certificate for download), and use the public key in the downloaded certificate to verify Signature2. By verifying Signature2, it can be confirmed that the AVR report is indeed issued by the server and is complete. The verification result of the signature in the Quote included in the AVR report can prove whether the SGX represented by the Quote report after verification by IAS is legal.Furthermore, the challenger can verify the MREnclave and MRSigner in the Quote. For example, the challenger can obtain the MREnclave of the code / data loaded into the SGX and the MRSigner of the issuer in advance, and then compare them with the MREnclave and MRSigner in the Quote to confirm that the code / data loaded into the SGX is credible and issued by a legitimate issuer. Code / data means code or data.

[0125] Through the above method, the service platform can realize the authentication of the container TEE. When the authentication is passed, the security of the container TEE is confirmed. After that, the encrypted user program can be sent to the container TEE, and the container TEE stores the plaintext user program locally in the container TEE, thereby ensuring the security of the user program.

[0126] The specific implementation of steps S240 to S260 is described below. As mentioned above, when the above-mentioned TEE is implemented using SGX, the program acquisition request can be implemented through a verifiable report quote (i.e., the above-mentioned authentication report). The container can randomly generate a first public key and a corresponding first private key in the TEE, and set the first public key in the userdata field of the report quote. When the TEE in the service platform receives the report quote, it first authenticates the report quote (the authentication method is as described above). When the authentication is passed, the user program is encrypted using the first public key carried by the report quote to obtain a secret user program, and the secret user program is sent to the container through the network, for example, to the TEE of the container. When the container receives the secret user program, it uses the first private key to decrypt the secret user program in its TEE to obtain a plaintext user program, and stores the plaintext user program locally in the container TEE, for example, in a specified storage address of the TEE. The randomly generated first public key and first private key can improve the security of the user program.

[0127] Next, the specific implementation method of the container side is described. The container can also run a specified executable program in its TEE. The specified executable program can be, for example, Figure 1A The designated executable program is used to execute the computing task specified by the user program. In a specific implementation, the designated executable program can generate a first public key and a first private key, generate a program acquisition request, receive the encrypted user program sent by the service platform, decrypt the encrypted user program into a plaintext user program, and store the plaintext user program locally in the TEE, for example, in a designated storage address of the TEE. Encrypting and decrypting the user program using the first public key and the first private key generated by the designated executable program can improve the security of the user program.

[0128] In step S270, the container runs the user program in the TEE in response to storing the user program locally in the TEE. The container can run the user program in the TEE in an existing manner according to the task description file in the task execution request. For example, when the container is still running the above-mentioned specified executable program in the TEE, the user program can be run through the above-mentioned specified executable program to execute the user task.

[0129] To sum up, in this embodiment, the user program is not transmitted through a file system such as OSS. Instead, the user program is securely stored locally in the container TEE after passing the authentication of the container TEE. The container TEE is measured before the user program is transmitted, ensuring the privacy and security of the user program when it is distributed.

[0130] In another embodiment of the present specification, in order to reduce the code modification of the specified executable program in the container and avoid the modification of the task component executing the original task process in the container, the first program different from the above-mentioned specified executable program in the TEE can also be used to execute Figure 2 The improved part in the embodiment is shown in FIG1 .

[0131] In this embodiment, Figure 2 In step S230, after starting and running TEE in the container, K8s can also respond to starting TEE by running the first program in the TEE, sending a program acquisition request to the service platform through the first program, and receiving the encrypted user program returned by the service platform in the TEE through the first program. Then, the encrypted user program is decrypted into plain text in the TEE through the first program, and the plain text user program is stored locally in the TEE, for example, it can be stored in a specified storage address.

[0132] When the service platform receives the program acquisition request sent by the first program, it challenges the container TEE and authenticates the container TEE. After the authentication is passed, it responds to the program acquisition request, determines the confidential user program, and sends the confidential user program to the first program.

[0133] In a specific implementation, the first program may be set in advance in the image file of the container. The first program is run at the first time after the container TEE is started, that is, when the specified executable file is not run. The above operations are performed through the first program.

[0134] Specifically, when the first program is running, it can also randomly generate a first public key and a corresponding first private key, and set the first public key in the program acquisition request so that the program acquisition request carries the first public key. The randomly generated public-private key pair can improve the security of the user program.

[0135] After the service platform authenticates the container TEE, it uses the first public key to encrypt the user program, obtains the encrypted user program, and sends it to the first program. The first program uses the first private key to decrypt the encrypted user program into plain text in the container TEE, and stores the plain text user program in the specified storage address of the TEE. The first program can obtain the task execution request and obtain the specified storage address from the task execution request.

[0136] by Figure 1A For example, the service platform sends a task execution request to the container management platform. The container management platform creates a container based on the task execution request and starts TEE in the container. The container TEE is authenticated through interaction with the service platform. After the authentication is passed, the container can send a program acquisition request to the service platform through the first program. The first program and the task component can run in the TEE OS.

[0137] Figure 3 A schematic diagram of the process flow of program execution in a container TEE provided in an embodiment.

[0138] like Figure 3 As shown, after running TEE OS in step ①, the first program is run using TEE OS, and the first program is used to perform authentication, obtain user programs, etc. Then, in step ②, the specified executable program PPML Driver / Executor component is executed, and the user program is run through the specified executable program.

[0139] After storing the plain text user program in the designated storage address, the first program can notify the designated executable file through a command. After receiving the command, the designated executable file executes the task according to the task description file in the task execution request.

[0140] In summary, the first program can be used to generate the first public key and the first private key, set the first public key in the user data field in the report quote, and send the report to the service platform. It is also used to receive the encrypted user data, use the first private key to decrypt the encrypted user program, obtain the plaintext user program, and store the plaintext user program in the specified storage address of the TEE. The TEE in the service platform will authenticate the report. When the authentication is passed, it indicates that the first program is running in a secure TEE.

[0141] In this embodiment, there is no need to modify the original designated executable program in the TEE for executing the computing task. Instead, the first program is executed before running the designated executable program, and the report is generated by the first program. The first program requests authentication from the service platform through the report while also requesting the user program, which ensures the privacy security of the user program and reduces the amount of code modification to the original program.

[0142] The embodiment is further described below in conjunction with a specific PPML implementation scenario. Figure 1B This is a schematic diagram of an implementation scenario under the PPML architecture disclosed in this specification, which includes a service platform and K8s.

[0143] The service platform sends a task execution request to K8s. In the PPML architecture, the service platform can modify the request parameters of its own PPML Client component, that is, modify the parameters in the task execution request, use local: / / schema to indicate that the user program can be found in the container image of the Driver or Executor, and submit the task execution request to K8s through the PPML Client. The schema represents a specific path, for example, / home / xxx / xxx.exe. Figure 1B The PPMLDriver or PPML Executor shown in the container can be the specified executable program mentioned above, which is used to run computing tasks such as user programs. The PPML Client component included in the service platform is an application that uses the PPML protocol to communicate with the PPML Server, i.e., the container management platform.

[0144] K8s receives the task execution request sent by the PPML Client component and creates a container group based on the task execution request (for example, Figure 1B Containers 1, 2 and 3 in the container). Each container starts the TEE OS and runs the first program respectively. The first program in each container randomly generates a first public key and a first private key, adds the first public key to the quote, and initiates authentication to the service platform through the quote. After the authentication is passed, the service platform returns the user program encrypted with the first public key to the corresponding first program. In this way, the first program in each container can obtain the ciphertext user program. The first program uses the first private key to decrypt the plaintext user program from the ciphertext user program and stores it locally in its container TEE. After storing the plaintext user program at the specified storage address of the TEE, the first program notifies the task component in the container. The task component can then execute the task in the original way. Each container contains the first program and the corresponding task component, for example, container 1 includes the PPMLDriver component, and containers 2 and 3 include the PPML Executor component.

[0145] The following is a detailed description of the PPML architecture. In the PPML architecture, different execution roles are defined, such as the driver and the executor. The driver is used to parse tasks, comprehensively process tasks, and the executor is used to specifically execute tasks. Figure 1BIn the Pod created by the container management platform, there are Pods that execute the PPMLDriver role and Pods that execute the PPML Executor role.

[0146] BigDL PPML (Pre-Parallelized Model Library) is a distributed privacy-preserving machine learning platform built on Intel's open source big data and artificial intelligence application platform BigDL. It is mainly built on Intel SGX, TDX and other trusted execution environment technologies. PPML can explore powerful artificial intelligence technologies while minimizing security risks when processing large amounts of sensitive data. PPML can effectively protect data in storage, transmission and use.

[0147] BigDL is also an open source deep learning library designed for deep learning tasks in large-scale distributed environments. BigDL provides the ability to use Spark's programming language Scala API to build deep neural network models, and uses Spark's distributed computing capabilities for model training and reasoning, thereby achieving efficient processing of deep learning tasks on large-scale data sets. Spark is a distributed computing architecture similar to PPML.

[0148] BigDL supports common deep learning frameworks, such as TensorFlow, Keras, etc., and can be easily integrated with the existing deep learning ecosystem to achieve more flexible and powerful deep learning applications. BigDL uses the distributed computing framework of ApacheSpark, which can perform parallel computing on large-scale clusters, thereby achieving efficient processing of large-scale data sets. BigDL supports multiple deployment options and can be deployed on local servers, cloud platforms, or container environments to meet the needs of different scenarios.

[0149] PPML is a pre-installed parallelized model library designed to provide users with machine learning models that have been parallelized and optimized. These models are usually optimized for specific hardware and computing environments to achieve higher performance and efficiency. The models in PPML have been parallelized and optimized to fully utilize the computing resources of modern multi-core CPUs or distributed computing environments to accelerate the training and reasoning process of the model. Because the models in PPML have been parallelized and optimized, they can be more easily deployed to different environments, including local servers, cloud platforms, or edge devices. Users can use these models directly without additional parallelization or optimization work, saving time and effort.

[0150] For example, in the PPML architecture, the PPML Driver component and the PPML Executor component run in the corresponding TEE operating system to protect the integrity of user program execution using the capabilities of TEE. In addition, multiple components can jointly perform deep learning to complete model training and prediction tasks.

[0151] After the first program stores the plaintext user program locally in the TEE of the corresponding container, the task components PPML Driver and PPML Executor owned by each container can start to execute different user tasks. For example, two PPMLExecutors can perform the first calculation and the second calculation respectively, and send the results to the PPML Driver. The PPML Driver sums the results of the first calculation and the second calculation and uses them for subsequent calculations. The embodiment can reduce the code modification of the task component by obtaining the user program through the first program.

[0152] In this specification, the word "first" in terms such as the first program and the first public key, as well as the corresponding "second" (if any) in the text, are merely for the convenience of distinction and description and do not have any limiting meaning.

[0153] In this specification, the service platform and the container management platform can be implemented by any device, equipment, platform, equipment cluster, etc. with computing and processing capabilities.

[0154] The foregoing describes certain embodiments of the present specification, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in an order different from that in the embodiments, and the desired results may still be achieved. In addition, the processes depicted in the accompanying drawings do not necessarily have to be performed in the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0155] Figure 4 A schematic block diagram of another privacy-protecting user program running device provided in an embodiment. The device 400 is deployed in a container management platform. Figure 2 The method embodiment shown corresponds to the method executed by the container management platform. The device 400 includes:

[0156] The first receiving module 410 is configured to receive a task execution request sent by the service platform; the task execution request is used to request to run a user program;

[0157] A first creation module 420 is configured to create a container based on the task execution request and start the TEE in the container;

[0158] A third sending module 430 is configured to send a program acquisition request to the service platform through the container;

[0159] The first storage module 440 is configured to receive the secret user program returned by the service platform through the container, and store the user program locally in the TEE; wherein the user program is returned by the service platform after the TEE is authenticated;

[0160] The first running module 450 is configured to run the user program in the TEE.

[0161] In one embodiment, the task execution request carries the specified storage address of the user program; when the first storage module 440 stores the user program locally in the TEE, it includes: storing the user program in the specified storage address of the TEE.

[0162] In one embodiment, the image file of the container includes a first program; the first running module is further configured to: in response to starting the TEE, run the first program in the TEE;

[0163] The third sending module 430 is specifically configured to: send a program acquisition request to the service platform through the first program;

[0164] The first storage module 440 is specifically configured to: receive the encrypted user program returned by the service platform through the first program, decrypt the encrypted user program into plain text through the first program, and store the plain text user program in the designated storage address.

[0165] In one embodiment, the first procedure further includes:

[0166] A second generating module (not shown in the figure) is configured to randomly generate a first public key and a corresponding first private key when the first program is running, and set the first public key in the program acquisition request;

[0167] The first storage module 440, when decrypting the encrypted user program into plain text through the first program, includes:

[0168] The encrypted user program is decrypted into plain text using the first private key through the first program.

[0169] Figure 5 Schematic block diagram of a privacy-protecting user program running device provided in an embodiment. The device 500 is deployed in a service platform. Figure 2The method part executed by the service platform in the method embodiment shown corresponds to the method part. The device 500 includes:

[0170] A first receiving module 510 is configured to receive a user program to be executed;

[0171] A first generating module 530, configured to generate a task execution request for the user program;

[0172] A first sending module 540 is configured to send the task execution request to the container management platform, so that the task management platform creates a container in response to the task execution request; the container includes a trusted execution environment TEE;

[0173] The second sending module 550 is configured to send the confidential user program to the container in response to a program acquisition request sent by the container after the authentication of the TEE is passed, so that the container stores the user program locally in the TEE and runs the user program in the TEE.

[0174] In one embodiment, the service platform includes TEE; the device 500 is deployed in the TEE.

[0175] In one implementation, the first generating module 530 is specifically configured to: determine a designated storage address of the user program in the container management platform; and generate a task execution request for the user program based on the designated storage address.

[0176] In one implementation, the first generating module 530 is specifically configured to set the designated storage address in a designated field of the task execution request; the designated field is used to indicate the storage location of the user program.

[0177] In one embodiment, the second sending module 550 is specifically configured to, in response to a program acquisition request sent by the first program in the container, send the encrypted user program to the first program, so that the first program decrypts the encrypted user program into plain text, and stores the plain text user program locally in the TEE, and the first program runs in the TEE.

[0178] In one implementation, the program acquisition request carries a first public key; the second sending module is specifically configured to encrypt the user program using the first public key to obtain the encrypted user program and send it to the first program.

[0179] In one embodiment, the device 500 also includes: a first authentication module (not shown in the figure), configured to authenticate the first program based on the program acquisition request when receiving the program acquisition request sent by the first program, and execute the second sending module when the authentication passes.

[0180] In one implementation, the first generating module 530, when determining the designated storage address of the user program in the container management platform, includes using a preset address as the designated storage address; or generating the designated storage address according to a designated rule.

[0181] The above-mentioned device embodiments correspond to the method embodiments. For specific descriptions, please refer to the description of the method embodiments, which will not be repeated here. The device embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For specific descriptions, please refer to the corresponding method embodiments.

[0182] Figure 6 A schematic block diagram of a user program running system for protecting privacy provided in an embodiment. The system includes a service platform 610 and a container management platform 620:

[0183] The service platform 610 is used to receive a user program to be run, generate a task execution request for the user program, and send the task execution request to the container management platform 620;

[0184] The container management platform 620 is used to create a container based on the received task execution request, start the TEE in the container, and send a program acquisition request to the service platform 610 through the container;

[0185] The service platform 610 is used to send the secret user program to the container in response to the program acquisition request after the TEE is authenticated;

[0186] The container is used to receive the encrypted user program returned by the service platform 610, store the user program locally in the TEE, and run the user program in the TEE.

[0187] The above system embodiments correspond to the method embodiments. For specific descriptions, please refer to the description of the method embodiments, which will not be repeated here. The system embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For specific descriptions, please refer to the corresponding method embodiments.

[0188] The present specification also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute Figure 1A , Figure 1B , Figures 2 to 3 Any of the methods described above.

[0189] The embodiment of the present specification also provides a computing device, including a memory and a processor, wherein the memory stores an executable code, and when the processor executes the executable code, Figure 1A , Figure 1B , Figure 2 and Figure 3 Any of the methods described above.

[0190] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the storage medium and computing device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0191] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present invention may be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0192] The specific implementation methods described above further describe the purpose, technical solutions and beneficial effects of the embodiments of the present invention in detail. It should be understood that the above description is only a specific implementation method of the embodiments of the present invention and is not intended to limit the scope of protection of the present invention. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solution of the present invention shall be included in the scope of protection of the present invention.

Claims

1. A method for running a user program with privacy protection, executed through a container management platform, comprising: Receive task execution requests sent by the service platform; The task execution request is used to request to run a user program; Creating a container based on the task execution request, and starting a trusted execution environment TEE in the container; Sending a program acquisition request to the service platform through the container; Receiving the secret user program returned by the service platform through the container, and storing the user program locally in the TEE; wherein the user program is returned by the service platform after the TEE is authenticated; The user program is run in the TEE.

2. The method according to claim 1, wherein the task execution request carries a specified storage address of the user program; The step of storing the user program locally in the TEE includes: The user program is stored in the designated storage address of the TEE.

3. The method according to claim 2, wherein the image file of the container includes a first program; the method further comprises: In response to starting the TEE, running the first program in the TEE; The step of sending a program acquisition request to the service platform includes: sending a program acquisition request to the service platform through the first program; The step of receiving the encrypted user program returned by the service platform and storing the user program in the designated storage address of the TEE includes: receiving the encrypted user program returned by the service platform through the first program, decrypting the encrypted user program into plain text through the first program, and storing the plain text user program in the designated storage address.

4. A method for running a user program to protect privacy, executed through a service platform, comprising: Receive the user program to be run; generating a task execution request for the user program; Sending the task execution request to the container management platform so that the task management platform creates a container in response to the task execution request; the container includes a TEE; After the TEE is authenticated, in response to a program acquisition request sent by the container, the secret user program is sent to the container, so that the container stores the user program locally in the TEE and runs the user program in the TEE.

5. The method according to claim 4, wherein the step of generating a task execution request for the user program comprises: Determining a designated storage address of the user program in the container management platform; Based on the designated storage address, a task execution request for the user program is generated.

6. The method according to claim 4, wherein in response to the program acquisition request sent by the container, the step of sending the encrypted user program to the container comprises: In response to a program acquisition request sent by the first program in the container, the encrypted user program is sent to the first program, so that the first program decrypts the encrypted user program into plain text, and stores the plain text user program locally in the TEE, and the first program runs in the TEE.

7. A user program running device for protecting privacy, deployed in a container management platform, comprising: A first receiving module is configured to receive a task execution request sent by a service platform; The task execution request is used to request to run a user program; A first creation module is configured to create a container based on the task execution request and start the TEE in the container; A third sending module is configured to send a program acquisition request to the service platform through the container; A first storage module is configured to receive the secret user program returned by the service platform through the container, and store the user program locally in the TEE; wherein the user program is returned by the service platform after the TEE is authenticated; The first running module is configured to run the user program in the TEE operating system.

8. A user program running device for protecting privacy, deployed in a service platform, comprising: A first receiving module is configured to receive a user program to be run; A first generating module, configured to generate a task execution request for the user program; A first sending module is configured to send the task execution request to the container management platform, so that the task management platform creates a container in response to the task execution request; the container includes a TEE; The second sending module is configured to send the secret user program to the container in response to a program acquisition request sent by the container after the authentication of the TEE is passed, so that the container stores the user program locally in the TEE and runs the user program in the TEE.

9. A user program running system for protecting privacy, including a service platform and a container management platform: The service platform is used to receive a user program to be run, generate a task execution request for the user program, and send the task execution request to the container management platform; The container management platform is used to create a container based on the received task execution request, start the TEE in the container, and send a program acquisition request to the service platform through the container; The service platform is configured to send the secret user program to the container in response to the program acquisition request after the TEE is authenticated; The container is used to receive the encrypted user program returned by the service platform, store the user program locally in the TEE, and run the user program in the TEE.

10. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 6.