Data management method and device and computing equipment

By dividing data tasks into sub-data and caching them in TEE or REE memory first, the problems of TEE memory resource shortage and data overflow are solved, and the performance of confidential data analysis is improved.

CN120803682APending Publication Date: 2025-10-17CHENGDU HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410427830.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-10
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Traditional data circulation methods have the risk of privacy leakage. TEE memory resource shortage leads to frequent GC and performance overhead. Insufficient TEE memory causes data to overflow to the REE side disk, affecting the end-to-end performance of confidential data analysis applications.

Method used

The target task data is divided into multiple sub-data, and the sub-data to be executed is cached in the TEE memory first. The sub-data to be executed in the future is cached in the REE memory or other storage. The REE memory is used as a transit cache to reduce the GC frequency and data transmission time.

Benefits of technology

It reduces the performance overhead of the system when executing target tasks, avoids frequent GC and data transmission delays, and improves the end-to-end performance of confidential data analysis applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803682A_ABST
    Figure CN120803682A_ABST
Patent Text Reader

Abstract

A data management method comprises the following steps: after receiving a target task, dividing data of the target task into a plurality of sub-data; under the condition that the residual storage space of the TEE memory is smaller than the memory occupied by the data of the target task, caching the first part of sub-data into the TEE memory according to the executed sequence of the multiple pieces of sub-data; and caching the sub-data except the first part of sub-data in the plurality of sub-data into the REE memory. According to the method, when it is determined that the TEE memory is not enough to cache the data of the target task, the data of the target task can be divided into a plurality of sub-data, and then the sub-data executed for a long time is cached in the REE memory, so that the frequency of GC when the system executes the target task can be reduced, the performance overhead is reduced, and the system performance is improved. And the influence on the end-to-end performance of the confidential data analysis application program of the system is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data caching, and in particular to a data management method, device and computing equipment. BACKGROUND

[0002] With the rapid development of the big data industry, the demand for data joint analysis across agencies and industries is increasing. Since the traditional "copying" data circulation mode has the risk of privacy leakage, data holders generally set a series of security measures to ensure the security of data in the circulation process for data security and privacy protection. SUMMARY

[0003] To solve the above problems, the embodiments of the present application provide a data management method, which can cache data in TEE in memory in REE, reduce the high performance overhead caused by frequent GC due to TEE memory resource shortage, and reduce the performance overhead caused by TEE data overflow to REE side disk due to TEE memory shortage. In addition, the present application also provides a data management device and a computing equipment corresponding to the data management method.

[0004] To this end, the embodiments of the present application adopt the following technical solutions:

[0005] In the first aspect, the embodiments of the present application provide a data management method, comprising: after receiving a target task, dividing data of the target task into a plurality of sub-data; in the case that the remaining storage space of a trusted execution environment (TEE) memory is less than the memory occupied by the data of the target task, caching a first part of the sub-data into the TEE memory according to the order in which the plurality of sub-data are executed; the plurality of sub-data include the first part of the sub-data, and the time sequence of execution of the first part of the sub-data is prior to the time sequence of execution of the sub-data other than the first part of the sub-data in the plurality of sub-data; the TEE memory refers to the memory deployed in the TEE; caching the sub-data other than the first part of the sub-data in the plurality of sub-data into a rich execution environment (REE) memory; the REE memory refers to the memory deployed in the REE.

[0006] In this embodiment, when it is determined that the TEE memory is insufficient to cache the data of the target task, the data of the target task is divided into a plurality of sub-data, and the sub-data to be executed in the future is cached in the REE memory, which can reduce the frequency of GC when the system executes the target task, reduce the performance overhead, and avoid affecting the end-to-end performance of the system in performing confidential data analysis application programs.

[0007] In an embodiment, the method further comprises: in a case where the remaining storage space of the REE memory is less than the memory occupied by the sub-data other than the first part of sub-data in the plurality of sub-data, writing a second part of sub-data into the REE memory according to the order in which the plurality of sub-data are executed; the sub-data other than the first part of sub-data in the plurality of sub-data includes the second part of sub-data, and the time sequence in which the second part of sub-data is executed is prior to the time sequence in which a third part of sub-data is executed; the third part of sub-data is sub-data other than the first part of sub-data and the second part of sub-data in the plurality of sub-data; storing the third part of sub-data in a memory deployed in the REE; and the memory in the REE has a data reading and writing speed greater than that of the REE memory.

[0008] In this embodiment, the method uses the REE memory as a transit cache. When the REE memory is insufficient to cache the sub-data overflowed from the TEE memory, the sub-data to be executed in the future can be stored in a memory such as HDD, SSD, etc. other than the REE memory, thereby avoiding direct storage of data in the TEE memory to the memory or direct reading of data from the memory, reducing the time for writing and reading data, and avoiding affecting the end-to-end performance of the confidential data analysis application program performed by the system.

[0009] In an embodiment, the method further comprises: in a case where the remaining storage space of the REE memory is less than the memory occupied by the sub-data other than the first part of sub-data in the plurality of sub-data, writing a second part of sub-data into the REE memory according to the order in which the plurality of sub-data are executed; the sub-data other than the first part of sub-data in the plurality of sub-data includes the second part of sub-data, and the time sequence in which the second part of sub-data is executed is prior to the time sequence in which a third part of sub-data is executed; the third part of sub-data is sub-data other than the first part of sub-data and the second part of sub-data in the plurality of sub-data; storing the third part of sub-data in a memory deployed in the REE; and the memory in the REE has a data reading and writing speed greater than that of the REE memory.

[0010] In this embodiment, the method caches the sub-data to be executed into the TEE memory according to the order in which the sub-data are executed, and overflows the sub-data to be executed in the future to the REE memory, thereby avoiding frequent reading of data from the REE memory when the system performs a target task, and avoiding affecting the end-to-end performance of the confidential data analysis application program performed by the system.

[0011] In an embodiment, the writing the second part of the sub-data into the REE memory according to the order in which the sub-data are executed comprises: caching the sub-data other than the first part of the sub-data into the REE memory according to the order from low priority to high priority; overflowing the third part of the sub-data into the memory in the REE, and caching the second part of the sub-data into the REE memory.

[0012] In this embodiment, the method caches the sub-data to be executed into the REE memory and overflows the sub-data to be executed in the future into the disk in the REE according to the order in which the sub-data are executed, which can avoid frequently reading data from the memory in the REE to the REE memory and then to the TEE memory when the system executes the target task, and can avoid affecting the end-to-end performance of the confidential data analysis application of the system.

[0013] In an embodiment, the caching the sub-data other than the first part of the sub-data into the REE memory comprises: encrypting the sub-data other than the first part of the sub-data to obtain encrypted sub-data other than the first part of the sub-data; and caching the encrypted sub-data other than the first part of the sub-data into the REE memory.

[0014] In this embodiment, the method needs to encrypt the sub-data when the sub-data is cached into the REE memory, which can avoid the sub-data from being leaked.

[0015] In an embodiment, the method further comprises: detecting whether there is idle storage space in the TEE memory; in the case that there is idle storage space in the TEE memory, selecting a corresponding number of sub-data corresponding to low priority from the second part of the sub-data stored in the REE memory to obtain a fourth part of the sub-data; decrypting the fourth part of the sub-data to obtain decrypted fourth part of the sub-data; and writing the decrypted fourth part of the sub-data into the TEE memory.

[0016] In this embodiment, when the method detects that there is idle storage space in the TEE memory, the sub-data to be executed in the REE memory can be cached into the TEE memory, which can avoid the problem of task interruption after the sub-data cached in the TEE memory is executed.

[0017] In an embodiment, the method further comprises: releasing the storage space in the REE memory storing the fourth part of the sub-data.

[0018] In this embodiment, the method can release the storage space of the sub-data in the REE memory read by the TEE, so that the storage space can be reused to improve the utilization of the storage space of the REE memory.

[0019] In an embodiment, the method further comprises: detecting whether there is idle storage space in the REE memory; in the case that there is idle storage space in the REE memory, selecting a corresponding number of low-priority corresponding sub-data from the third part of sub-data to obtain a fifth part of sub-data; and writing the fifth part of sub-data into the REE memory.

[0020] In this embodiment, when the method detects that there is idle storage space in the REE memory, the sub-data to be executed in the memory of the REE can be cached to the REE memory, avoiding the sub-data cached in the TEE memory from being read from the memory of the REE after being executed, thereby increasing the time of reading data and affecting the end-to-end performance of the system in performing the confidential data analysis application.

[0021] In an embodiment, the method further comprises: releasing the storage space of the fifth part of sub-data stored in the memory of the REE except the REE memory.

[0022] In this embodiment, the method can release the storage space of the sub-data in the memory of the REE read by the TEE, so that the storage space can be reused to improve the utilization of the storage space of the memory of the REE.

[0023] In an embodiment, the method further comprises: receiving at least one processed sub-data; the at least one processed sub-data is sub-data generated after a sixth part of sub-data is executed, and the plurality of sub-data includes the sixth part of sub-data; selecting a corresponding number of low-priority corresponding sub-data from the at least one processed sub-data and the sub-data in the plurality of sub-data except the sixth part of sub-data in the order of execution of the at least one processed sub-data and the sub-data in the plurality of sub-data except the sixth part of sub-data to obtain a seventh part of sub-data; writing the sub-data in the seventh part of sub-data that is not stored in the TEE memory into the TEE memory; and migrating the sub-data in the TEE memory that does not belong to the seventh part of sub-data to the REE memory.

[0024] In this embodiment, the method generates new sub-data based on the original sub-data, reorders the newly generated sub-data set, updates the data in the TEE memory cache, so that the sub-data in the TEE memory cache are the sub-data to be executed, and the sub-data to be executed in the future are overflowed to the REE memory. This can avoid frequent reading of data from the REE memory when the system executes the target task, and can avoid affecting the end-to-end performance of the confidential data analysis application program.

[0025] In a second aspect, the embodiments of the present application provide a data management apparatus, comprising: a first processing unit configured to divide data of a target task into a plurality of sub-data after receiving the target task; a second processing unit configured to, in a case where a remaining storage space of a trusted execution environment (TEE) memory is less than memory occupied by the data of the target task, cache a first part of the sub-data to the TEE memory according to an execution order of the plurality of sub-data; the plurality of sub-data include the first part of the sub-data, and the execution order of the first part of the sub-data is prior to an execution order of sub-data other than the first part of the sub-data in the plurality of sub-data; the TEE memory refers to a memory deployed in the TEE; and a third processing unit configured to cache the sub-data other than the first part of the sub-data in the plurality of sub-data to a rich execution environment (REE) memory; the REE memory refers to a memory deployed in the REE.

[0026] In an embodiment, the third processing unit is further configured to, in a case where a remaining storage space of the REE memory is less than memory occupied by the sub-data other than the first part of the sub-data in the plurality of sub-data, write a second part of the sub-data to the REE memory according to the execution order of the plurality of sub-data; the sub-data other than the first part of the sub-data in the plurality of sub-data include the second part of the sub-data, and the execution order of the second part of the sub-data is prior to an execution order of a third part of the sub-data; the third part of the sub-data is sub-data other than the first part of the sub-data and the second part of the sub-data in the plurality of sub-data; and the third processing unit is further configured to store the third part of the sub-data in a memory deployed in the REE; the memory in the REE has a data reading and writing speed greater than a data reading and writing speed of the REE memory.

[0027] In an embodiment, the second processing unit is specifically configured to add priority identifiers to the plurality of sub-data in the order in which the plurality of sub-data is executed; a sub-data corresponding to a low priority identifier is a sub-data that is executed in a time sequence in priority, and a sub-data corresponding to a high priority identifier is a sub-data that is executed in a time sequence not in priority; the second processing unit is specifically configured to cache the plurality of sub-data to the TEE memory in the order from low priority to high priority; and the second processing unit is specifically configured to overflow sub-data other than the first part of sub-data in the plurality of sub-data to the REE memory, and cache the first part of sub-data to the TEE memory.

[0028] In an embodiment, the third processing unit is specifically configured to cache sub-data other than the first part of sub-data in the plurality of sub-data to the REE memory in the order from low priority to high priority; the third processing unit is specifically configured to overflow the third part of sub-data to a memory in the REE, and cache the second part of sub-data to the REE memory.

[0029] In an embodiment, the third processing unit is specifically configured to encrypt sub-data other than the first part of sub-data in the plurality of sub-data to obtain encrypted sub-data other than the first part of sub-data in the plurality of sub-data; and the third processing unit is specifically configured to cache the encrypted sub-data other than the first part of sub-data in the plurality of sub-data to the REE memory.

[0030] In an embodiment, the third processing unit is further configured to detect whether there is free storage space in the TEE memory; the third processing unit is further configured to, in a case where there is free storage space in the TEE memory, select a corresponding number of sub-data corresponding to a low priority from the second part of sub-data stored in the REE memory to obtain a fourth part of sub-data; the third processing unit is further configured to decrypt the fourth part of sub-data to obtain decrypted fourth part of sub-data; and the third processing unit is further configured to write the decrypted fourth part of sub-data to the TEE memory.

[0031] In an embodiment, the third processing unit is further configured to release storage space in the REE memory storing the fourth part of sub-data.

[0032] In an implementation, the third processing unit is further configured to detect whether the REE memory has free storage space; and in a case where the REE memory has free storage space, select a corresponding number of low-priority corresponding sub-data from the third part of sub-data to obtain fifth part of sub-data; and write the fifth part of sub-data into the REE memory.

[0033] In an implementation, the third processing unit is further configured to release the storage space in which the fifth part of sub-data is stored in the memory deployed in the REE except the REE memory.

[0034] In an implementation, the third processing unit is further configured to receive at least one processed sub-data; the at least one processed sub-data is sub-data generated after execution of sixth part of sub-data, and the plurality of sub-data includes the sixth part of sub-data; the third processing unit is further configured to select a corresponding number of low-priority corresponding sub-data from the at least one processed sub-data and sub-data other than the sixth part of sub-data in the plurality of sub-data according to an execution order of the at least one processed sub-data and the sub-data other than the sixth part of sub-data in the plurality of sub-data to obtain seventh part of sub-data; the third processing unit is further configured to write sub-data in the seventh part of sub-data that is not stored in the TEE memory into the TEE memory; and migrate sub-data that is already stored in the TEE memory and does not belong to the seventh part of sub-data to the REE memory.

[0035] In a third aspect, an embodiment of the present application provides a computing device, including: at least one memory; at least one processor, configured to execute instructions stored in the memory, so that the computing device performs the embodiments of the possible implementations of the first aspect.

[0036] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, including computer program instructions, when the computer program instructions are executed by a computing device, the computing device performs the embodiments of the possible implementations of the first aspect.

[0037] In a fifth aspect, an embodiment of the present application provides a computer program product including instructions, characterized in that the computer program product stores instructions, when the instructions are executed by a computing device, the computing device implements the embodiments of the possible implementations of the first aspect.

[0038] In a sixth aspect, the embodiments of the present application provide a computing device cluster, comprising at least one computing device, each computing device comprising a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the embodiments of the first aspect.

[0039] In a seventh aspect, the embodiments of the present application provide a computer readable storage medium comprising computer program instructions, when the computer program instructions are executed by a computing device cluster, the computing device cluster performs the embodiments of the first aspect.

[0040] In an eighth aspect, the embodiments of the present application provide a computer program product comprising instructions, characterized in that the computer program product stores instructions, when the instructions are executed by a computing device cluster, the computing device cluster performs the embodiments of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0041] The drawings needed to be used in the embodiments or prior art description are briefly introduced as follows.

[0042] Figure 1 A structural schematic diagram of a data management system provided in the embodiments of the present application;

[0043] Figure 2 A structural schematic diagram of a REE memory management module provided in the embodiments of the present application;

[0044] Figure 3 A data process schematic diagram of a cache task of a data management system provided in the embodiments of the present application;

[0045] Figure 4 A data process schematic diagram of a read task of a data management system provided in the embodiments of the present application;

[0046] Figure 5 A flow schematic diagram of a data management method provided in the embodiments of the present application;

[0047] Figure 6 A structural schematic diagram of a data management apparatus provided in the embodiments of the present application;

[0048] Figure 7 A structural schematic diagram of a computing device provided in the embodiments of the present application;

[0049] Figure 8 An architectural schematic diagram of a computing device cluster provided in the embodiments of the present application;

[0050] Figure 9Fig. 2 is a schematic diagram of another architecture of a computing device cluster according to an embodiment of the present application. DETAILED DESCRIPTION

[0051] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.

[0052] The term "and / or" used herein is used to describe an association relationship of associated objects, which means that there can be three relationships, for example, A and / or B can mean that there are three cases of A alone, A and B together, and B alone. The symbol " / " used herein means an or relationship of associated objects, for example, A / B means A or B.

[0053] The terms "first" and "second" and the like in the description and claims herein are used to distinguish different objects, and are not used to describe a specific order of the objects. For example, the first response message and the second response message are used to distinguish different response messages, and are not used to describe a specific order of the response messages.

[0054] In the embodiments of the present application, the words "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Rather, the use of the words "exemplary" or "for example" is intended to present relevant concepts in a concrete manner.

[0055] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more, for example, a plurality of processing units means two or more processing units, and the like; a plurality of elements means two or more elements, and the like.

[0056] Before introducing the technical solutions protected by the present application, several professional terms related to the technical solutions protected by the present application are explained in advance, which are as follows:

[0057] Spark is a big data distributed computing framework based on in-memory computing, which has the advantages of fast, general, scalable, and fault-tolerant, and is widely used in various data analysis businesses in the field of big data. Spark publishes a big data analysis application by creating a driver, and distributes tasks to each executor for execution. After each executor completes the task through distributed parallel computing, the computing result is returned to the driver.

[0058] A trusted execution environment (TEE) is a hardware-based confidential computing technology that creates a secure area by isolating software and hardware resources. Unlike a rich execution environment (REE), the code and data loaded in the secure area of the TEE are securely guaranteed. In a confidential computing scenario, encrypted data stored in the REE is transmitted to the TEE, and data decryption and data analysis are performed in the TEE, so that data can be securely and credibly circulated in a "useful but invisible" manner.

[0059] The REE, also known as the normal execution environment, refers to the general computing environment provided by the host operating system and does not have hardware-level security protection and isolation. Compared with the TEE, data in the REE is vulnerable to malicious software or unauthorized access.

[0060] Taking a spark system as an example. When the spark system runs in the TEE, the tasks in the executor can use the TEE memory through the memory manager and use the disk and network card on the REE side through the user mode library operating system (LibOS). Since the memory of the server or other storage devices is isolated into TEE-side memory and REE-side memory, the confidential big data analysis system can only use the TEE-side memory. If the TEE-side memory is not enough for the confidential big data analysis system to use, the system is prone to frequent garbage collection (GC). The system needs a large amount of overhead to perform GC, thereby seriously affecting the end-to-end performance of the system in performing confidential data analysis applications.

[0061] Moreover, the disk is located on the REE side, and the spark system running on the TEE side cannot directly operate. If the spark system writes data overflowed from the TEE side to the disk or reads data from the corresponding disk to the TEE-side memory, the transmitted data needs to be encrypted and decrypted, data transmission between the TEE and the REE, REE-side memory writing and reading the disk, and other operations. This process consumes a lot of time and seriously affects the end-to-end performance of the system in performing confidential data analysis applications.

[0062] To solve the defects in the related art, the embodiments of the present application provide a data management method. When it is determined that the TEE memory is insufficient to cache the data of the target task, the data of the target task can be divided into a plurality of sub-data, and the sub-data to be executed in the future can be cached in the REE memory, so as to reduce the frequency of GC performed by the system when the target task is executed, reduce the performance overhead, and avoid affecting the end-to-end performance of the system in performing the confidential data analysis application. The method uses the REE memory as a transfer memory. When the REE memory is insufficient to cache the sub-data overflowed from the TEE memory, the sub-data to be executed in the future can be stored in a storage such as a disk or an SSD, so as to avoid storing the data in the TEE memory directly to the disk or reading the data directly from the disk, thereby reducing the time for writing and reading data, and avoiding affecting the end-to-end performance of the system in performing the confidential data analysis application.

[0063] Figure 1 FIG. 1 shows a structure diagram of a data management system according to an embodiment of the present application. As shown in FIG. 1, the data management system 10 can be divided into a TEE 110, a plurality of executors 120, a LibOS 130, and an REE 140 from a software perspective. The plurality of executors 120 can include an executor 120-1,..., and an executor 120-N. N is a positive integer and is greater than or equal to 2. Figure 1

[0064] The TEE 110 refers to isolation of part of the computing resources, part of the storage resources, and the like in a server, a computer, or the like, and security protection of the part of the resources. The computing resources, the part of the storage resources, and the like in the TEE 110 can process confidential data to ensure the security of the confidential data.

[0065] The computing resources isolated by the TEE 110 are used for processing and computing of confidential data. The computing resources isolated by the TEE 110 can be a processor such as a central processing unit (CPU), a graphics processing unit (GPU), a neural processing unit (NPU), or the like, or can be a core such as a core of a CPU, a GPU, an NPU, or the like.

[0066] The storage resources isolated by the TEE 110 are used for storing or caching confidential data, intermediate data in a computing process, computing result data, program code for executing the computing, and the like. The storage resources isolated by the TEE 110 can be a memory such as a register, a cache memory, or the like. In the embodiments of the present application, the storage resources isolated by the TEE 110 are referred to as a TEE memory 210. ​

[0067] LibOS 130 is an operating system design pattern that encapsulates the core functionality of an operating system as a library, allowing applications to directly call functions in the library to perform operating system-level tasks without the support of a full operating system kernel in the traditional sense. In the embodiments of the present application, LibOS 130 is used to transfer data in TEE 110 to REE 140, and transfer data in REE 140 to TEE 110.

[0068] REE 140 refers to an environment without security protection. The computing resources in REE 140 are used to process and compute data with low security requirements. The storage resources in REE 140 are used to store data with low security requirements, or to store encrypted data. In the embodiments of the present application, data management system 10 can configure a REE memory 220 from the storage resources in REE 140 according to requirements, for storing data overflowed from TEE memory 210. Wherein, REE memory 220 and TEE memory 210 can be one memory, or two independent memories.

[0069] Data management system 10 can also configure a disk 230, a hard disk drive (HDD), a solid state drive (SSD), a network card 240, etc. from the storage resources in REE 140, for storing data overflowed from REE memory 220. Alternatively, data management system 10 can also configure network card 240 from the storage resources in REE 140, and let network card 240 connect with the storage of other devices outside, for storing data overflowed from REE memory 220. Wherein, the data transmission speed between TEE memory 210 and REE memory 220 is faster than the data transmission speed between TEE memory 210 and the storage such as disk 230 and network card 240. The following takes the disk 230 receiving data overflowed from REE memory 220 as an example to introduce the technical solutions protected by the present application.

[0070] Executor 120 refers to a program or component responsible for performing a specific task or service. Taking the spark system as an example, executor 120 refers to a program instance running on a worker node in a cluster, which is responsible for executing tasks from the driver program and maintaining its local memory space for data processing and calculation. In the embodiments of the present application, executor 120 runs on the processor in TEE 110, and can process and calculate confidential data.

[0071] Taking executor 120-1 as an example, as shown in FIG. 2, executor 120-1 runs on the processor in TEE 110, and can process and calculate confidential data. Figure 1As shown, the executor 120-1 can be divided into a task pool 121-1, a TEE memory management module 122-1, and a REE memory management module 123-1 according to the execution function. The task pool 121-1, the TEE memory management module 122-1, and the REE memory management module 123-1 can be implemented by software, or can be implemented by hardware, or can be implemented by a combination of software and hardware.

[0072] The task pool 121-1 refers to a module of a data structure maintained by the executor 120-1 for storing a to-be-executed task. The data structure can include parameters, state information, and the like of the task. In the embodiment of the present application, after the task pool 121-1 receives a target task, the target task can be analyzed to obtain the data structure of the target task. When the task pool 121-1 caches the target task, a memory allocation request can be generated according to the data size of the target task and sent to the TEE memory management module 122-1. The memory allocation request is used to request the TEE memory management module 122-1 to allocate a storage space of a specified size for the target task to store the data of the target task.

[0073] The TEE memory management module 122-1 is responsible for allocating memory for tasks in the task pool 121-1, tracking memory usage, and the like, and is responsible for managing memory allocation, release, protection, and access operations in the TEE memory 210. In the embodiment of the present application, after the TEE memory management module 122-1 receives the memory allocation request sent by the task pool 121-1, the TEE memory management module 122-1 can allocate a memory space of a corresponding size in the TEE memory 210 for the target task according to the memory to be allocated by the memory allocation request, so that the data of the target task can be cached in the specified storage space in the TEE memory 210. After the TEE memory management module 122-1 determines that the TEE memory 210 completes the data storage of the target task, the TEE memory management module 122-1 can send a feedback message to the task pool 121-1.

[0074] After the task pool 121-1 receives the feedback message, it is determined that the data storage of the target task is successful, and a corresponding task execution interface or function can be called to load the data of the target task into the TEE execution environment for execution through the control of the TEE memory management module 122-1. After the task pool 121-1 determines that the execution of the target task is completed, the task pool 121-1 can send a memory release request to the TEE memory management module 122-1. After the TEE memory management module 122-1 receives the memory release request, the TEE memory management module 122-1 releases the storage space in the TEE memory 210 that caches the data of the target task, so that the storage space can be reused.

[0075] When the TEE memory management module 122-1 determines that the memory to be allocated by the memory allocation request is larger than the remaining storage space in the TEE memory 210, it indicates that the TEE memory 210 cannot fully cache the data of the target task. In this case, the TEE memory management module 122-1 can forward the data of the target task to the REE memory management module 123-1.

[0076] After receiving the target task data, the REE memory management module 123-1 analyzes the target task data and caches the sub-data to be executed in the target task data in the TEE memory 210, and caches the sub-data to be executed in the future in the REE memory 220 and the disk 230. During the data reading process, if the REE memory management module 123-1 determines that the sub-data cached in the TEE memory 210 has been read or there is free storage space, it can migrate the sub-data cached in the REE memory 220 to the TEE memory 210 and migrate the sub-data cached on the disk 230 to the REE memory 220.

[0077] like Figure 2 As shown, the REE memory management module 123-1 can be divided into a data identification unit 1231-1, a TEE migration unit 1232-1, a REE migration unit 1233-1, a TEE migration unit 1234-1, and a REE migration unit 1235-1 according to the execution function. Among them, the data identification unit 1231-1, the TEE migration unit 1232-1, the REE migration unit 1233-1, the TEE migration unit 1234-1, and the REE migration unit 1235-1 can all be implemented by software, or by hardware, or by a combination of software and hardware.

[0078] Upon receiving the target task data, the data identification unit 1231-1 may split the target task data into multiple sub-data. Since a task is generally composed of multiple instructions, the data identification unit 1231-1 may use instructions as the granularity, splitting the sub-data into data corresponding to one or a set number of instructions. The data identification unit 1231-1 may also split the target task data in other ways, which are not limited herein.

[0079] After obtaining the multiple sub-data, the data identification unit 1231-1 can convert the multiple sub-data into a directed acyclic graph (DAG) operation diagram, and identify the order in which the multiple sub-data are executed based on the type of the target task. The data identification unit 1231-1 can mark the multiple sub-data with priority identifiers. The data identification unit 1231-1 can mark the priority identifier of the sub-data to be executed as low priority. The data identification unit 1231-1 can mark the priority identifier of the sub-data to be executed in the future as high priority. The data identification unit 1231-1 can mark the same priority identifier on the sub-data to be executed at the same time.

[0080] The TEE migration unit 1232-1 can obtain the remaining storage space of the TEE memory 210, and select several sub-data with low priority from multiple sub-data according to the remaining storage space of the TEE memory 210 to obtain the first part of the sub-data. After the TEE migration unit 1232-1 determines the storage space of the remaining storage space of the TEE memory 210, it writes the first part of the sub-data into the remaining storage space of the TEE memory 210. In an embodiment of the present application, the TEE migration unit 1232-1 caches multiple sub-data in the TEE memory 210 in order from low priority to high priority. The TEE migration unit 1232-1 determines that the remaining storage space of the TEE memory 210 is insufficient to cache all the sub-data, and can overflow the high-priority sub-data to the REE memory 220, so that the sub-data finally cached by the TEE memory 210 are the several sub-data with the lowest priority, that is, the first part of the sub-data.

[0081] For example, Figure 3 As shown, after receiving the target task, the data identification unit 1231-1 splits the data of the target task into 8 sub-data. The data identification unit 1231-1 can mark the 8 sub-data with priority identifiers according to the order in which each sub-data is executed, and obtain "1# sub-data", "2# sub-data", "3# sub-data", "4# sub-data", "5# sub-data", "6# sub-data", "7# sub-data" and "8# sub-data". Assume that the remaining storage space of the TEE memory 210 can cache 4 sub-data. The TEE migration unit 1232-1 can cache the 8 sub-data in the TEE memory 210 in order from low priority to high priority. Since the remaining storage space of TEE memory 210 can only cache 4 sub-data, TEE memory 210 overflows the high-priority "1# sub-data", "2# sub-data", "3# sub-data", and "4# sub-data" to REE memory 220, so that the 4 sub-data finally cached by TEE memory 210 are "5# sub-data", "6# sub-data", "7# sub-data", and "8# sub-data".

[0082] The REE migration unit 1233-1 can obtain the remaining storage space of the REE memory 220, and detect whether the remaining storage space of the REE memory 220 is less than the memory occupied by the sub-data other than the first part of the plurality of sub-data. In one case, the REE migration unit 1233-1 determines that the remaining storage space of the REE memory 220 is greater than or equal to the memory occupied by the sub-data other than the first part of the plurality of sub-data, and encrypts the sub-data other than the first part of the plurality of sub-data, and writes the encrypted sub-data other than the first part of the plurality of sub-data into the remaining storage space of the REE memory 220.

[0083] In another case, the REE migration unit 1233-1 determines that the remaining storage space of the REE memory 220 is less than the memory occupied by the sub-data other than the first part of the plurality of sub-data, and selects a few sub-data of low priority from the sub-data other than the first part of the plurality of sub-data according to the remaining storage space of the REE memory 220, to obtain second part of sub-data. The REE migration unit 1233-1 encrypts the second part of sub-data, and writes the encrypted second part of sub-data into the remaining storage space of the REE memory 220. In addition, the REE migration unit 1233-1 obtains the sub-data other than the first part of sub-data and the second part of sub-data from the plurality of sub-data, to obtain third part of sub-data. The REE migration unit 1233-1 encrypts the third part of sub-data, and writes the encrypted third part of sub-data into the disk 230. In the embodiment of the application, the REE migration unit 1233-1 caches the sub-data overflowed from the TEE memory 210 in the REE memory 220 in the order of low priority to high priority. The REE migration unit 1233-1 determines that the remaining storage space of the REE memory 220 is insufficient to cache all the sub-data overflowed from the TEE memory 210, and can overflow the sub-data of high priority to the disk 230, so that the REE memory 220 finally caches the sub-data of the lowest priority among the sub-data overflowed from the TEE memory 210, that is, the second part of sub-data.

[0084] Exemplarily, as Figure 3As shown, it is assumed that the remaining storage space of the REE memory 220 can cache 2 sub-data. The REE migration-out unit 1233-1 can encrypt the "1#sub-data", the "2#sub-data", the "3#sub-data" and the "4#sub-data" overflowed from the TEE memory 210, and cache the encrypted "1#sub-data", "2#sub-data", "3#sub-data" and "4#sub-data" in the REE memory 220 in the order from low priority to high priority. Since the remaining storage space of the REE memory 220 can only cache 2 sub-data, the REE memory 220 overflows the encrypted "1#sub-data" and "2#sub-data" of high priority to the disk 230, so that the REE memory 220 finally caches the "3#sub-data" and "4#sub-data". In addition, the REE migration-out unit 1233-1 stores the encrypted "1#sub-data" and "2#sub-data" of high priority in the disk 230.

[0085] The TEE migration-in unit 1234-1 can detect whether there is free storage space in the TEE memory 210 during execution of the target task. When the TEE migration-in unit 1234-1 detects that there is free storage space in the TEE memory 210, it can select several sub-data of low priority from the encrypted second part of sub-data according to the free storage space in the TEE memory 210, to obtain a fourth part of sub-data. The TEE migration-in unit 1234-1 decrypts the fourth part of sub-data to obtain decrypted fourth part of sub-data. The TEE migration-in unit 1234-1 can cache the decrypted fourth part of sub-data to the free storage space of the TEE memory 210.

[0086] In the embodiment of the application, the TEE migration-in unit 1234-1 can read the sub-data cached in the REE memory 220 in the order from low priority to high priority. After the TEE migration-in unit 1234-1 reads a sub-data, it decrypts the read sub-data, and then caches the decrypted sub-data to the TEE memory 210. After the TEE migration-in unit 1234-1 reads a sub-data, it can release the storage space in the REE memory 220 that caches the read sub-data, so that the storage space can be reused.

[0087] Exemplarily, as Figure 4As shown, the remaining storage space of the TEE memory 210 caches four sub-data, i.e., "5# sub-data", "6# sub-data", "7# sub-data", and "8# sub-data", the remaining storage space of the REE memory 220 caches two sub-data, i.e., "3# sub-data" and "4# sub-data", and the disk 230 caches two sub-data, i.e., "1# sub-data" and "2# sub-data". When the "8# sub-data" cached by the TEE memory 210 is read and executed, the storage space of the TEE memory 210 originally storing the "8# sub-data" is released. After the TEE migration unit 1234-1 detects that there is free storage space in the TEE memory 210, the TEE migration unit 1234-1 can read one sub-data cached by the REE memory 220, i.e., "4# sub-data", in the order from low priority to high priority. The TEE migration unit 1234-1 decrypts the "4# sub-data", and then writes the decrypted "4# sub-data" into the free storage space of the TEE memory 210.

[0088] The REE migration unit 1235-1 can detect whether there is free storage space in the REE memory 220 during execution of the target task. When the REE migration unit 1235-1 detects that there is free storage space in the REE memory 220, the REE migration unit 1235-1 can select several sub-data with low priority from the third part of sub-data according to the free storage space in the REE memory 220, to obtain a fifth part of sub-data. The REE migration unit 1235-1 can cache the fifth part of sub-data into the free storage space of the REE memory 220.

[0089] In the embodiment of the present application, the REE migration unit 1235-1 can read the sub-data stored in the disk 230 in the order from low priority to high priority. After the REE migration unit 1235-1 reads one sub-data, the REE migration unit 1235-1 caches the read sub-data into the REE memory 220. After the REE migration unit 1235-1 reads one sub-data, the REE migration unit 1235-1 can release the storage space of the disk 230 storing the read sub-data, so that the storage space can be reused.

[0090] Exemplarily, as shown in FIG. 12, the REE migration unit 1235-1 reads the "2# sub-data" stored in the disk 230 in the order from low priority to high priority. The REE migration unit 1235-1 caches the "2# sub-data" into the free storage space of the REE memory 220. Figure 4 As shown, after the "4# sub-data" cached by the REE memory 220 is migrated to the TEE memory 210, the storage space of the REE memory 220 originally storing the "4# sub-data" is released. After the REE migration unit 1235-1 detects that there is free storage space in the REE memory 220, the REE migration unit 1235-1 can read one sub-data stored in the disk 230, i.e., "2# sub-data", in the order from low priority to high priority. The REE migration unit 1235-1 caches the "2# sub-data" into the free storage space of the REE memory 220.

[0091] In the embodiments of the present application, the executor 120-1 can generate one or more new sub-data after processing one or more sub-data. At this time, the data identification unit 1231-1 can eliminate the executed sub-data from the plurality of sub-data, and form a new sub-data set with the new sub-data. The data identification unit 1231-1 can re-identify the order of execution of the plurality of sub-data in the new sub-data set, and re-label the plurality of sub-data with priority identifiers.

[0092] After the TEE migration unit 1232-1 obtains the priority identifiers of the re-labeled plurality of sub-data, the TEE migration unit 1232-1 can write the new sub-data with low priority to the TEE memory 210, and / or can encrypt the high-priority sub-data already stored in the TEE memory 210 in the order of low priority to high priority, and then overflow the encrypted high-priority sub-data to the REE memory 220. The TEE migration unit 1232-1 constantly updates the sub-data cached in the TEE memory 210, so as to ensure that the priority of the sub-data cached in the TEE memory 210 is lower than the priority of the sub-data cached in the REE memory 220 and the disk 230.

[0093] After the REE migration unit 1233-1 obtains the priority identifiers of the re-labeled plurality of sub-data, the REE migration unit 1233-1 can cache the sub-data overflowed from the REE memory 220 to the TEE memory 210, and / or can overflow the high-priority sub-data already stored in the REE memory 220 to the disk 230 in the order of low priority to high priority. The REE migration unit 1233-1 constantly updates the sub-data cached in the REE memory 220, so as to ensure that the priority of the sub-data cached in the REE memory 220 is lower than the priority of the sub-data cached in the disk 230.

[0094] After the TEE migration unit 1234-1 obtains the priority identifiers of the re-labeled plurality of sub-data, the TEE migration unit 1234-1 can read the low-priority sub-data already stored in the REE memory 220 in the order of low priority to high priority. The TEE migration unit 1234-1 decrypts the read sub-data, and transmits the decrypted sub-data to the TEE memory 210. The TEE migration unit 1234-1 constantly updates the sub-data cached in the REE memory 220, so as to ensure that the priority of the sub-data cached in the REE memory 220 is higher than the priority of the sub-data cached in the TEE memory 210.

[0095] After obtaining the priority identifiers of the re-labeled sub-data, data identification unit 1231-1 can read the low-priority sub-data stored in disk 230 in ascending order of priority and transfer the read sub-data to REE memory 220. REE migration unit 1235-1 continuously updates the sub-data cached on disk 230 to ensure that the priority of the sub-data cached on disk 230 is higher than that of the sub-data cached in REE memory 220.

[0096] The following is an introduction through the process Figure 1 The process of implementing the technical solution for protection.

[0097] Figure 5 Schematic diagram of a data management method provided in an embodiment of the present application. Figure 5 As shown, the method is executed by the REE memory management module 123 in the above data management system 100, and the implementation process is as follows:

[0098] Step S501: After receiving a target task, the data of the target task is divided into a plurality of sub-data.

[0099] The above steps can be performed by the data identification unit 1231 in the REE memory management module 123. Specifically:

[0100] The data identification unit 1231 receives the target task data and can split the target task data into multiple sub-data. A task is generally composed of multiple instructions, so the data identification unit 1231 can use the instruction as the granularity and split the sub-data into data of one or a set number of instructions. The data identification unit 1231 can also split the target task data in other ways, which are not limited by this application.

[0101] After obtaining multiple sub-data, the data identification unit 1231 can convert the multiple sub-data into a DAG operation diagram and, based on the type of the target task, identify the order in which the multiple sub-data are to be executed. The data identification unit 1231 can mark the multiple sub-data with priority identifiers. The data identification unit 1231 can mark the priority identifier of the sub-data to be executed soon as low priority. The data identification unit 1231 can mark the priority identifier of the sub-data to be executed in the future as high priority. The data identification unit 1231 can mark the same priority identifier on sub-data to be executed at the same time.

[0102] Step S502: When the remaining storage space of the TEE memory is smaller than the memory occupied by the data of the target task, the first part of the sub-data is cached in the TEE memory in the order in which the multiple sub-data are executed.

[0103] The above steps can be performed by the TEE migration unit 1232 in the REE memory management module 123. Specifically:

[0104] The TEE migration unit 1232 can obtain the remaining storage space of the TEE memory 210, and select several sub-data of low priority from the plurality of sub-data according to the remaining storage space of the TEE memory 210 to obtain the first part of sub-data. The TEE migration unit 1232 can determine the storage space of the remaining storage space of the TEE memory 210, and write the first part of sub-data into the remaining storage space of the TEE memory 210. In an embodiment of the present application, the TEE migration unit 1232 buffers the plurality of sub-data in the TEE memory 210 in order from low priority to high priority. The TEE migration unit 1232 determines that the remaining storage space of the TEE memory 210 is insufficient to buffer all sub-data, and can overflow the sub-data of high priority to the REE memory 220, so that the TEE memory 210 finally buffers the sub-data of the lowest priority, that is, the first part of sub-data.

[0105] In an embodiment of the present application, the TEE migration unit 1232 buffers the sub-data to be executed in the future in the REE memory when it is determined that the TEE memory is insufficient to buffer the data of the target task, which can reduce the frequency of GC performed by the system when executing the target task, reduce performance overhead, and avoid affecting the end-to-end performance of the system performing confidential data analysis application programs.

[0106] In step S503, the sub-data other than the first part of sub-data in the plurality of sub-data is buffered in the REE memory.

[0107] The above steps can be performed by the REE migration unit 1233 in the REE memory management module 123. Specifically:

[0108] The REE migration unit 1233 can obtain the remaining storage space of the REE memory 220, and detect whether the remaining storage space of the REE memory 220 is less than the memory occupied by the sub-data other than the first part of sub-data in the plurality of sub-data. In one case, the REE migration unit 1233 determines that the remaining storage space of the REE memory 220 is greater than or equal to the memory occupied by the sub-data other than the first part of sub-data in the plurality of sub-data, encrypts the sub-data other than the first part of data in the plurality of sub-data, and writes the encrypted plurality of sub-data other than the first part of sub-data into the remaining storage space of the REE memory 220.

[0109] In another case, the REE migration unit 1233 determines that the remaining storage space of the REE memory 220 is less than the memory occupied by the sub-data other than the first part of sub-data, and selects a few sub-data with low priority from the sub-data other than the first part of sub-data according to the remaining storage space of the REE memory 220, to obtain a second part of sub-data. The REE migration unit 1233 encrypts the second part of sub-data, and writes the encrypted second part of sub-data into the remaining storage space of the REE memory 220. In addition, the REE migration unit 1233 obtains the sub-data other than the first part of sub-data and the second part of sub-data from the plurality of sub-data, to obtain a third part of sub-data. The REE migration unit 1233 encrypts the third part of sub-data, and writes the encrypted third part of sub-data into the disk 230. In the embodiment of the application, the REE migration unit 1233 caches the sub-data overflowed from the TEE memory 210 in the REE memory 220 in the order of low priority to high priority. The REE migration unit 1233 determines that the remaining storage space of the REE memory 220 is insufficient to cache all the sub-data overflowed from the TEE memory 210, and can overflow the sub-data with high priority to the disk 230, so that the REE memory 220 finally caches a few sub-data with the lowest priority among the sub-data overflowed from the TEE memory 210, that is, the second part of sub-data.

[0110] In the embodiment of the application, the REE migration unit 1233 uses the REE memory as a transfer memory. When the REE memory is insufficient to cache the sub-data overflowed from the TEE memory, the REE migration unit 1233 can store the sub-data to be executed in the future in the disk, the SSD or the like, to avoid that the data in the TEE memory is directly stored in the disk or the data is directly read from the disk, so as to reduce the time of writing data and reading data, and avoid affecting the end-to-end performance of the system in performing the confidential data analysis application program.

[0111] Figure 6 A structural schematic diagram of a data management device provided in the embodiment of the application is shown in FIG. 6. As shown in the figure, the data management device 600 can be divided into a first processing unit 610, a second processing unit 620 and a third processing unit 630 according to the execution function. The data management device 600 specifically implements the following process: Figure 6

[0112] ​The first processing unit 610 is used to divide the data of the target task into multiple sub-data after receiving the target task. The second processing unit 620 is used to cache the first part of the sub-data into the TEE memory in the order in which the multiple sub-data are executed when the remaining storage space of the trusted execution environment TEE memory is less than the memory occupied by the data of the target task. The multiple sub-data include the first part of the sub-data, and the time order in which the first part of the sub-data is executed takes precedence over the time order in which the sub-data other than the first part of the sub-data in the multiple sub-data are executed. TEE memory refers to the memory deployed in the TEE. The third processing unit 630 is used to cache the sub-data other than the first part of the sub-data in the multiple sub-data into the rich execution environment REE memory. REE memory refers to the memory deployed in the REE.

[0113] In one embodiment, the third processing unit 630 is further configured to write the second portion of sub-data into the REE memory in the order in which the multiple sub-data are executed, if the remaining storage space in the REE memory is less than the memory occupied by the sub-data other than the first portion of sub-data among the multiple sub-data. The sub-data other than the first portion of sub-data among the multiple sub-data include the second portion of sub-data, and the time sequence in which the second portion of sub-data is executed takes precedence over the time sequence in which the third portion of sub-data is executed. The third portion of sub-data is the sub-data other than the first portion of sub-data among the multiple sub-data. The third processing unit 630 is further configured to store the third portion of sub-data in a memory deployed in the REE. The speed at which the memory in the REE reads and writes data is greater than the speed at which the REE memory reads and writes data.

[0114] In one embodiment, the second processing unit 620 is specifically used to add priority identifiers to multiple sub-data in the order in which the multiple sub-data are executed. The sub-data corresponding to the low priority in the priority identifier is the sub-data with priority in the time sequence of execution, and the sub-data corresponding to the high priority in the priority identifier is the sub-data with no priority in the time sequence of execution. The second processing unit 620 is specifically used to cache the multiple sub-data into the TEE memory in the order from low priority to high priority. The second processing unit 620 is specifically used to overflow the sub-data other than the first part of the sub-data among the multiple sub-data into the REE memory, and cache the first part of the sub-data into the TEE memory.

[0115] In one embodiment, the third processing unit 630 is specifically configured to cache the sub-data, except the first portion of sub-data, from the plurality of sub-data in the REE memory in order of low priority to high priority. The third processing unit 630 is specifically configured to overflow the third portion of sub-data into the memory in the REE and cache the second portion of sub-data in the REE memory.

[0116] In an embodiment, the third processing unit 630 is specifically configured to encrypt the sub-data other than the first part of sub-data in the plurality of sub-data to obtain the encrypted sub-data other than the first part of sub-data in the plurality of sub-data. The third processing unit 630 is specifically configured to cache the encrypted sub-data other than the first part of sub-data in the plurality of sub-data to the REE memory.

[0117] In an embodiment, the third processing unit 630 is further configured to detect whether there is free storage space in the TEE memory. The third processing unit 630 is further configured to, in the case that there is free storage space in the TEE memory, select a corresponding number of low-priority corresponding sub-data from the second part of sub-data stored in the REE memory to obtain a fourth part of sub-data. The third processing unit 630 is further configured to decrypt the fourth part of sub-data to obtain decrypted fourth part of sub-data. The third processing unit 630 is further configured to write the decrypted fourth part of sub-data to the TEE memory.

[0118] In an embodiment, the third processing unit 630 is further configured to release the storage space in the REE memory storing the fourth part of sub-data.

[0119] In an embodiment, the third processing unit 630 is further configured to detect whether there is free storage space in the REE memory. The third processing unit 630 is further configured to, in the case that there is free storage space in the REE memory, select a corresponding number of low-priority corresponding sub-data from the third part of sub-data to obtain a fifth part of sub-data. The third processing unit 630 is further configured to write the fifth part of sub-data to the REE memory.

[0120] In an embodiment, the third processing unit 630 is further configured to release the storage space in the memory deployed in the REE except the REE memory storing the fifth part of sub-data.

[0121] In an embodiment, the third processing unit 630 is further configured to receive at least one processed sub-data. The at least one processed sub-data is sub-data generated after the sixth part of sub-data is executed, and the plurality of sub-data includes the sixth part of sub-data. The third processing unit 630 is further configured to select a corresponding number of low-priority corresponding sub-data from the at least one processed sub-data and the sub-data other than the sixth part of sub-data in the plurality of sub-data in the order in which the at least one processed sub-data and the sub-data other than the sixth part of sub-data in the plurality of sub-data are executed to obtain a seventh part of sub-data. The third processing unit 630 is further configured to write the sub-data in the seventh part of sub-data that is not stored in the TEE memory to the TEE memory, and migrate the sub-data in the TEE memory that does not belong to the seventh part of sub-data to the REE memory.

[0122] Figure 7This is a schematic diagram of the structure of a computing device provided in an embodiment of the present application. Figure 7 As shown, computing device 700 includes a bus 710, a processor 720, a memory 730, and a communication interface 740. Processor 720, memory 730, and communication interface 740 communicate with each other via bus 710. Computing device 700 may be a server, a computer, a portable notebook, a cabinet, etc. It should be understood that this application does not limit the number of processors and memories in computing device 700.

[0123] The bus 710 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 The bus 710 may include a path for transmitting information between various components of the computing device 700 (eg, the processor 720, the memory 730, and the communication interface 740).

[0124] The processor 720 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0125] The memory 730 may include a volatile memory, such as a random access memory (RAM), or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a HDD, or an SSD.

[0126] The memory 730 stores executable program code, and the processor 720 executes the executable program code to implement the functions of the aforementioned multiple modules, such as the task pool 121, the TEE memory management module 122, and the REE memory management module 123 (or the data identification unit 1231, the TEE migration unit 1232, the REE migration unit 1233, the TEE migration unit 1234, and the REE migration unit 1235 in the REE memory management module 123), thereby implementing the data management method. In other words, the memory 730 stores instructions for executing the data management method.

[0127] Alternatively, the memory 730 stores executable codes, and the processor 720 executes the executable codes to respectively implement the functions of the aforementioned modules, thereby implementing the data management method. In other words, the memory 730 stores instructions for executing the data management method.

[0128] The communication interface 740 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 700 and other devices or a communication network.

[0129] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0130] like Figure 8 As shown, the computing device cluster includes at least one computing device 700. The memory 730 in one or more computing devices 700 in the computing device cluster may store the same instructions for executing the data management method.

[0131] In some possible implementations, the memory 730 of one or more computing devices 700 in the computing device cluster may also store partial instructions for executing the data management method. In other words, the combination of one or more computing devices 100 can jointly execute instructions for executing the data management method.

[0132] It should be noted that the memory 730 in different computing devices 700 in the computing device cluster can store different instructions, each used to execute part of the functions of the task pool 121, TEE memory management module 122, and REE memory management module 123. In other words, the instructions stored in the memory 730 in different computing devices 700 can implement the functions of one or more modules among the task pool 121, TEE memory management module 122, and REE memory management module 123.

[0133] In some possible implementation manners, one or more computing devices in the computing device cluster can be connected through a network. Among them, the network can be a wide area network or a local area network, etc. Figure 9 A possible implementation manner is shown. As shown in Figure 9 Two computing devices are connected through a network between computing device 700A and computing device 700B. Specifically, the network is connected through a communication interface in each computing device. In this type of possible implementation manner, the memory 730 in the computing device 700A stores instructions for performing the functions of part of the task pool 121, the TEE memory management module 122 and the REE memory management module 123. At the same time, the memory 730 in the computing device 700B stores instructions for performing the functions of another part of the task pool 121, the TEE memory management module 122 and the REE memory management module 123.

[0134] Figure 9 The connection mode between the computing device cluster shown in the figure can be that the data management method provided in the present application needs to store a large amount of data, so it is considered to transfer the functions of another part of the task pool 121, the TEE memory management module 122 and the REE memory management module 123 to the computing device 700B for implementation.

[0135] It should be understood that Figure 9 The functions of the computing device 700A shown in the figure can also be completed by multiple computing devices 700. Similarly, the functions of the computing device 700B can also be completed by multiple computing devices 700.

[0136] The present application also provides another computing device cluster. The connection relationship between each computing device in the computing device cluster can be similar to the connection relationship between the computing devices shown in Figure 7 and Figure 8 The connection mode of the computing device cluster. The difference is that the memory 730 in one or more computing devices 700 in the computing device cluster can store the same instructions for performing the data management method.

[0137] In some possible implementation manners, the memory 730 of one or more computing devices 700 in the computing device cluster can also store part of the instructions for performing the data management method, respectively. In other words, the combination of one or more computing devices 700 can collectively execute the instructions for performing the data management method.

[0138] It should be noted that the memories 730 in different computing devices 700 in the computing device cluster can store different instructions for performing part of the functions of the computing device 700. That is, the memories 730 in different computing devices 700 store instructions that can implement the functions of one or more of the above-mentioned task pool 121, the TEE memory management module 122, and the REE memory management module 123.

[0139] The embodiments of the present application also provide a computer program product containing instructions. The computer program product can be a software or program product containing instructions, which can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device is caused to perform the data management method.

[0140] The embodiments of the present application also provide a computer readable storage medium. The computer readable storage medium can be any available medium that the computing device can store or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk), etc. The computer readable storage medium contains instructions that instruct the computing device to perform the data management method.

[0141] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the protection scope of the technical solutions of the embodiments of the present application.

Claims

1. A data management method, characterized in that: include: After receiving the target task, the data of the target task is divided into multiple sub-data; When the remaining storage space of the trusted execution environment (TEE) memory is less than the memory occupied by the data of the target task, cache the first portion of sub-data into the TEE memory in the order in which the multiple sub-data are executed; the multiple sub-data include the first portion of sub-data, and the time sequence in which the first portion of sub-data is executed takes precedence over the time sequence in which sub-data other than the first portion of sub-data among the multiple sub-data are executed; The TEE memory refers to the memory deployed in the TEE; caching the sub-data other than the first part of the sub-data among the plurality of sub-data into a rich execution environment (REE) memory; The REE memory refers to the memory deployed in the REE.

2. The method according to claim 1, characterized in that The method further comprises: When the remaining storage space of the REE memory is smaller than the memory occupied by the sub-data other than the first portion of sub-data among the plurality of sub-data, the second portion of sub-data is written into the REE memory in the order in which the plurality of sub-data are executed; the sub-data other than the first portion of sub-data among the plurality of sub-data include the second portion of sub-data, and the time sequence in which the second portion of sub-data is executed takes precedence over the time sequence in which the third portion of sub-data is executed; the third portion of sub-data is the sub-data other than the first portion of sub-data and the second portion of sub-data among the plurality of sub-data; The third portion of sub-data is stored in a memory deployed in the REE; the speed of reading and writing data in the memory in the REE is greater than the speed of reading and writing data in the REE memory.

3. The method according to claim 1 or 2, characterized in that The step of caching the first portion of sub-data into the TEE memory in the order in which the plurality of sub-data are executed specifically includes: Priority identifiers are added to the plurality of sub-data according to the order in which the plurality of sub-data are executed; the sub-data corresponding to the low priority in the priority identifier is the sub-data that is executed first in the time sequence, and the sub-data corresponding to the high priority in the priority identifier is the sub-data that is not executed first in the time sequence; Cache the plurality of sub-data into the TEE memory in order from low priority to high priority; Overflowing the sub-data except the first part of the sub-data from the plurality of sub-data to the REE memory, and caching the first part of the sub-data in the TEE memory.

4. The method according to claim 3, characterized in that Writing the second portion of sub-data into the REE memory in the order in which the plurality of sub-data are executed specifically includes: caching the sub-data other than the first part of the sub-data among the plurality of sub-data into the REE memory in order from low priority to high priority; The third portion of sub-data is overflowed into a memory in the REE, and the second portion of sub-data is cached in the REE memory.

5. The method according to any one of claims 2 to 4, characterized in that: The step of caching the sub-data other than the first part of the sub-data in the rich execution environment (REE) memory specifically includes: Encrypting the sub-data other than the first part of the sub-data among the plurality of sub-data to obtain encrypted sub-data other than the first part of the sub-data among the plurality of sub-data; The encrypted sub-data except the first part of the sub-data are cached in the REE memory.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Check whether there is free storage space in the TEE memory; If there is free storage space in the TEE memory, select a corresponding number of sub-data corresponding to low priorities from the second part of sub-data stored in the REE memory to obtain a fourth part of sub-data; decrypting the fourth portion of sub-data to obtain the decrypted fourth portion of sub-data; The decrypted fourth portion of sub-data is written into the TEE memory.

7. The method according to claim 6, characterized in that The method further comprises: The storage space for storing the fourth portion of sub-data in the REE memory is released.

8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Detecting whether there is free storage space in the REE memory; In the case where there is free storage space in the REE memory, selecting a corresponding number of sub-data corresponding to low priorities from the third part of sub-data to obtain a fifth part of sub-data; The fifth portion of sub-data is written into the REE memory.

9. The method according to claim 8, characterized in that The method further comprises: The storage space for storing the fifth portion of sub-data in a memory other than the REE memory deployed in the REE is released.

10. The method according to any one of claims 1 to 9, characterized in that: The method further comprises: receiving at least one processed sub-data; the at least one processed sub-data being sub-data generated after the sixth portion of sub-data is executed, the plurality of sub-data including the sixth portion of sub-data; selecting, in accordance with an order in which the at least one processed sub-data and the sub-data in the plurality of sub-data except the sixth portion of sub-data are executed, a corresponding number of sub-data corresponding to low priorities from the at least one processed sub-data and the sub-data in the plurality of sub-data except the sixth portion of sub-data, to obtain a seventh portion of sub-data; Writing the sub-data in the seventh part of the sub-data that is not stored in the TEE memory into the TEE memory; and migrating the sub-data that does not belong to the seventh part of the sub-data already stored in the TEE memory to the REE memory.

11. A data management device, characterized in that: include: A first processing unit is configured to divide the data of a target task into a plurality of sub-data after receiving the target task; a second processing unit, configured to cache the first portion of sub-data into the TEE memory in a case where the remaining storage space of the TEE memory is less than the memory occupied by the data of the target task, according to the order in which the multiple sub-data are executed; the multiple sub-data include the first portion of sub-data, and a time sequence in which the first portion of sub-data is executed takes precedence over a time sequence in which sub-data other than the first portion of sub-data among the multiple sub-data are executed; The TEE memory refers to the memory deployed in the TEE; a third processing unit, configured to cache the sub-data other than the first part of the sub-data among the plurality of sub-data into a rich execution environment (REE) memory; The REE memory refers to the memory deployed in the REE.

12. The device according to claim 11, characterized in that the third processing unit is further configured to, if remaining storage space of the REE memory is smaller than memory occupied by sub-data other than the first part of sub-data among the plurality of sub-data, write the second part of sub-data into the REE memory in the order in which the plurality of sub-data are executed; The sub-data other than the first portion of sub-data in the plurality of sub-data include the second portion of sub-data, and the time sequence in which the second portion of sub-data is executed takes precedence over the time sequence in which the third portion of sub-data is executed; the third portion of sub-data is the sub-data other than the first portion of sub-data and the second portion of sub-data in the plurality of sub-data; The third processing unit is further configured to store the third portion of sub-data in a memory deployed in the REE; the speed of reading and writing data in the memory in the REE is greater than the speed of reading and writing data in the internal memory of the REE.

13. The device according to claim 11 or 12, characterized in that The second processing unit is specifically configured to add priority identifiers to the plurality of sub-data according to the order in which the plurality of sub-data are executed; the sub-data corresponding to a low priority in the priority identifier is the sub-data that is executed first in the time sequence, and the sub-data corresponding to a high priority in the priority identifier is the sub-data that is not executed first in the time sequence; The second processing unit is specifically configured to cache the plurality of sub-data into the TEE memory in order from low priority to high priority; The second processing unit is specifically configured to overflow the sub-data other than the first part of the sub-data among the multiple sub-data to the REE memory, and cache the first part of the sub-data in the TEE memory.

14. The device according to claim 13, characterized in that The third processing unit is specifically configured to cache the sub-data other than the first part of the sub-data among the plurality of sub-data into the REE memory in order from low priority to high priority; The third processing unit is specifically configured to overflow the third portion of sub-data into a memory in the REE, and cache the second portion of sub-data into the REE memory.

15. The device according to any one of claims 12 to 14, characterized in that: The third processing unit is specifically configured to encrypt the sub-data other than the first part of the sub-data among the plurality of sub-data to obtain encrypted sub-data other than the first part of the sub-data among the plurality of sub-data; The third processing unit is specifically configured to cache the encrypted sub-data other than the first part of the sub-data in the REE memory.

16. The device according to any one of claims 11 to 15, characterized in that The third processing unit is further configured to detect whether there is free storage space in the TEE memory; The third processing unit is further configured to select, when there is free storage space in the TEE memory, a corresponding number of sub-data corresponding to low priorities from the second portion of sub-data stored in the REE memory, to obtain a fourth portion of sub-data; The third processing unit is further configured to decrypt the fourth portion of sub-data to obtain the decrypted fourth portion of sub-data; The third processing unit is further configured to write the decrypted fourth portion of sub-data into the TEE memory.

17. The device according to claim 16, characterized in that The third processing unit is further configured to release storage space in the REE memory for storing the fourth portion of sub-data.

18. The device according to any one of claims 11 to 17, characterized in that The third processing unit is further configured to detect whether there is free storage space in the REE memory; The third processing unit is further configured to select a corresponding number of sub-data corresponding to low priorities from the third portion of sub-data to obtain a fifth portion of sub-data when there is free storage space in the REE memory; The third processing unit is further configured to write the fifth portion of sub-data into the REE memory.

19. The device according to claim 18, characterized in that The third processing unit is further configured to release the storage space for storing the fifth portion of sub-data in the memory deployed in the REE except the REE memory.

20. The device according to any one of claims 11 to 19, characterized in that The third processing unit is further configured to receive at least one processed sub-data; the at least one processed sub-data is sub-data generated after the sixth portion of sub-data is executed, and the plurality of sub-data includes the sixth portion of sub-data; the third processing unit is further configured to select, according to an order in which the at least one processed sub-data and the sub-data among the plurality of sub-data except the sixth portion of sub-data are executed, a corresponding number of sub-data corresponding to low priorities from the at least one processed sub-data and the sub-data among the plurality of sub-data except the sixth portion of sub-data, to obtain a seventh portion of sub-data; The third processing unit is further configured to write the sub-data of the seventh portion of sub-data that is not stored in the TEE memory into the TEE memory; And migrating the sub-data that does not belong to the seventh part of sub-data and is already stored in the TEE memory to the REE memory.

21. A computing device, characterized in that include: at least one memory; At least one processor, wherein the processor is configured to execute instructions stored in the memory, so that the computing device performs the method according to any one of claims 1 to 10.

22. A computer-readable storage medium, characterized in that The method comprises computer program instructions, which, when executed by a computing device, causes the computing device to perform the method according to any one of claims 1 to 10.

23. A computer program product comprising instructions, characterized in that The computer program product stores instructions, which, when executed by a computing device, enable the computing device to implement the method according to any one of claims 1 to 10.