Private computing task scheduling method and device, storage medium and program product
Through coordination between the management platform and the server cluster, encrypted memory resources are dynamically allocated, which solves the problem of allocation failure of private computing tasks due to insufficient encrypted memory in clusters and cloud environments, and achieves stable execution of tasks and efficient utilization of resources. .
Patent Information
- Application Number
- CN202410650762.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-09-06
AI Technical Summary
When the existing technology allocates a fixed capacity of encrypted memory for privacy computing tasks in clusters and cloud environments, it may cause the encrypted memory to exceed the remaining available EPC size, causing the allocation to fail, and thus the privacy computing task cannot be performed.
A privacy computing task scheduling method is proposed, which connects the management platform with the server cluster to determine the expected total encrypted memory capacity required to execute the task, and uses the monitoring plug-in to obtain the remaining encrypted memory capacity of the trusted execution environment in the server cluster, only in the remaining Issue private computing tasks when the capacity is no less than the expected total capacity to ensure that the tasks have sufficient encrypted memory resources to execute.
This avoids task failures and instability caused by insufficient encryption memory resources, ensures that private computing tasks can be executed smoothly, and improves resource utilization efficiency and system stability.
Smart Images

Figure CN118606989A
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to the field of computer software technology, and in particular, to a privacy computing task scheduling method, electronic device, computer-readable storage medium, and computer program product. Background Art
[0002] In the past few years, digitalization has profoundly affected our production and life. Digitalization is no longer limited to information industries such as the Internet, but is fully oriented to various basic industries. It is foreseeable that data elements will occupy a very core position in future economic activities. Among them, data security and data privacy have gradually become questions that we must answer. In the past few years, computing technologies around data security and privacy have developed rapidly. Among them, TEE (Trusted Execution Environment) has been continuously popularized and widely used in data privacy and security applications, and has maturely penetrated into multiple fields and is widely used and recognized by the industry.
[0003] In TEE technology, Intel SGX (Software Guard Extensions) technology is used as an example to illustrate. Computing devices can create 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 (Central Processing Unit) to allocate a part of the area EPC (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 and 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 Enclave only includes itself and the CPU. No privileged or non-privileged software can access Enclave. Even the operating system administrator and VMM (Virtual Machine Monitor, also known as Hypervisor) cannot affect the code and data in Enclave, so it has high security. Under the premise of the above security guarantee, the CPU can process data in Enclave with high computing efficiency, thus taking into account both data security and computing efficiency. In addition, data entering and leaving TEE is usually encrypted to ensure data privacy.
[0004] TEE can be applied and used in a local stand-alone deployment. As mentioned earlier, Intel SGX uses EPC to store Enclave code and data. EPC is a portion of memory within the processor that is hardware-protected by physical memory. The size of EPC is limited, usually in the hundreds of MB range (depending on the processor model). This means that the sum of a single Enclave and all Enclaves in the system cannot exceed this limit. For example, in SGX 1.0, the EPC memory pool size of the entire system is limited to 128MB. In SGX 2.0, EDMM (Enclave Dynamic Memory Management) is introduced in SGX 2.0, which allows ordinary host memory to be dynamically mapped to Enclave memory, breaking through the EPC physical memory limit. The EPC memory pool size of the entire system is generally limited to 1TB. In addition, the SGX specification also stipulates that the size of a single Enclave does not exceed 96MB.
[0005] In this way, when using Intel SGX technology in stand-alone mode, a specific encrypted memory (ie, EPC) size can be allocated for the first Enclave, and after the first Enclave is created, encrypted memory is allocated for the second Enclave based on the remaining available EPC size and created. This process involves the management and allocation of EPC resources and is part of memory management in SGX technology.
[0006] In addition to deploying TEE on a local stand-alone machine, you can also deploy TEE in clusters and cloud environments, including public clouds, private clouds, and hybrid clouds. Clusters are the technical foundation for cloud computing, and cloud computing platforms usually rely on back-end cluster technology to provide powerful and scalable computing capabilities. For example, large cloud service providers use clusters to manage and schedule computing tasks to hundreds or even thousands of servers.
[0007] For example, in cloud computing, TEE can provide a secure environment for processing sensitive data (such as personal identity information, health records, financial transactions, etc.). By performing data processing tasks within the TEE, it can be ensured that the data is not accessed without authorization during processing, even in a multi-tenant cloud environment. Moreover, TEE technology can be used to run code that encrypts and processes sensitive data on the cloud without the control of the cloud service provider. For example, using Intel SGX, a secure enclave environment can be created in a cloud virtual machine or container to protect keys, encrypt and decrypt data, etc. In one example, TEE can provide a foundation for privacy-preserving computing scenarios such as multi-party computing and federated learning, allowing multiple parties to collaborate on data processing in the cloud while ensuring the privacy of their respective data. In addition, TEE can also isolate and encrypt the data sets used for machine learning (ML) model training to prevent private data from being leaked in a shared cloud environment. At the same time, ML model reasoning can also be performed within the TEE to ensure the confidentiality of model weights and prediction results.
[0008] TEE (Trusted Execution Environment) provides encrypted memory for data security protection. Currently, the encrypted memory allocation method in clusters, cloud computing and other related technologies is usually to allocate a fixed capacity of encrypted memory for privacy computing tasks executed in the trusted execution environment. However, this method may cause the fixed allocated capacity of encrypted memory to exceed the remaining available EPC size, resulting in allocation failure, which in turn makes it impossible to execute privacy computing tasks. Summary of the invention
[0009] In view of this, one or more embodiments of the present specification provide a privacy computing task scheduling method, an electronic device, a computer-readable storage medium, and a computer program product.
[0010] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:
[0011] According to a first aspect of one or more embodiments of this specification, a privacy computing task scheduling method is proposed, which is applied to a management platform, wherein the management platform is connected to a server cluster for executing the privacy computing task, and each server in the server cluster is respectively equipped with a trusted execution environment for executing the privacy computing task, and the trusted execution environment includes an encrypted memory for securely protecting computing data related to the privacy computing task; the method includes:
[0012] Determining the expected total capacity of encrypted memory required to perform the privacy computing task;
[0013] Using a monitoring plug-in set in the server cluster, obtaining the remaining total capacity of the encrypted memory included in the trusted execution environment installed on the server in the server cluster;
[0014] In response to the remaining total capacity being not less than the expected total capacity, the privacy computing task is sent to the server cluster to execute the privacy computing task in the server cluster.
[0015] In one implementation, the operating system kernel of each server in the server cluster maintains a variable value for recording the remaining capacity of the encrypted memory included in the trusted execution environment carried by each server; the variable value is used to describe the number of pages of free encrypted memory;
[0016] The obtaining, by using the monitoring plug-in set in the server cluster, the remaining total capacity of the encrypted memory included in the trusted execution environment carried by the server in the server cluster includes:
[0017] Using a monitoring plug-in set in the server cluster, the variable value of the remaining capacity of the encrypted memory contained in the trusted execution environment installed on each server in the server cluster is monitored by the operating system kernel of each server in the server cluster, and the remaining total capacity of the encrypted memory contained in the trusted execution environment installed on the servers in the server cluster is determined based on the recorded variable value of the remaining capacity of the encrypted memory contained in the trusted execution environment installed on each server.
[0018] In one implementation, the monitoring plug-in is set in the operating system kernel of the designated server in the server cluster; the monitoring plug-in is also used to record the remaining total capacity of the encrypted memory included in the trusted execution environment installed on the server in the determined server cluster into a user state file preset in the operating system installed on the designated server;
[0019] The method of using the monitoring plug-in set in the server cluster to obtain the remaining total capacity of the encrypted memory included in the trusted execution environment carried by the server in the server cluster also includes:
[0020] The remaining total capacity of the encrypted memory included in the trusted execution environment carried by the server in the server cluster is read from the user state file.
[0021] In one implementation, the method further includes:
[0022] In response to the remaining total capacity being not less than the expected total capacity, the expected capacity of the encrypted memory required for each subtask included in the privacy computing task is determined, and the total creation number of computing nodes to be created is determined based on the expected total capacity and the expected capacity of the encrypted memory required for each subtask included in the privacy computing task, and the total creation number is sent to the server cluster so that the server calculates and creates computing nodes according to the total creation number to execute the subtasks included in the privacy computing task.
[0023] In one implementation, determining the total number of computing nodes to be created includes:
[0024] Get the subtask processing capacity preconfigured for the computing node to be created;
[0025] The total number of computing nodes to be created is determined based on the expected total capacity, the expected capacity of the encrypted memory required to execute each subtask included in the privacy computing task, and the subtask processing volume.
[0026] In one implementation, determining the total number of computing nodes to be created includes:
[0027] Get the initial encrypted memory pre-configured for the compute node to be created;
[0028] Determine the total amount of encrypted memory required for the computing node to be created according to the expected capacity of the encrypted memory required to execute each subtask included in the privacy computing task, the subtask processing volume, and the initial encrypted memory;
[0029] The total number of computing nodes to be created is determined based on the expected total capacity and the total amount of encrypted memory required by the computing nodes to be created.
[0030] In one implementation, the total amount of encrypted memory required by the computing node to be created is the product of the expected capacity and the subtask processing amount, and the sum of the initial encrypted memory;
[0031] The total number of computing nodes to be created is the quotient of the expected total capacity and the total amount of encrypted memory required by the computing nodes to be created.
[0032] According to a second aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0033] processor;
[0034] a memory for storing processor-executable instructions;
[0035] When the processor executes the executable instructions, it is used to implement the method described in the first aspect.
[0036] According to a third aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any of the above methods are implemented.
[0037] According to a fourth aspect of the embodiments of this specification, a computer program product is provided, including a computer program, which implements the steps of any of the above methods when executed by a processor.
[0038] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0039] In the disclosed embodiment, the expected total capacity of the encrypted memory required to execute the privacy computing task is determined, and the remaining total capacity of the encrypted memory contained in the trusted execution environment on the servers in the server cluster is obtained through a monitoring plug-in. The privacy computing task is issued only when the remaining encrypted memory capacity is not less than the expected total capacity, ensuring that the privacy computing task has sufficient encrypted memory resources to be executed smoothly, avoiding task failure and instability due to insufficient encrypted memory resources.
[0040] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a schematic diagram of a management platform and a K8s platform provided by an exemplary embodiment.
[0042] Figure 2 It is a schematic diagram of a Kubernetes cluster provided by an exemplary embodiment.
[0043] Figure 3 It is a schematic diagram of a spark cluster provided by an exemplary embodiment.
[0044] Figure 4 It is a schematic diagram of another management platform and K8s platform provided by an exemplary embodiment.
[0045] Figure 5 This is a flowchart of a privacy computing task scheduling method provided by an exemplary embodiment.
[0046] Figure 6 It is a schematic diagram of obtaining the remaining total capacity of an encrypted memory provided by an exemplary embodiment.
[0047] Figure 7 It is a schematic structural diagram of an electronic device provided by an exemplary embodiment. DETAILED DESCRIPTION
[0048] In the data privacy security, compliance and computing scenarios facing massive data scale, how to achieve secure and efficient data analysis is the primary technical problem to be solved. However, in the computing model of SaaS (Software as a Service) or FaaS (Function as a Service), how to make full use of computing resources more efficiently is a difficult problem faced by enterprises and platforms. At the same time, due to the preciousness of encrypted memory, it is particularly important to implement an efficient and elastic computing mechanism that makes full use of encrypted memory.
[0049] SaaS is a cloud computing service model that allows users to access and use software applications over the Internet without installing or maintaining these applications on local computers. SaaS providers are responsible for hosting, maintaining, updating, and security of the software, and users usually pay on a subscription basis, billed based on the length of time or usage. This model reduces users' upfront investment costs, simplifies IT management, and makes it easier for users to access applications anytime, anywhere. Common SaaS applications include CRM systems (such as Salesforce), office software (such as Google Workspace), financial management tools (such as QuickBooksOnline), etc.
[0050] FaaS is another cloud computing service model that allows developers to upload code snippets (usually called "functions") to the cloud platform without having to worry about the configuration and management of the underlying infrastructure. These functions are automatically executed when triggered by specific events (such as HTTP requests, file uploads, scheduled tasks, etc.), and then scaled and billed on demand without the need for continuously running servers. The FaaS model is very suitable for event-driven, short-running tasks, which can significantly reduce operating costs and accelerate the development and deployment cycle. The main FaaS platforms include AWS Lambda, Google Cloud Functions, Azure Functions, etc.
[0051] SaaS focuses on providing users with complete software application functions and services. Users do not need to worry about the underlying software, hardware maintenance, and upgrades of the application. Users use these software services through subscription or pay-as-you-go methods, and focus on whether the software functions meet their business needs rather than the software's operating environment. FaaS focuses on smaller-granularity computing units in the software - functions. Users only need to write and upload code functions of specific functions to the cloud platform, without having to worry about the specific environment (operating system, server, etc.) in which the functions run. The FaaS platform automatically manages and optimizes the running resources of the function, and charges according to the actual number of executions or resource consumption of the function. Therefore, it can be said that in the FaaS model, developers mainly focus on the function logic itself, and pay less attention to the specific software stack that the function runs, because these are transparently handled by the FaaS platform.
[0052] In the early days, SaaS and FaaS were more suitable for service-oriented architecture (SOA). SOA provides a structured approach to designing software applications and decomposing them into interoperable services. These services usually communicate over the network using heavier protocols such as SOAP (Simple Object Access Protocol). SOA is very popular in enterprise-level systems because it supports powerful transaction management and complex business logic integration.
[0053] Over time, the widespread adoption of cloud computing and the development of containerization technology have promoted the popularity of microservice architecture. Microservice architecture provides a finer-grained service division than SOA. Each microservice is usually built around a specific business function and can be independently deployed, expanded, and updated. For SaaS and FaaS, microservice architecture can provide more flexibility and scalability. They can use the independence of microservices to optimize the performance and resource usage of different services and respond to market changes and customer needs more quickly. For example, FaaS, as part of the microservice architecture, can be used to handle specific functions such as image processing or real-time data analysis without the participation of other parts of the entire application. Modern cloud application development is increasingly inclined to use microservices because they can provide better performance and fault isolation in multi-cloud and distributed environments. As part of microservices, SaaS and FaaS services can better take advantage of the dynamic expansion and elasticity capabilities provided by cloud platforms.
[0054] In a microservice architecture, applications are often split into many small, independent services, each responsible for a specific function. Container technology is very suitable for this microservice architecture because they allow each microservice and its dependencies to be packaged into a lightweight, portable container for independent development, testing and deployment. Docker is the representative of container technology. With the popularity of Docker, the number of containerized applications has continued to increase, forming a container cluster (multiple Docker hosts are organized into a cluster, which is different from the concept of a server cluster). People began to need an effective way to manage such container clusters. So, in 2014, Google launched the Kubernetes (k8s for short) project. Kubernetes is an open source container orchestration platform for automated, containerized application deployment, expansion and management. With Kubernetes, developers can achieve distributed management of containers, as well as functions such as high availability, load balancing and fault recovery. It can be said that Docker simplifies the process of creating and running containers, while Kubernetes manages the life cycle and interaction of these containers to ensure the health and performance of the entire system. This transition from containers to container clusters is key to modern application deployment, especially in multi-cloud and large-scale distributed environments.
[0055] Kubernetes was first widely used in the fields of IaaS (Infrastructure as a Service) and PaaS (Platform as a Service), and was then gradually introduced into the fields of SaaS and FaaS due to its powerful container management capabilities to support a wider range of cloud-native applications and service architectures.
[0056] 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 the task is not affected by the external environment. The container group (Pod) is the smallest deployable unit in Kubernetes. A Pod can contain an application container (in some cases, multiple containers), storage resources, a unique network IP address, and some options to determine how the container runs. Pod represents an independent application running instance in Kubernetes, which may consist of a single container or several tightly coupled containers. Docker is the most widely used container engine in Kubernetes Pod; Kubernetes Pod also supports other types of container engines.
[0057] TEE can be run in a Pod, that is, a Pod running an Enclave can be started in a Kubernetes environment. When deploying containers running Enclave in Kubernetes, these containers usually rely on underlying hardware support, such as Intel SGX or AMD SEV. These TEE containers need to load a specific image, which includes all the software and libraries required for operation, including an operating system and applications compatible with TEE technology. Operating systems such as LibOS (Library Operating System). LibOS can provide operating system functions in the form of libraries. The characteristics of LibOS include: (1) Compared with traditional operating systems, LibOS are usually lighter because they only provide the core functions required by applications and avoid unnecessary complexity. (2) LibOS can be customized and optimized for specific application scenarios to provide more efficient operating system support. (3) Because LibOS exist in the form of libraries, they can be easily deployed and used in different environments and are highly portable.
[0058] To run a lightweight, secure LibOS such as Occlum in TEE, Occlum needs to be pre-installed in the image. Occlum is a library operating system designed specifically to create and execute secure isolated execution environments in the Intel SGX environment, and can leverage the hardware features of SGX to provide additional security.
[0059] When deploying such a TEE container, you generally need to make the following preparations:
[0060] 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.
[0061] Hardware dependency: Before starting this TEE container, make sure that the physical server of the Kubernetes cluster supports and enables the corresponding hardware extensions (such as Intel SGX).
[0062] Kubernetes support: Kubernetes 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.
[0063] Security and isolation: The hardware-level security isolation provided by TEE needs to be properly reflected in the Kubernetes configuration to ensure isolation between containers and between containers and the host.
[0064] Starting such a TEE container generally involves the following steps:
[0065] Define Pod configuration: First, you need to create a YAML configuration file to define the Pod's specifications, 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 that are compatible with TEE (such as Occlum running in Intel SGX).
[0066] Deploy Pod: Use the kubectl apply-f <configuration file> command to submit the Pod configuration to the Kubernetes cluster. The Kubernetes scheduler will decide on which worker node to deploy the Pod based on the Pod's requirements and the cluster's resource status.
[0067] Pull container image: After the Pod is deployed, Kubernetes pulls the specified container image through the container runtime (such as Docker) on the selected worker node. For TEE containers, the image generally needs to contain the necessary TEE support and configuration.
[0068] Start the container: After the container image is successfully pulled, Kubernetes uses the container runtime to start the container on the worker node. This step initializes the operating system in the container and prepares to execute user-defined applications.
[0069] Start the TEE operating system:
[0070] In the case of a TEE container, a specific operating system or library operating system (such as Occlum) that is compatible with TEE technology (such as Intel SGX) is started inside the container. This is usually done automatically through a container startup script that configures and starts all necessary TEE components.
[0071] 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.
[0072] Monitoring and management: Kubernetes continues to monitor and manage running Pods and containers, including resource usage, health checks, automatic recovery, and other functions.
[0073] In this process, TEE startup and management involve Kubernetes 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 Kubernetes plug-ins to support these operations.
[0074] Through the combination of the above-mentioned TEE and K8s, a trusted task execution platform can be provided for the user programs to be run. For example, the distributed computing architecture BigDL PPML, which is commonly used in the fields of big data and artificial intelligence (AI), can be combined to execute privacy-preserving machine learning solutions, allowing conventional, standard big data and AI solutions to run in a secure environment.
[0075] Deploying big data computing (such as Apache Spark) on the cloud can bring many advantages, making cloud computing an ideal environment for big data projects. Here are a few key reasons:
[0076] 1. Elastic expansion
[0077] Cloud platforms provide unparalleled elasticity and scalability. For big data processing, it is extremely important to be able to dynamically increase or decrease resources based on data volume and computing needs. This elasticity allows resources to be quickly expanded during data peaks and reduced accordingly when demand decreases, thereby optimizing cost efficiency.
[0078] 2. Cost-effectiveness
[0079] Running big data applications such as Spark on a cloud platform is often more cost-effective than on-premises or in a dedicated data center. Cloud services are usually pay-as-you-go, which means you only pay for the resources you actually use. In addition, there is no need to invest in expensive hardware and maintain infrastructure, which can save a lot of money in the long run.
[0080] 3. Easy to manage and maintain
[0081] Cloud service providers usually assume the responsibility for hardware and network maintenance, reducing the operational complexity of enterprises. In addition, many cloud platforms provide tools and services to simplify the deployment and monitoring of data management and analysis applications, such as automated data backup, recovery, and optimized resource allocation.
[0082] 4. Data integration and storage
[0083] Cloud platforms offer a wide range of data storage solutions that can handle both structured and unstructured data. This flexibility is critical for big data applications, as they often need to collect and process data from multiple sources. Cloud platforms make it easy to consolidate this data in a centralized location for easy access and analysis.
[0084] 5. Global accessibility
[0085] Another important advantage of cloud services is that they can provide global access. For multinational companies, being able to access data and computing resources from any location is essential to maintaining business continuity and implementing global strategies. Through the cloud platform, data and applications can cross geographical and political boundaries, ensuring collaboration and data sharing among global teams.
[0086] 6. Innovation and technology integration
[0087] Cloud platforms are often the first place to adopt and integrate new technologies, such as artificial intelligence, machine learning, and advanced data analysis tools. Deploying big data applications to the cloud makes it easier for companies to use these advanced technologies to enhance data processing capabilities and insights.
[0088] 7. Security and Compliance
[0089] Despite early security concerns, many cloud service providers now offer advanced security measures such as encryption, access controls, and continuous security monitoring to ensure data is safe and in compliance with various regulatory requirements.
[0090] In summary, deploying big data computing applications such as Spark on the cloud can bring multiple advantages such as elasticity, cost-effectiveness, easy management, data integration and security, enabling enterprises to process and utilize big data more effectively.
[0091] In actual applications, 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, data registration and authorization, etc. Figure 1 In the K8s platform, you can create multiple containers, each of which runs an application instance. Then, through the built-in load balancing strategy, you can manage, discover, and access this group of application instances. These details do not require the operation and maintenance personnel to perform complex manual configuration and processing.
[0092] The K8s platform covers the Kubernetes cluster and all its supporting tools and services, aiming to provide a complete containerized application management and operation environment. Tools and services are used to deploy, monitor, manage and expand Kubernetes clusters and applications; for example, Helm (package management tool), Prometheus (monitoring system), Istio (service mesh), etc.
[0093] Among them, K8s cluster architecture and related core components such as Figure 2As shown: A Kubernetes cluster generally contains 1 master node (Master) and multiple working nodes (Working Node). A working node can be a physical machine or a virtual machine. The master node (Master) is the cluster control node of k8s. Each k8s cluster can be managed and controlled by a Master. The working node in the k8s cluster is the workload node in the k8s cluster. The working node can be assigned some workload by the Master; when a working node goes down, the workload on it will be automatically transferred to other working nodes by the master node.
[0094] The kubelet component runs on each worker node. The kubelet component is the agent of the master node on the worker node. It works closely with the master node to manage the life cycle of the local running container, and is responsible for tasks such as creating, starting and stopping the container corresponding to the Pod, and realizing the basic functions of cluster management. Pod is the smallest deployment unit in k8s, a collection of a group of containers, and also the basic unit for k8s to perform service orchestration and scaling.
[0095] Worker nodes can be dynamically added to the k8s cluster during operation, provided that some key components including the above-mentioned kubelet component have been correctly installed, configured, and started on the worker node. By default, the kubelet component will register itself with the master node. Once the worker node is included in the cluster management scope, the kubelet component will regularly report its own situation to the master node, such as the operating system, Docker version, CPU and memory of the machine, and which Pods were running before, so that the master node can know the resource usage of each worker node and implement an efficient and balanced resource scheduling strategy. If a worker node fails to report information for more than the specified time, it will be judged as "lost connection" by the master node, and the status of the worker node will be marked as unavailable (Not Ready). Then the master node will trigger the automatic process of "large workload transfer".
[0096] In addition, the worker node also has a kube-proxy component, which is used to implement the network proxy of the Pod on the worker node, realize the communication between the Kubernetes Service and the outside, and maintain the network rules and the four-layer load balancing work. The Kubernetes Service is located between the kube-proxy component and the Pod, which defines an access entrance and exit for the service. The access between the internal Pod and the container (container engine, such as Docker) can be directly carried out through the service. Figure 2The relationship between the kube-proxy component, service (i.e., Kubernetes Service) and Pod is only for illustration. In fact, a service can correspond to multiple Pods, and a Pod can correspond to multiple services. The service can be created by k8s, and the relationship between the service and Pod can also be specified in the k8s master (not shown in the figure).
[0097] As mentioned earlier, Figure 2 The container engine used in the Pod can be Docker (container). Through the Docker image, the started Enclave can include all the software and libraries required for operation, thereby including an operating system (such as LibOS) and applications compatible with TEE technology. The LibOS can be Occlum, so the image can be an Enclave image built based on Occlum. In addition, the Enclave image can also include a program for executing big data computing, such as Spark, which can be executed on the basis of LibOS.
[0098] The Enclave can be a computing node, for example, used for the aforementioned big data computing. For a typical big data computing such as Spark, its overall structure can be as follows: Figure 3 shown.
[0099] Figure 3 In the Driver Program (driver), the function is to create SparkContext, which is responsible for executing the main function process in the user program (Driver Application) and interacting with the Spark cluster. By parsing the operation chain in the user program, the Driver Program can build it into a directed acyclic graph (DAG) to represent the dependencies and execution order of the tasks. Furthermore, the Driver Program can divide the DAG into multiple Stages based on the narrow dependencies (such as map, filter) and wide dependencies (such as reduceByKey, groupByKey) of the data. Narrow dependencies can be executed in parallel within a Stage, while wide dependencies need to be executed across Stages. Stages are logical units of parallel execution, and each Stage contains a set of Tasks (i.e. Figure 3 Tasks are the smallest parallel execution units, and each Task can run on an Executor.
[0100] See also Figure 3In a Spark cluster, there are Master nodes and Worker nodes. The Master node is usually the cluster manager component of the Spark cluster, and is not responsible for specific data processing. The Master node and the Worker node have different divisions of labor. The Master load manages the Worker nodes, while the Worker nodes are responsible for executing tasks. There are one or more Executor processes on each Worker node. Each Executor process has a thread pool, and each thread is responsible for the execution of a Task task. The Task task is the task of the Spark program that is specifically executed. Depending on the number of CPU cores on the Executor, up to the same number of Tasks as the number of CPU cores can be executed in parallel.
[0101] After submitting a Spark job code, the job will start a corresponding Driver Program process. The Driver Program process requests the Master node for the resources needed to run the Spark job, which refers to the Executor process. The Master node will start a certain number of Executor processes on each worker node based on the resource parameters set for the Spark job. Each Executor process occupies a certain amount of memory and CPU cores.
[0102] After applying for the resources required for job execution, the Driver Program process will start scheduling and executing the submitted Spark job code. The Driver Program process will split the Spark job code into multiple stages, each stage will execute a part of the code snippet, and create a batch of Tasks for each stage, and then assign these Tasks to each Executor process for execution. Task is the smallest computing unit, which can execute the same computing logic (that is, a code snippet in the written Spark job code), but the data processed by each Task may be different. After all Tasks of a stage are executed, the intermediate results of the calculation can be written to the local disk files of each node, and then the Driver Program will schedule the next stage. The input data of the Tasks of the next stage is the intermediate result output by the previous stage. This cycle repeats until all the written code logic is executed, all the data is calculated, and the results are obtained.
[0103] The execution speed of the Task is directly related to the number of CPU cores of each Executor process. A CPU core can only execute one thread at a time. The multiple Tasks assigned to each Executor process are executed in a manner where each Task corresponds to one thread. If the number of CPU cores is limited, these Task threads can usually be executed concurrently; if the number of CPU cores is sufficient, these Task threads can usually be executed in parallel. For example, in a Kubernetes cluster, the Pod in the working node can deploy containers for executing subtasks in big data computing tasks that require privacy protection, such as an Enclave container deployed in a Pod to execute a task in a Spark computing task that requires privacy protection. Figure 2 shown.
[0104] For example, the relationship between the management platform, K8s cluster, and Spark computing tasks that require privacy protection is as follows: Figure 4 As shown, after receiving the Spark computing task, the management platform can submit the Spark computing task to the K8s platform for execution. For example, the Spark computing task can be submitted to the master node in the K8s platform, and then the master node can create multiple Pods for the Spark computing task in the working node of the K8s platform, each Pod includes at least one Enclave container (that is, a container running the Enclave), and the Enclave container can run the operating system LibOS (Library Operating System); wherein, the driver program and the Master node in the Spark cluster can be run on the basis of the LibOS run by the Enclave container of one of the multiple Pods created, and the Executor program in the Spark cluster can be run on the basis of the LibOS run by the Enclave containers of other Pods in the multiple Pods created, thereby realizing the execution of Spark computing tasks that require privacy protection based on the created multiple Pods.
[0105] Based on the problem in the related art that the encrypted memory with fixed allocated capacity may exceed the remaining available EPC size and cause allocation failure, the embodiment of this specification provides a privacy computing task scheduling method, which is applied to Figure 1 and 4The management platform shown in the figure is connected to a server cluster for executing privacy computing tasks. Each server in the server cluster is respectively equipped with a trusted execution environment for executing privacy computing tasks. The trusted execution environment includes an encrypted memory for securely protecting the computing data related to the privacy computing tasks. For example, the server cluster can be as follows: Figure 2 The K8s cluster shown in the figure. The privacy computing task can be the above-mentioned spark big data computing task that requires privacy protection.
[0106] See also Figure 5 ,The privacy computing task scheduling method includes:
[0107] In S501, the expected total capacity of the encrypted memory required to perform the privacy computing task is determined.
[0108] For example, a user may submit a privacy computing task to the management platform, and the management platform may analyze and evaluate the privacy computing task to determine the expected total capacity of encrypted memory required to perform the privacy computing task.
[0109] Exemplarily, after receiving a privacy computing task, the management platform can initialize the configuration of the server cluster based on the execution requirements of the privacy computing task. For example, if the privacy computing task is a spark big data computing task, it is necessary to initialize the configuration of the driver program and executor program in the spark in the server cluster. The initialization configuration process includes the encrypted memory configuration during the driver program runtime, the encrypted memory configuration during the executor program runtime, the maximum heap configuration required for the driver program and executor program runtime, and the kernel-related static memory configuration of LibOS during runtime.
[0110] Among them, the encrypted memory configuration during the operation of the driver and executor programs refers to the configuration of the encrypted content required for the operation of these programs themselves. The encrypted memory configuration during the driver's operation refers to the allocation of encrypted memory areas for the driver itself and the sensitive data that needs to be processed during its operation. For example, a secure memory area is designated for the operation of the driver to ensure that the data is encrypted in the memory. Similar to the driver, the executor program also needs encrypted memory configuration to ensure its normal operation, thereby protecting the security of the data used in the process of executing computing tasks.
[0111] The maximum heap configuration required when the driver is running refers to the maximum available heap memory allocated to the driver, thereby ensuring that the driver has sufficient memory resources to handle big data computing tasks and improve computing efficiency and stability.
[0112] The maximum heap configuration required when the executor program is running is the maximum available heap memory allocated to each executor program, ensuring that the executor has sufficient memory when processing distributed computing tasks, improving the task parallel processing capability and efficiency.
[0113] The kernel-related static memory configuration of the runtime LibOS refers to the static memory resources allocated and configured for the runtime LibOS kernel, ensuring that the LibOS can run stably in the TEE environment and provide support for upper-layer applications (such as executive programs and driver programs).
[0114] By initializing the configuration, you can ensure that all required resources and environments are correctly set up and prepared. This includes encrypted memory configuration, heap configuration, etc. This ensures that the server cluster is in a known stable state and avoids errors caused by non-configuration or improper configuration during task execution. Before obtaining the remaining total capacity of the encrypted memory contained in the trusted execution environment on the servers in the server cluster, initializing the configuration first can eliminate evaluation errors caused by the server cluster not being configured properly. For example, if the encrypted memory configuration of the driver and executor programs is not initialized during runtime, the remaining total capacity of the encrypted memory obtained may be inaccurate, which in turn affects the decision.
[0115] In S502, the monitoring plug-in set in the server cluster is used to obtain the remaining total capacity of the encrypted memory included in the trusted execution environment installed on the server in the server cluster.
[0116] Exemplarily, the operating system kernel of each server in the server cluster maintains a variable value for recording the remaining capacity of the encrypted memory contained in the trusted execution environment carried on each server; the variable value is used to describe the number of free encrypted memory pages in the server, and the free encrypted memory capacity in the server can be determined by preset calculation rules and the number of free encrypted memory pages in the server. For example, the product of the number of pages and a preset value (such as 4KB or 8KB) is the free encrypted memory capacity.
[0117] The management platform can utilize the monitoring plug-in set in the server cluster to monitor the variable value of the remaining capacity of the encrypted memory contained in the trusted execution environment carried on each server recorded by the operating system kernel of each server in the server cluster, and determine the remaining total capacity of the encrypted memory contained in the trusted execution environment carried on the servers in the server cluster based on the variable value of the remaining capacity of the encrypted memory contained in the trusted execution environment carried on each server recorded. Exemplarily, the monitoring plug-in can call a preset encrypted memory query interface to realize the variable value of the remaining capacity of the encrypted memory contained in the trusted execution environment carried on each server recorded by the operating system kernel of each server in the server cluster. In this embodiment, the preset encrypted memory query interface provides a convenient and simplified way to obtain the remaining capacity information of the encrypted memory, and the monitoring plug-in does not need to implement complex query logic by itself, which is conducive to reducing the development workload of developers.
[0118] Kernel state and user state are two special operating modes in the operating system, which are usually isolated from each other. (1) In kernel state, the operating system has full access to system hardware and resources. In this mode, the operating system can execute privileged instructions, directly access hardware devices and system resources, and manage core functions such as processes, memory, and file systems. Only in kernel state can some sensitive operations be performed, such as modifying memory mapping, changing hardware status, etc. (2) Applications in user state can only access restricted resources and instruction sets, and cannot directly access system hardware or execute privileged instructions. In this mode, applications can only request services provided by the operating system through system calls to perform privileged operations, such as file operations and network communications.
[0119] For example, see Figure 6Considering that the access rights of applications in user mode are limited, it is impossible to directly obtain the variable value maintained by the operating system kernel of each server for recording the remaining capacity of the encrypted memory contained in the trusted execution environment installed on each server. Therefore, this embodiment implements setting the above-mentioned monitoring plug-in in the operating system kernel of the designated server in the server cluster, and the monitoring plug-in can monitor the variable value of the remaining capacity of the encrypted memory contained in the trusted execution environment installed on each server recorded by the operating system kernel of each server in the server cluster; and then determine the remaining total capacity of the encrypted memory contained in the trusted execution environment installed on the servers in the server cluster based on the variable value of the remaining capacity of the encrypted memory contained in the trusted execution environment installed on each server recorded by the operating system kernel of each server, and then the monitoring plug-in can record the remaining total capacity of the encrypted memory contained in the trusted execution environment installed on the servers in the determined server cluster into the preset user state file in the operating system installed on the designated server; and then the management platform can read the remaining total capacity of the encrypted memory contained in the trusted execution environment installed on the servers in the server cluster from the user state file.
[0120] Among them, the designated server in the server cluster can be any server in the server cluster. For example, in a K8s cluster, the designated server can be the master node in the K8s cluster, or it can be any working node in the K8s cluster. The working node can communicate with other working nodes directly or with the help of the master node.
[0121] In summary, this embodiment takes into account the fact that the kernel state and the user state are isolated from each other to a certain extent and the access rights of applications in the user state are limited, and implements the setting of a monitoring plug-in in the kernel state of the operating system of the specified server, so as to obtain the variable value maintained by the operating system kernel of each server for recording the remaining capacity of the encrypted memory contained in the trusted execution environment installed on each server, and records the remaining total capacity of the encrypted memory contained in the trusted execution environment installed on all servers in the server cluster into the user state file, thereby providing an accurate basis for subsequent processing.
[0122] In S503, in response to the remaining total capacity being not less than the expected total capacity, the privacy computing task is sent to the server cluster to execute the privacy computing task in the server cluster.
[0123] Exemplarily, after obtaining the remaining total capacity of the encrypted memory contained in the trusted execution environment on the servers in the server cluster, the management platform can compare the remaining total capacity with the expected total capacity of the encrypted memory required to execute the privacy computing task. If the remaining total capacity is not less than the expected total capacity, it is determined that the privacy computing task can be executed in the server cluster. This embodiment implements the issuance of the privacy computing task only when the remaining encrypted memory capacity is not less than the expected total capacity, thereby ensuring that the privacy computing task has sufficient encrypted memory resources to execute, thereby avoiding task failure and instability due to insufficient encrypted memory resources.
[0124] After determining that the privacy computing task can be executed in the server cluster, the privacy computing task can be further divided into several subtasks, and the expected capacity of the encrypted memory required by each subtask included in the privacy computing task can be determined. For example, the subtasks included in the privacy computing task can be Figure 3 The Task task shown is running in the executor.
[0125] For example, for each subtask included in a privacy computing task, the expected capacity of the encrypted memory required to execute the subtask can be calculated based on factors such as the amount of data of the subtask and the computational complexity of the subtask; for example, the larger the amount of data of the subtask, the larger the expected capacity of the encrypted memory required to execute the subtask; for another example, the larger the computational complexity of the subtask, the larger the expected capacity of the encrypted memory required to execute the subtask.
[0126] It is understandable that the embodiments of this specification do not impose any restrictions on the number of subtasks included in the privacy computing task, and specific settings can be made based on the actual application scenario.
[0127] Exemplarily, the number of subtasks can be specified by the user; the subtasks included in the privacy computing task can be obtained by dividing the privacy computing task according to the number of subtasks specified by the user.
[0128] Exemplarily, the number of subtasks can be obtained by querying the correspondence between the data volume of the privacy computing task and the number of subtasks based on the data volume of the privacy computing task; for example, the management platform can divide the privacy computing task into a corresponding number of subtasks according to the number of subtasks obtained by querying.
[0129] Exemplarily, the number of subtasks can also be determined based on the processing time specified by the user for the privacy computing task, and the number of subtasks is negatively correlated with the processing time specified by the user for the privacy computing task. That is, the shorter the processing time specified by the user for the privacy computing task, the more subtasks the privacy computing task needs to be divided into, so that more subtasks can be executed in parallel, thereby improving the parallelism of the subtasks to shorten the processing time, and vice versa.
[0130] In the case where it is determined that the remaining total capacity of the encrypted content in the server cluster is not less than the expected total capacity of the encrypted memory required to perform the privacy computing task, the management platform can determine the expected capacity of the encrypted memory required for each subtask included in the privacy computing task, and determine the total number of computing nodes to be created based on the expected total capacity and the expected capacity of the encrypted memory required for each subtask included in the privacy computing task, and then send the total number of computing nodes to be created and the privacy computing task to the server cluster, so that the server cluster creates computing nodes according to the total number of creations to perform the subtasks included in the privacy computing task. In this embodiment, before the task is issued, the expected total capacity of the encrypted memory required to perform the privacy computing task is determined, and by accurately evaluating the resources required for the task, when the remaining total capacity of the encrypted memory in the server cluster is not less than the above-mentioned expected total capacity, the encrypted memory resources can be flexibly allocated according to the task requirements (that is, the expected total capacity of the encrypted memory required to perform the privacy computing task), and then the computing nodes can be elastically expanded or reduced according to the expected total capacity of the task and the expected capacity of the subtasks, thereby enhancing the ability of the server cluster to cope with load changes.
[0131] For example, the computing node can be a Pod in a K8s cluster. For example, using a cluster management tool such as Kubernetes (K8s), the number of Pods can be easily expanded when needed to allocate more computing resources.
[0132] In some embodiments, the processing amount of the subtasks processed in each computing node may be one or more, and may be specifically set according to the actual application scenario. For example, the subtask processing amount of the computing node may be determined based on the expected capacity of the encrypted memory required to execute the subtask. For example, the larger the expected capacity, the smaller the subtask processing amount preconfigured for the computing node to be created, and the two are negatively correlated, and vice versa.
[0133] Before the management platform determines the total number of computing nodes to be created based on the expected total capacity of encrypted memory required for executing privacy computing tasks and the expected capacity of encrypted memory required for executing each subtask included in the privacy computing task, it is necessary to first obtain the preconfigured subtask processing capacity for the computing nodes to be created, and then the total number of computing nodes to be created can be determined based on the expected total capacity of encrypted memory required for executing privacy computing tasks, the expected capacity of encrypted memory required for executing each subtask included in the privacy computing task, and the preconfigured subtask processing capacity. In this embodiment, by predetermining the preconfigured subtask processing capacity of each computing node and combining it with the expected capacity of encrypted memory required for executing each subtask, the encrypted memory capacity required for each computing node to be created can be more accurately evaluated, and then by comprehensively considering the expected total capacity of encrypted memory required for executing privacy computing tasks and the encrypted memory capacity required for each computing node, it can be determined how many computing nodes are needed to process the privacy computing task, so as to make full use of the resources of the server cluster.
[0134] Exemplarily, considering that a certain amount of encrypted memory is also required to run computing nodes, before the management platform determines the total number of computing nodes to be created based on the expected total capacity of the encrypted memory required to execute the privacy computing task and the expected capacity of the encrypted memory required to execute each subtask included in the privacy computing task, it also needs to obtain the initial encrypted memory pre-configured for the computing node to be created for running the computing node; then, based on the expected capacity of the encrypted memory required to execute each subtask included in the privacy computing task, the subtask processing volume and the initial encrypted memory, the total amount of encrypted memory required for the computing node to be created can be determined; finally, based on the expected total capacity of the encrypted memory required to execute the privacy computing task and the total amount of encrypted memory required for the computing node to be created, the total number of computing nodes to be created can be determined. This embodiment accurately calculates the total amount of encrypted memory required for the computing nodes to be created by considering the expected capacity of the encrypted memory required to execute subtasks, the subtask processing capacity preconfigured for the computing nodes, and the initial encrypted memory. This allows the total number of computing nodes to be created to be determined more accurately to meet the processing requirements of the privacy computing tasks. By accurately estimating the total amount of encrypted memory required for the computing nodes to be created, it can ensure that each computing node to be created has sufficient resources to execute subtasks, and avoid performance degradation or abnormal termination of computing nodes due to insufficient memory, thereby improving the stability and performance of the server cluster.
[0135] For example, the total amount of encrypted memory required for the computing nodes to be created can be the product of the expected capacity and the subtask processing capacity, and the sum of the initial encrypted memory; the total number of computing nodes to be created is the quotient of the expected total capacity of the encrypted memory required to perform the privacy computing task and the total amount of encrypted memory required for the computing nodes to be created.
[0136] Assume that the expected capacity of the encrypted memory required to execute the subtask is a, the subtask processing capacity preconfigured for the computing node to be created is b, the initial encrypted memory preconfigured for the computing node to be created is c, the total number of computing nodes to be created is d, and the expected total capacity of the encrypted memory required to execute the privacy computing task is e. Then the total number of computing nodes to be created is
[0137] Exemplarily, the computing nodes to be created can be deployed in each server in the server cluster. The management platform can send the total number of computing nodes created and the privacy computing task to the server cluster (such as the K8s cluster), and then the target server in the server cluster (such as the master node in the K8s cluster) determines the number of computing nodes to be created on each other server according to the total number of computing nodes created and the load of other servers in the server cluster (such as the working nodes in the K8s cluster). The computing nodes are reasonably allocated to each other server to achieve load balancing; each server can run multiple computing nodes at the same time to execute the subtasks included in the privacy computing task, thereby speeding up the execution of the privacy computing task. After the computing nodes are created, each computing node can execute the subtasks included in the privacy computing task in parallel to improve the efficiency of task execution.
[0138] The various technical features in the above embodiments can be arbitrarily combined as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they are not described one by one. Therefore, any combination of the various technical features in the above embodiments also falls within the scope of this specification.
[0139] In some embodiments, the embodiments of this specification also provide an electronic device, including: a processor; a memory for storing processor executable instructions; wherein the processor implements any of the above methods by running the executable instructions.
[0140] Figure 7 is a schematic structural diagram of an electronic device provided by an exemplary embodiment. Figure 7At the hardware level, the device includes a processor 702, an internal bus 704, a network interface 707, a memory 708, and a non-volatile memory 710, and may also include hardware required for other scenarios. One or more embodiments of this specification can be implemented based on software, such as the processor 702 reading the corresponding computer program from the non-volatile memory 710 into the memory 708 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0141] In some embodiments, the embodiments of this specification further provide a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, the steps of any of the methods described above are implemented.
[0142] In some embodiments, the embodiments of this specification also provide a computer program product, including a computer program, which implements the steps of any of the methods described above when executed by a processor.
[0143] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0144] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0145] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0146] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0147] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0148] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0149] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0150] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0151] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0152] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.
Claims
1. A privacy computing task scheduling method, characterized in that: The method is applied to a management platform, the management platform is connected to a server cluster for executing the privacy computing task, and each server in the server cluster is respectively equipped with a trusted execution environment for executing the privacy computing task, and the trusted execution environment includes an encrypted memory for securely protecting the computing data related to the privacy computing task; the method comprises: Determining the expected total capacity of encrypted memory required to perform the privacy computing task; Using a monitoring plug-in set in the server cluster, obtaining the remaining total capacity of the encrypted memory included in the trusted execution environment installed on the server in the server cluster; In response to the remaining total capacity being not less than the expected total capacity, the privacy computing task is sent to the server cluster to execute the privacy computing task in the server cluster.
2. The method according to claim 1, characterized in that The operating system kernel of each server in the server cluster maintains a variable value for recording the remaining capacity of the encrypted memory included in the trusted execution environment carried by each server; the variable value is used to describe the number of pages of free encrypted memory; The obtaining, by using the monitoring plug-in set in the server cluster, the remaining total capacity of the encrypted memory included in the trusted execution environment carried by the server in the server cluster includes: Using a monitoring plug-in set in the server cluster, the variable value of the remaining capacity of the encrypted memory contained in the trusted execution environment installed on each server in the server cluster is monitored by the operating system kernel of each server in the server cluster, and the remaining total capacity of the encrypted memory contained in the trusted execution environment installed on the servers in the server cluster is determined based on the recorded variable value of the remaining capacity of the encrypted memory contained in the trusted execution environment installed on each server.
3. The method according to claim 2, characterized in that The monitoring plug-in is set in the operating system kernel of the designated server in the server cluster; the monitoring plug-in is also used to record the remaining total capacity of the encrypted memory included in the trusted execution environment installed on the server in the determined server cluster into a user state file preset in the operating system installed on the designated server; The method of using the monitoring plug-in set in the server cluster to obtain the remaining total capacity of the encrypted memory included in the trusted execution environment carried by the server in the server cluster also includes: The remaining total capacity of the encrypted memory included in the trusted execution environment carried by the server in the server cluster is read from the user state file.
4. The method according to claim 1, characterized in that: Also includes: In response to the remaining total capacity being not less than the expected total capacity, the expected capacity of the encrypted memory required for each subtask included in the privacy computing task is determined, and the total creation number of computing nodes to be created is determined based on the expected total capacity and the expected capacity of the encrypted memory required for each subtask included in the privacy computing task, and the total creation number is sent to the server cluster so that the server calculates and creates computing nodes according to the total creation number to execute the subtasks included in the privacy computing task.
5. The method according to claim 4, characterized in that The determining the total number of computing nodes to be created includes: Get the subtask processing capacity preconfigured for the computing node to be created; The total number of computing nodes to be created is determined based on the expected total capacity, the expected capacity of the encrypted memory required to execute each subtask included in the privacy computing task, and the subtask processing volume.
6. The method according to claim 5, characterized in that The determining the total number of computing nodes to be created includes: Get the initial encrypted memory pre-configured for the compute node to be created; Determine the total amount of encrypted memory required for the computing node to be created according to the expected capacity of the encrypted memory required to execute each subtask included in the privacy computing task, the subtask processing volume, and the initial encrypted memory; The total number of computing nodes to be created is determined based on the expected total capacity and the total amount of encrypted memory required by the computing nodes to be created.
7. The method according to claim 6, characterized in that The total amount of encrypted memory required by the computing node to be created is the product of the expected capacity and the subtask processing amount, and the sum of the initial encrypted memory; The total number of computing nodes to be created is the quotient of the expected total capacity and the total amount of encrypted memory required by the computing nodes to be created.
8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 7 by running the executable instructions.
9. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Private data processing system based on trusted data space
CN119292797A
A privacy data processing system based on trusted data space
CN119292797B
Service management and reasoning service method and device, storage medium and program product
CN120434119A
