A multi-task implementation method for improving the performance of a confidential computing machine

By decomposing large computing tasks into multiple subtasks for parallel or serial processing in a TEE environment, the resource constraints in the TEE environment are solved, improving computing performance and efficiency, especially when multiple computing chips work together.

CN122471518APending Publication Date: 2026-07-28高泉
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
高泉
Filing Date
2023-02-03
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

In a Trusted Execution Environment (TEE), protected computing tasks suffer from performance degradation due to resource constraints, particularly memory and I/O bandwidth limitations, especially when handling large computing tasks.

Method used

Large computing tasks are decomposed into multiple subtasks before entering the TEE, and run separately in the TEE environment. Each subtask is an independent Trusted Execution Environment (TA) task. Through a multi-task coordination mechanism, task decomposition, communication and collaboration are completed, resources are allocated reasonably, and multiple computing chips are used to improve computing performance.

Benefits of technology

It enables large-scale computing tasks to be completed efficiently in a TEE environment, avoiding single-task resource limitations, improving computing performance and efficiency, and reducing memory read/write and encryption/decryption latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122471518A_ABST
    Figure CN122471518A_ABST
Patent Text Reader

Abstract

Confidential computation isolates a computing task to run in a secure environment to ensure data privacy; but it also limits the access and use of various resources and devices by the computing task, which is not conducive to large and complex tasks that require more resources and bandwidth. The present invention divides a large task into multiple sub-tasks and inputs them into a confidential computing environment as multiple tasks. Each task can access and use as many resources and bandwidth as the secure isolation environment allows, including processors, memory, internal and external communication channels, and encryption engines, etc., thereby speeding up the completion of the entire task. During the task decomposition process, certain principles and means are needed to ensure that the collaboration between multiple sub-tasks does not delay and drag, while minimizing communication and dependence between each other. Through the reasonable use and encryption protection of the internal communication channel, the necessary sub-task communication and collaboration are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information security technology, and in particular to methods and apparatus for securely running large computing tasks in a trusted isolated environment, thereby improving performance and efficiency while ensuring security. Background Technology

[0002] Trusted Execution Environments (TEEs) are the most important confidential computing technology, isolating each computational task in a protected runtime environment, ensuring that their input data and computation processes are unknown to the outside world. Major computing architecture and chip manufacturers offer hardware-based trusted TEE solutions, with specific technologies including the setup and separation of unprotected (insecure) and protected (secure) environments, remote attestation, memory isolation (e.g., memory enclave), memory encryption, and trusted I / O for accessing other devices. Individual computational tasks (TAs) can also reside within secure units such as containers and virtual machines. A fundamental principle is that each computational task's access to and use of computing resources and devices is individually isolated and protected.

[0003] Therefore, the resources available to each protected TEE computing task are limited by the TEE environment, and this is true for every TEE solution. Moreover, compared to unprotected computing tasks in an insecure world, their resource constraints are more severe due to the additional burden brought by various TEE isolation and security measures. For example, various TEE solutions allocate limited memory to TAs in the secure world. Some allocate static memory to each TA up to a maximum limit, while others dynamically allocate memory to each TA but set a limit on memory allocation in the secure world. These restrictions are generally much stronger than the constraints on computing tasks in the insecure world. Furthermore, since most TEEs support memory encryption for Task Agents (TAs) in the secure world, memory reads and writes during TA execution require encryption and decryption operations: reading encrypted data, decrypting it, performing calculations, and then encrypting the calculation results before writing them back to memory. When the data volume is large, frequent encryption and decryption operations are necessary. However, the capacity and number of encryption and decryption engines available for a single TA task in the secure world are limited, further exacerbating the memory bandwidth reduction caused by data encryption and decryption. In other words, the TEE's memory encryption mechanism can highlight memory limitations, slowing down the processing speed of CPUs and other computing chips, especially when a TA in a TEE's secure world needs to process large amounts of data. The I / O operations between the protected TA in the TEE and external devices also face performance bottlenecks. The bandwidth of the I / O channels is limited, and the number of I / O channels available for a single task is also limited. The secure channels also require encryption and decryption; this can lead to I / O congestion, causing CPUs and other computing chips to wait for I / O, reducing computational efficiency. When a task requires computational power exceeding the CPU's capabilities, other computing chips must be used to provide auxiliary computing power. When a partial computational operation of a Task Assignment (TA) is distributed from the secure world of a TEE to other computing chips externally (e.g., in other TEE environments), and when data is exchanged between the memories of both parties (e.g., their respective isolated encrypted memories), communication latency and task decomposition and coordination within the TEE pose significant challenges, impacting efficiency and security.

[0004] In summary, the computational resource requirements of security tasks within a TEE are often limited, unmet, or even detrimental to computational performance. When running large computational tasks within a TEE and placing them within a protected security environment, the massive demands on various resources lead to performance degradation, sometimes exceeding the single-task limitations of the TEE. This is not only because they utilize large amounts of input data and massive algorithmic models, but also because they rely on complex software tools. For example, in AI learning and inference, various tools help train model algorithms or support the deployment of inference models. These powerful software tools often have complex functions and are enormous in size, making them unsuitable for effective deployment as single tasks within a TEE environment.

[0005] The solution proposed in this invention is to decompose large and complex tasks into multiple subtasks before entering the secure world, and then deploy each subtask into a TEE environment as a separate Task Agent (TA) within a secure world. Simultaneously, a multi-task coordination mechanism independent of the TEE is established to handle task decomposition, sub-task communication, and collaboration. Multiple subtasks can each be deployed as a TA within a TEE's secure world, occupying isolated memory and other computing resources, while ensuring that each subtask's resource requirements are reasonable—for example, processing only data and performing only operations within limits. In this way, each subtask can be satisfied with available resources and completed efficiently. For instance, the total task can be rationally decomposed based on the memory usage and allocation limitations of a specific TEE, ensuring that each subtask meets its memory requirements within the TEE's secure world, while the entire task can utilize isolated memory exceeding the TEE's single-task limit. This multi-task mechanism guarantees that any computational task, regardless of its size, can be efficiently completed after being decomposed into multiple subtasks and deployed into the TEE environment, thus ensuring the overall computational performance of the task. When the entire task faces a memory read / write bottleneck, each of its sub-tasks can be set to receive and process only a portion of the input data and output only a portion of the computation results, using only the memory bandwidth and encryption / decryption engine of a secure world TA. In this way, even with memory encryption, each sub-task does not require a large memory read / write bandwidth or cause too much encryption / decryption latency.

[0006] For example, large tasks requiring significant computing power can be broken down into multiple sub-tasks, each deployed on different computing chips (CPU, GPU, NPU, XPU), thereby utilizing more processor power to support large-scale computing tasks and accelerate computation. In conjunction with TEE (Transmission Equipment) applications, a large task is decomposed into multiple tasks and deployed to the corresponding CPU and XPU TEE environments, increasing available computing power. While this large task could be submitted as a single task to the TEE within the CPU, and then the TEE would schedule XPU resources to dispatch computational subtasks to them, this would increase the management burden and security risks of the CPU and its TEE environment. For instance, the collaboration and communication (data exchange) between computing chips would become the responsibility of the CPU and its TEE, which would bear the security risks and implement control measures. A better approach is to complete the multi-task decomposition before entering the TEE. Each TEE sub-task only needs to complete the confidential computation of a single Task Assignment (TA). The collaborative interaction and communication security between sub-tasks can be decoupled outside the TEE, unrestricted by the isolation requirements of the TEE, offering greater flexibility and adaptability. In addition to auxiliary computing chips, computing tasks in the TEE secure world may also use other external devices and interact with them via I / O. When broken down into multiple subtasks, these accesses and interactions are distributed among the subtasks, which can alleviate the burden on individual tasks (bandwidth and waiting, etc.), which will not be elaborated on here.

[0007] Depending on the actual situation, when it is disassembled and placed into the secure world of TEE for isolation and protection, the decomposition and control of a general task can be completed at the following different levels. • The user submitting the computation task decomposes the task into multiple subtasks at the application layer (manually or with the help of auxiliary tools), defines the coordination and communication between them, and then submits it to the system implementation (compilation, interpretation, deployment). Users can also submit their overall tasks to a computing system (such as a cloud platform), where system tools break them down into subtasks and define and implement their collaboration and communication. The system tools used can be compilers or interpreters, which convert the overall task code into multiple executable programs, each completing a subtask; or other system programs (such as AI tools that contain and process data and models) that deliver data and algorithms to the TEE environment. • For a complete task that already has executable code, it can also be broken down into multiple subtasks using specific binary tools, and the coordination and communication between them can be achieved.

[0008] Depending on the overall task's computational flow, the pacing and communication requirements between the decomposed subtasks vary widely. The ideal decomposition is for each subtask to receive user-assigned input data, complete its partial computation, and output a final summarizing subtask. These subtasks do not need to communicate or share data through a TEE (Transmission Equipment). The final summarizing subtask then synthesizes the computational results of the preceding subtasks into the overall task's result. As shown in Figure 2, this decomposition is essentially a multi-task parallel mode, which not only reduces the resources required for each TEE task but also improves time efficiency in parallel processing. However, some overall tasks may consist of a series of sequential computations, with the results of previous computations serving as the basis for subsequent computations. In this case, the multiple decomposed subtasks can only run sequentially and in order. As shown in Figure 3, this sequential mode often does not improve overall time efficiency but can reduce the resources required for each TEE task. For example, large computational tasks that would otherwise require excessive isolated memory and cannot be placed in the TEE security world can be decomposed and then placed in the TEE security world to form multiple isolated and protected Tasks (TAs). Most overall tasks are actually a compromise between these two extremes, involving both parallel and sequential operations. The following principles should be followed in their decomposition. • Arrange as many parallel subtasks as possible, so that they can run concurrently without waiting for each other's computation. Minimize communication and data exchange between subtasks, and minimize dependencies and waiting between subtasks. • For some classic task algorithms, such as AI deep learning or top-tier scientific computing, ideal decomposition methods can be researched in advance and incorporated into the algorithm library for easy access at any time.

[0009] The multi-task mechanism of this invention differs from, but is not absolutely mutually exclusive with, MPC (multi-party computation). The motivation for task splitting in MPC is that multiple computational participants (data and algorithm model providers, etc.) distrust each other; to prevent privacy leaks, task splitting requires separating their data, which is often very complex; the coordination and communication between sub-tasks also need to prevent privacy leaks, thus becoming complex and inefficient; while privacy protection can be combined with TEE, it usually relies solely on cryptographic techniques. The motivation of this invention is to decompose a large task (even with only one computational participant) into multiple smaller tasks to occupy more computational resources, each isolated and protected within a TEE; the splitting strategy only needs to consider the logic and process of the task itself, making it relatively simple; the coordination and communication between multiple tasks only need to prevent information leakage to unrelated external parties, making it simple and efficient. Of course, when both motivations exist in the same application scenario, they can coexist under a task decomposition mechanism. However, the security requirements and implementation strategies of both parties need to be adjusted and integrated. For example, TEE and MPC can be used at the same time. The former protects each sub-task, while the latter provides protection between each sub-task. It is even possible to split tasks according to the requirements of MPC and realize inter-task communication, while using the method of this invention to allocate computing resources to each sub-task in TEE. Attached Figure Description Figure 1 - Multi-task implementation method for TEE confidential computing Figure 2 - Parallel Multitasking Figure 3 - Serial multitasking

Claims

1. A method for pre-decomposing a large, confidential computing task into multiple subtasks, and then running each subtask as a separate task (TA) within an isolated environment of the TEE secure world. Each subtask can utilize the maximum computing resources allowed by the TEE secure world, including memory capacity, memory access bandwidth, encryption / decryption engines, computing chips, and I / O channels and bandwidth, etc. These subtasks communicate as necessary, exchanging data and coordinating through encrypted channels to jointly complete the decomposed overall task. Task decomposition, communication and data exchange between subtasks, and divide-and-conquer and coordination among subtasks are all performed independently of the TEE, without increasing the burden or complexity of the TEE system. Even if the overall task originally exceeds the capacity of the TEE isolated environment, as long as it is decomposed into a sufficient number of subtasks, each of the resulting subtasks can be small enough to run within the TEE secure world.

2. Each subtask is a protected Task Assignment (TA) within the TEE's secure world, possessing dedicated isolated memory whose contents are further protected by encryption. Its input data, whether from the original input of the main task or the output of another subtask, is also encrypted, only being decrypted into plaintext during computation once it enters the isolated protected area within the TEE. Its output data, whether passed to another subtask as its input or constituting the final output of the main task, is also encrypted. A fundamental principle of main task decomposition is to minimize communication and data exchange between subtasks, and to minimize dependencies and waiting between them, thus simplifying the management and control of subtasks. Simultaneously, it aims to allow subtasks to maintain parallel rather than serial synchronization relationships, improving concurrency efficiency and accelerating the main task's execution. For some classic task algorithms, such as AI deep learning or top-tier scientific computing, ideal decomposition methods can be pre-researched and incorporated into the algorithm library for easy access.

3. The decomposition and control of a general task, independent of the TEE system, can be accomplished at the following different levels: • The user submitting the computation task decomposes the task into multiple subtasks at the application layer (manually or using auxiliary tools), defines their coordination and communication, and then submits it to the system implementation (compilation, interpretation, deployment). Users can also submit their overall tasks to a computing system (such as a cloud platform), where system tools break them down into subtasks and define and implement their collaboration and communication. The system tools used can be compilers or interpreters, which convert the overall task code into multiple executable programs, each completing a subtask; or other system programs (such as AI tools that contain and process data and models) that deliver data and algorithms to the TEE environment. • For a complete task that already has executable code, it can also be broken down into multiple subtasks using specific binary tools, and the coordination and communication between them can be achieved.