Data processing method and apparatus, and computer-readable storage medium

By dividing the computing device hardware resources into the REE side and the TEE side, and running containers and using encrypted data on the TEE side, the security issues between containers are solved, and a high level of security protection for containers and user data is achieved.

CN119149163BActive Publication Date: 2025-12-09HUAWEI TECH CO LTD

Patent Information

Application Number
CN202310705849.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-14
Publication Date
2025-12-09
Estimated Expiration
2043-06-14

AI Technical Summary

Technical Problem

In existing technologies, containers share the same operating system kernel. Once the kernel is compromised, attackers can control all containers, leading to user data leakage and a lack of effective security protection mechanisms.

Method used

The hardware resources of the computing device are divided into the REE side and the TEE side. Containers on the TEE side are protected by hardware security features to prevent kernel attacks on the REE side. Container security is ensured by running containers on the TEE side and using encrypted data and decryption keys.

Benefits of technology

Even if the REE-side kernel is compromised, attackers cannot control the TEE-side container, thus improving the security of container and user data and preventing data theft.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149163B_ABST
    Figure CN119149163B_ABST
Patent Text Reader

Abstract

The application provides a data processing method and device and a computer readable storage medium, which can be applied to a computing device, hardware resources of the computing device are divided into REE and TEE, the TEE includes one or more containers, and the method includes the following steps: a processor of the computing device acquires to-be-processed data in the REE, and then runs a first container in the TEE to process the to-be-processed data, wherein the first container is any container in the one or more containers included in the TEE. The method can reduce the risk of an attack on the container by an attacker, improve the security of the container, and thus improve the security of user data in the container.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of virtualization, and in particular to a data processing method and device and a computer readable storage medium. BACKGROUND

[0002] A container is a lightweight virtualization technology. It uses a namespace supported by a Linux kernel and a cgroup technology for managing processes in groups to isolate an application (APP) and its dependent package (bins / libs, i.e., all files required for running the APP) in an independent running environment. Figure 1 As shown in Figure 1 is a schematic diagram of an architecture of a computing device (such as a server) running a container. The infrastructure can be hardware of the computing device, and the host operating system uses a Linux kernel. The namespace technology is used to achieve isolation between containers, and the cgroup technology is used to achieve allocation of resources of the containers, where the resources are virtual central processing units (VCPU) and memory allocated to the containers. A container engine (also referred to as a container runtime) is similar to a virtual machine monitor (VMM) and runs in the host operating system to manage the containers. Compared with a virtual machine (VM) that has an operating system, a container does not have an operating system and runs as a process in the host operating system. Therefore, the container has a faster startup speed than the VM, is particularly suitable for lightweight applications, and a host can run thousands of containers (processes) at the same time.

[0003] However, the container runs as a process in the host operating system, and different containers share the same operating system kernel. Once the operating system kernel is attacked, the isolation between the containers will be destroyed, that is, once an attacker attacks the operating system kernel, the attacker can control all containers running on the operating system kernel.

[0004] Therefore, how to ensure the security of the containers in the computing device and prevent an attacker from stealing user data (including user data stored in the containers and user data being used by the containers) in the containers has become a major problem in the field. SUMMARY

[0005] The present application provides a data processing method and device and a computer readable storage medium, which can reduce the risk of an attack on the containers by an attacker, improve the security of the containers, and thus improve the security of user data in the containers.

[0006] In a first aspect, a data processing method is provided, which is applied to a computing device, hardware resources of the computing device are divided into a rich execution environment (REE) side and a trusted execution environment (TEE) side, the TEE side includes one or more containers, and the method includes the following steps: a processor acquires to-be-processed data at the REE side, and then runs a first container at the TEE side to process the to-be-processed data, the first container being any container in the one or more containers included in the TEE side.

[0007] In the above solution, since the containers are located at the TEE side of the computing device, when the processor of the computing device runs a host operating system kernel at the REE side, the hardware security features of the TEE protect the containers at the TEE side from being accessed by the host operating system kernel at the REE side, so even if an attacker breaks the host operating system kernel at the REE side, the attacker cannot manipulate the containers running at the TEE side, thereby playing a role in protecting the security of the containers in the computing device and further playing a role in protecting the security of the user data in the containers.

[0008] In a possible implementation, the TEE side includes one or more VMs, and each VM in the one or more VMs includes at least one container in the one or more containers.

[0009] In this implementation, since different VMs at the TEE side include different containers, even if an attacker breaks a container in a certain VM, the attacker can only manipulate the containers running in the VM and cannot manipulate the containers running in another VM, so the security of the containers in the computing device can be further protected and the security of the user data can be further improved.

[0010] In a possible implementation, the to-be-processed data acquired by the processor at the REE side is encrypted data, before the processor runs the first container at the TEE side to process the to-be-processed data, the processor acquires a decryption key for decrypting the encrypted data stored at the TEE side, and then uses the decryption key to decrypt the encrypted data to obtain the to-be-processed data.

[0011] In this implementation, since the to-be-processed data is in an encrypted state at the REE side, and the decryption key is stored at the TEE side, the host operating system kernel and software (such as a virtual machine manager and a normal VM) at the REE side cannot acquire the decryption key stored at the TEE side, so even if an attacker breaks the host operating system kernel and software at the REE side and steals the encrypted data, the attacker cannot decrypt the plaintext of the to-be-processed data, which can meet the requirement that the user data is not stolen by the host operating system kernel and software at the REE side and further improve the security of the user data.

[0012] In a possible implementation, the processor runs the first container on the TEE side in a case where it is determined that the first container is a secure container.

[0013] Specifically, the processor can provide the configuration information (such as a virtual processor core type, a virtual processor core quantity, a memory address, and the like) of the first container, the APP name installed on the first container, and the hash value of the image of the first container, and the like on the REE side to the user for security measurement, that is, to determine, by the user, whether the first container is a secure container meeting the user's expectation or a non-secure container with a security threat. In a case where the processor obtains feedback that the first container is a secure container meeting the user's expectation, the processor determines that the first container is a secure container, and runs the first container to process the user data, otherwise, the processor determines that the first container is a non-secure container, and does not run the first container to process the user data.

[0014] Implementing the implementation, the processor runs the container to process the user data only in a case where it is determined that the container is secure, which can avoid using an insecure container to process the user data, and can not only improve the security of the container, but also improve the security of the user data in the container.

[0015] In a possible implementation, the processor runs the first container on the TEE side in a case where it is determined that the computing device is a secure device.

[0016] Specifically, the processor can provide the certificate of the computing device on the REE side to the user for legality check, that is, to determine, by the user, whether the computing device is a secure device meeting the user's expectation or a non-secure device with a security threat. In a case where the processor obtains feedback that the computing device is a secure device meeting the user's expectation, the processor determines that the computing device is a secure device, and runs the first container to process the user data, otherwise, the processor determines that the computing device is a non-secure device, and does not run the first container to process the user data.

[0017] Implementing the implementation, the processor runs the container to process the user data only in a case where it is determined that the computing device is secure, which can avoid using an insecure computing device to run the container to process the user data, and can not only improve the security of the container, but also improve the security of the user data in the container.

[0018] In a possible implementation, before the processor obtains the to-be-processed data on the REE side, the processor can create the first container in the following manner: the processor obtains configuration information of one or more VMs to be created on the REE side, and creates the one or more VMs on the TEE side according to the configuration information; then the processor obtains an image of the first container on the REE side, and obtains an identifier of a first VM used to create the first container on the REE side; and then the processor creates the first container in the first VM according to the image of the first container on the TEE side, where the first VM belongs to the one or more VMs.

[0019] According to the implementation, the VM is created on the TEE side, and the container is created in the VM on the TEE side, so that container isolation at the VM level can be implemented.

[0020] In a possible implementation, the method provided in the first aspect or any possible implementation of the first aspect further includes the following steps: the processor obtains, on the REE side, a first management command for a life cycle of the first container, and the processor performs, on the TEE side, one or any combination of the following operations on the first container according to the first management command: starting the first container, stopping the first container, removing the first container, migrating the first container, viewing an image of the first container, and removing the image of the first container.

[0021] The implementation can implement management of the life cycle of the container on the TEE side.

[0022] In a possible implementation, the method provided in the first aspect or any possible implementation of the first aspect further includes the following steps: the processor obtains, on the REE side, a second management command for the first container, and the processor performs, on the TEE side, one or any combination of the following operations on the first container according to the second management command: installing an application program, starting the application program, closing the application program, upgrading the application program, uninstalling the application program, and migrating the application program.

[0023] The implementation can implement management of the application program in the container on the TEE side.

[0024] In a possible implementation, the REE side is deployed with a container runtime and a first virtual machine manager, the TEE side is deployed with a second virtual machine manager, a container agent module is deployed in a VM to which the first container belongs, the operations performed by the processor on the REE side are performed in cooperation with the processor running the container runtime and the first virtual machine manager, and the operations performed by the processor on the TEE side are performed in cooperation with the processor running the second virtual machine manager and the container agent module.

[0025] In a possible implementation, the VM to which the first container belongs includes a VirtIO front-end driver, and the first virtual machine manager includes a VirtIO back-end driver, and the method provided by the first aspect or any possible implementation of the first aspect further includes: the processor runs the VirtIO front-end driver and the VirtIO back-end driver to cooperatively simulate a virtualized I / O device for the first container.

[0026] This implementation enables the first container to perform I / O communication through the virtualized I / O device.

[0027] In a possible implementation, the TEE side includes a first memory for data transmission between the VirtIO front-end driver and the VirtIO back-end driver, the REE side includes a second memory, and the second virtual machine manager includes a memory synchronization module, the memory synchronization module includes a mapping relationship between the first memory and the second memory, and the method provided by the first aspect or any possible implementation of the first aspect further includes: the processor runs the memory synchronization module to synchronize first data in the first memory to the second memory according to the mapping relationship between the first memory and the second memory, where the first data is data that the VirtIO front-end driver needs to send to the VirtIO back-end driver, or the processor runs the memory synchronization module to synchronize second data in the second memory to the first memory according to the mapping relationship between the first memory and the second memory, where the second data is data that the VirtIO front-end driver needs to receive from the VirtIO back-end driver.

[0028] This implementation enables the first container to perform read / write operations on the VirtIO back-end driver, thereby meeting the read / write requirements of the first container.

[0029] In a second aspect, a data processing apparatus is provided, which can be applied to a computing device, hardware resources of the computing device are divided into an REE side and a TEE side, the TEE side includes one or more containers, and the apparatus includes:

[0030] The obtaining module is configured to obtain, on the REE side, to-be-processed data.

[0031] The processing module is configured to run, on the TEE side, the first container to process the to-be-processed data, and the first container is any container in the one or more containers included in the TEE side.

[0032] In a possible implementation, the TEE side includes one or more VMs, and each of the one or more VMs includes at least one container in the one or more containers.

[0033] In a possible implementation, the to-be-processed data acquired by the acquisition module on the REE side is encrypted data, and before the processing module runs the first container on the TEE side to process the to-be-processed data, the processing module further acquires a decryption key stored on the TEE side on the TEE side, and then decrypts the encrypted data by using the decryption key to obtain the to-be-processed data.

[0034] In a possible implementation, the processing module is specifically configured to run the first container on the TEE side in a case where it is determined that the first container is a secure container.

[0035] In a possible implementation, the processing module is specifically configured to run the first container on the TEE side in a case where it is determined that the computing device is a secure device.

[0036] In a possible implementation, the acquisition module is further configured to acquire, on the REE side, configuration information of the one or more VMs to be created, the processing module is further configured to create the one or more VMs on the TEE side according to the configuration information, the acquisition module is further configured to acquire, on the REE side, an image of the first container, and acquire, on the REE side, an identifier of a first VM used to create the first container, and then the processing module is further configured to create, on the TEE side, the first container in the first VM according to the image of the first container according to the identifier of the first VM, the first VM belonging to the one or more VMs.

[0037] In a possible implementation, the acquisition module is configured to acquire, on the REE side, a first management command for the life cycle of the first container, and the processing module is configured to execute, on the TEE side, one or any combination of the following operations on the first container according to the first management command: starting the first container, stopping the first container, removing the first container, migrating the first container, viewing an image of the first container, and removing the image of the first container.

[0038] In a possible implementation, the acquisition module is configured to acquire, on the REE side, a second management command for the first container, and the processing module is configured to execute, on the TEE side, one or any combination of the following operations on the first container according to the second management command: installing, starting, closing, upgrading, uninstalling, and migrating an APP.

[0039] In a possible implementation, the REE side is deployed with a container runtime and a first virtual machine manager, the TEE side is deployed with a second virtual machine manager, a container agent module is deployed in a VM to which the first container belongs, and operations performed by the processor on the REE side are performed by the processor running the container runtime and the first virtual machine manager in cooperation, and operations performed by the processor on the TEE side are performed by the processor running the second virtual machine manager and the container agent module in cooperation.

[0040] In a possible embodiment, the processing module is further configured to simulate a virtualized I / O device for the first container.

[0041] In a possible implementation, the processing module is further configured to synchronize first data in the first memory to the second memory according to the mapping relationship between the first memory and the second memory, the first data being data that the VirtIO front-end driver needs to send to the VirtIO back-end driver, or synchronize second data in the second memory to the first memory according to the mapping relationship between the first memory and the second memory, the second data being data that the VirtIO front-end driver needs to receive from the VirtIO back-end driver. The first memory is a memory included in the TEE side and used for data transmission between the VirtIO front-end driver and the VirtIO back-end driver, and the second memory is a memory on the REE side. The VirtIO front-end driver is deployed in a virtual machine to which the first container belongs, and the VirtIO back-end driver is deployed in the first virtual machine manager on the REE side.

[0042] The data processing apparatus provided in the second aspect and the related beneficial effects and descriptions of any of the implementation manners of the second aspect can refer to the foregoing first aspect and the related beneficial effects and descriptions of any of the implementation manners of the first aspect, which will not be described herein again.

[0043] In a third aspect, a computing device is provided, which includes a processor and a memory. The processor is configured to execute instructions stored in the memory, so that the computing device implements the method provided in the foregoing first aspect or any possible implementation manner of the first aspect.

[0044] In a fourth aspect, a computer-readable storage medium is provided, which stores instructions for implementing the method provided in the foregoing first aspect or any possible implementation manner of the first aspect.

[0045] In a fifth aspect, a computer program product is provided, which includes a computer program. When the computer program is read and executed by a computing device, the computer program causes the computing device to perform the method provided in the foregoing first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0046] Figure 1 An architecture schematic diagram of a computing device running a container is provided for an embodiment of the present application;

[0047] Figure 2 A hardware architecture schematic diagram of an ARM processor is provided for an embodiment of the present application;

[0048] Figure 3 A structure schematic diagram of a computing device is provided for an embodiment of the present application;

[0049] Figure 4A flowchart of a data processing method provided by an embodiment of the present application is shown in FIG. 1;

[0050] Figure 5 A structural diagram of another computing device provided by an embodiment of the present application is shown in FIG. 2;

[0051] Figure 6 A process diagram of starting a trusted container by a computing device provided by an embodiment of the present application is shown in FIG. 3;

[0052] Figure 7 A structural diagram of another computing device provided by an embodiment of the present application is shown in FIG. 4;

[0053] Figure 8 A process diagram of implementing I / O communication of a trusted container by a computing device provided by an embodiment of the present application is shown in FIG. 5;

[0054] Figure 9 A structural diagram of a data processing apparatus provided by an embodiment of the present application is shown in FIG. 6;

[0055] Figure 10 A structural diagram of another computing device provided by an embodiment of the present application is shown in FIG. 7. DETAILED DESCRIPTION

[0056] The technical solutions provided by the present application will be described in detail below with reference to the accompanying drawings.

[0057] In order to make the technical solutions provided by the present application clearer, the related terms are explained first.

[0058] (1) I / O device, refers to the hardware that can perform data transmission with the computing device, the most common I / O devices are keyboard, mouse, block device (such as disk), network device (such as network card, modem, etc.).

[0059] (2) VirtIO, which can be understood as a set of virtualization programs of general I / O devices. Specifically, VirtIO includes a front-end driver program and a back-end driver program. The front-end driver program cooperates with the back-end driver program to simulate a series of virtualized I / O devices, such as VirtIO-BLK and VirtIO-NET. VirtIO-BLK is a virtualized storage device. In fact, VirtIO-BLK is a virtualization program for creating a disk (a kind of I / O device). A virtualized disk can be created through VirtIO-BLK. VirtIO-NET is a virtualized network device. Similarly, VirtIO-NET is a virtualization program for creating a network device. A virtualized network device (for example, a virtualized network interface controller, VNIC) can be created through VirtIO-NET.

[0060] (3) Normal VM, which refers to a VM included in the REE.

[0061] (4) Trusted VM, which refers to a VM included in the TEE. The trusted VM can also be referred to as a confidential VM.

[0062] (5) Normal container, which refers to a container included in the REE.

[0063] (6) Trusted container, which refers to a container included in the TEE. The trusted container can also be referred to as a confidential container.

[0064] (7) Container runtime, which can also be referred to as a container engine. The container runtime is a program for creating and running a container based on an obtained container image. Examples of the container runtime include a container orchestration engine (Kubernetes, k8s for short), a container daemon (containerd), and an application container engine (docker). The container runtime can manage the life cycle of a container (including creating / starting / stopping / removing the container) and the life cycle of a container image (including pulling / viewing / removing the container image).

[0065] (8) Container image, which is a special file system. In addition to providing programs, libraries, resources, and configuration files required by the container runtime, the container image also contains some configuration parameters (such as anonymous volumes, environment variables, and users) prepared for the runtime. The relationship between the container image and the container is similar to that between a class and an instance in object-oriented programming. The container image is a static definition, and the container is an entity running at runtime.

[0066] For example, Figure 1As shown, the container runs in the host operating system as a process, and different containers share the same operating system kernel, and once the operating system kernel is attacked, the isolation between the containers will be destroyed, that is, once the attacker attacks the operating system kernel, it will be able to manipulate all containers running on the operating system kernel and steal user data in the containers.

[0067] Therefore, how to ensure the security of the container in the computing device and prevent the attacker from stealing the user data in the container has become a problem to be solved in the field.

[0068] In order to solve the above problems, the present application provides a computing device and a data processing method. In order to facilitate understanding of the computing device and the data processing method provided by the present application, the TrustZone technology related by the present application will be introduced first.

[0069] With the continuous improvement of the performance of advanced RISC machines (ARM) processors, computing devices (such as servers and intelligent terminal devices) running ARM processors have brought great convenience to people's life. At the same time, more and more user data is carried on the computing device, and users also pay more and more attention to the security of the computing device. On the ARM processor, the current mainstream system-level solution is the TrustZone technology.

[0070] The TrustZone technology, as a security expansion, was first introduced in the ARMv6 version, which divides the hardware resources of the computing device into two worlds, the REE side (also can be called the normal world) and the TEE side (also can be called the secure world). The TrustZone works in the TEE side as a hardware security feature.

[0071] The REE side does not mean that the operating system (OS) or software running therein is malicious, but the security of the environment in which it is located is lower than that of the TEE side. Because when the processor works in the REE side, the resources of the TEE side (such as registers, memory, cache, peripherals, etc.) are prohibited from being accessed, and once the processor tries to access these resources, the system will directly crash. For example, TrustZone can set sensitive memory as secure memory through the trustzone address space contoller (TZASC) register and the trustzone memory adapter (TZMA) register, and the REE side cannot access this piece of memory. When the processor works in the TEE side, it can access both the resources of the TEE side and the resources of the REE side. It is because the TEE side has higher permissions than the operating system of the REE side that TrustZone can provide a higher level of security protection scheme for the operating system of the REE side as a trusted root.

[0072] Taking ARMv8.4 as an example, Figure 2 The hardware architecture of ARM is described, the left side is the architecture of the REE side, and the right side is the architecture of the TEE side. The REE side includes four working permission layers: an exception level 0 (EL0) layer, an EL1 layer, an EL2 layer, and an EL3 layer. The TEE side also includes four layers: a secure exception level 0 (SEL0) layer, an SEL1 layer, an SEL2 layer, and an EL3 layer. Among them, the EL0 layer can also be referred to as the user state layer, the EL1 layer can also be referred to as the kernel state layer, the EL2 layer can also be referred to as the hypervisor layer, and the EL3 layer can also be referred to as the monitor layer. The higher the level of the value, the higher the level of the permission, and the lower the value, the lower the level of the permission.

[0073] The operating system closely related to the user runs in the EL0 layer of the REE side, such as the operating system of the virtual machine running in the EL0 layer. The host operating system runs in the EL1 layer. The virtual machine manager runs in the EL2 layer. The ARM trusted firmware (ATF) runs in the EL3 layer, which is the first component running when the processor starts. The ARM trusted firmware can provide many services, such as platform initialization, installation of a trusted operating system, and routing of commands of the EL3 layer.

[0074] The following section continues by describing the computing device provided in this application. The computing device provided in this application is primarily a computing device running the aforementioned ARM processor. Please refer to... Figure 3 , Figure 3 A schematic diagram of a computing device 300 provided in an embodiment of this application is shown below. Figure 3 As shown, the hardware resources of the computing device 300 are divided into the REE side and the TEE side, with the host operating system kernel (also referred to as the host kernel) located on the REE side. The virtual machine manager in the host operating system kernel (also referred to as the virtual machine manager on the REE side, such as QEMU) is used to manage ordinary VMs on the REE side, such as creating, starting, and removing ordinary VMs.

[0075] The TEE side includes one or more trusted VMs. Figure 3 In this example, taking the TEE side as including two trusted VMs, the REE side can include one or more ordinary VMs. Figure 3 In this example, the REE side includes two ordinary VMs.

[0076] A trusted VM is similar to a regular VM, consisting of an operating system kernel and one or more trusted containers, each containing an application. Figure 3 In this example, each VM contains two trusted containers. Each trusted VM can be understood as a Pod. A Pod is the smallest unit created or deployed in Kubernetes. A Pod encapsulates one or more containers, storage resources, a unique network IP address, and policy options for managing and controlling how the containers run.

[0077] The operating system kernel in the trusted VM can be a powerful general-purpose kernel such as Linux; that is, the operating system in the trusted VM can be a powerful general-purpose operating system such as Linux. The trusted container can be created using a powerful general-purpose container image such as a Linux image, or it can be other types of general-purpose container images; this application does not specifically limit this. It is understood that when the trusted container is created using a Linux image, the application in the trusted container can be migrated from a traditional Linux container.

[0078] In specific implementations, the trusted VM and the ordinary VM can include one or more containers. Figure 3 In this example, each VM includes one container.

[0079] It should be understood that the computing device 300 is merely an example provided in the embodiments of this application, and the computing device 300 may have more than Figure 3 The components shown may have more or fewer components, or may be implemented with different configurations of components.

[0080] The flowchart of the data processing method provided by the embodiments of the present application is shown in Figure 4 The process of the computing device 300 processing user services is described in detail. Figure 3

[0081] As shown in Figure 4 The method comprises the following steps:

[0082] S401: The processor of the computing device 300 acquires the to-be-processed data on the REE side.

[0083] S402: The processor injects the to-be-processed data into a first container on the TEE side, and the first container is any trusted container in one or more trusted containers included on the TEE side.

[0084] S403: The processor runs the first container on the TEE side to process the to-be-processed data.

[0085] The to-be-processed data can be a face image to be processed for face recognition, a voice signal to be processed for voice recognition, text data to be processed for text recognition, etc., can also be a model to be trained and training data, and can also be data to be encrypted and stored, and the present application does not make specific limitations on the to-be-processed data.

[0086] The to-be-processed data can be input by the user to the computing device 300 through an interface provided by the computing device 300. After the computing device 300 acquires the to-be-processed data input by the user, the to-be-processed data is stored in the memory on the REE side, and the processor reads the to-be-processed data from the memory on the REE side and runs the first container for processing.

[0087] In this embodiment, when the to-be-processed data is a face image to be processed for face recognition, a voice signal to be processed for voice recognition, or text data to be processed for text recognition, after the processor runs the first container on the TEE side to recognize the face image / voice signal / text data and obtains the corresponding recognition result, the recognition result can be provided to the user on the REE side. When the to-be-processed data is a model to be trained and training data, after the processor runs the first container on the TEE side to train the model using the training data and obtains a trained model, the trained model can be provided to the user on the REE side. That is, the trusted container on the TEE side communicates with the external network of the computing device 300 through the REE side. It can be understood that in this way, the risk of the trusted container being attacked by attackers of the external network can be reduced, and the security of the trusted container can be improved.

[0088] When the to-be-processed data is data to be encrypted and stored, the processor can store the data to the corresponding position after encrypting the data on the TEE side. ​

[0089] In a possible embodiment, in S401, the processor obtains encrypted data as the to-be-processed data on the REE side, before the processor performs S402, the processor obtains a decryption key for decrypting the encrypted data stored on the TEE side, and then decrypts the encrypted data using the decryption key to obtain the plaintext of the to-be-processed data. Only then does the processor inject the plaintext of the to-be-processed data into the first container on the TEE side for processing. That is, the to-be-processed data exists in an encrypted state on the REE side, and the decryption key is stored on the TEE side, and the host operating system kernel and software (such as QEMU, a normal VM, and the like) on the REE side cannot obtain the decryption key stored on the TEE side, so even if an attacker attacks the host operating system kernel and software on the REE side and steals the encrypted data, the attacker cannot decrypt the plaintext of the to-be-processed data. This can meet the requirement that user data is not stolen by the host operating system kernel and software on the REE side, and further improves the security of user data.

[0090] It can be understood that, before the processor of the computing device 300 performs the data processing method shown in FIG. 4, it is necessary to first create one or more trusted VMs on the TEE side, and create a trusted container in each of the one or more trusted VMs. In this application, after the computing device 300 creates the one or more trusted VMs and the trusted container on the TEE side, the computing device 300 can also manage the one or more trusted VMs and the trusted container, and the like. The above process is described in detail below. Figure 4 (1) The computing device 300 creates a trusted VM on the TEE side:

[0091] The processor of the computing device 300 obtains configuration information of a to-be-created trusted VM on the REE side, and then creates a trusted VM on the TEE side according to the configuration information of the trusted VM. The configuration information includes specifications of the to-be-created trusted VM, such as the size of the memory, the type of the memory, the size of the memory, the type of the memory, the type of the processor core, the number of the processor core, the calculation speed of the processor core, the number of the kernel of the processor core, the network bandwidth, the operating system kernel, and the file system, and the like. When creating the trusted VM, the processor can provide the trusted VM with virtual hardware resources matched with the configuration information based on the configuration information, for example, divide a secure memory matched with the memory information from the memory resources on the TEE side based on the memory information included in the configuration information, simulate a virtual processor core matched with the processor core information for the trusted VM based on the processor core information included in the configuration information, and load the operating system kernel and the file system included in the configuration information into the secure memory corresponding to the trusted VM, and the like, so as to realize the creation of the trusted VM.

[0092]

[0093] ​(2) The computing device 300 creates a trusted container in a trusted VM on the TEE side:

[0094] The processor of the computing device 300 acquires an image of a first container to be created on the REE side, and acquires an identification of a first VM for creating the first container, then locates the first VM in one or more trusted VMs included on the TEE side according to the identification of the first VM, thereafter loads the image of the first container into a memory partitioned for the first container in the memory of the first VM, and finally creates the first container using the image of the first container in the memory.

[0095] The image of the first container described above can be any type of container image such as a linux image, and the present application does not make a specific limitation thereto.

[0096] (3) The computing device 300 manages the trusted container:

[0097] ① The computing device 300 manages the life cycle of the trusted container.

[0098] The processor of the computing device 300 can acquire a first management command for the life cycle of the trusted container on the REE side, and thereafter execute one or any combination of the following operations on the trusted container on the TEE side according to the first management command: starting the trusted container, stopping the trusted container, removing the trusted container, migrating the trusted container, viewing the image of the trusted container, and removing the image of the trusted container.

[0099] ② The computing device 300 manages the APP on the trusted container.

[0100] The processor of the computing device 300 can acquire a second management command for the trusted container on the REE side, and thereafter execute one or any combination of the following operations on the trusted container on the TEE side according to the second management command: installing, starting, closing, upgrading, uninstalling, and migrating the APP.

[0101] ③ The computing device 300 checks the security of the trusted container before running the trusted container, and checks the security of the computing device 300.

[0102] In a possible implementation, the processor can provide the configuration information (such as the virtual processor core type, the virtual processor core number, the memory address, and the like) of the trusted container, the APP name installed on the trusted container, and the hash value of the image of the trusted container, and the like to the user on the REE side for security measurement, that is, the user determines whether the trusted container is a secure container meeting the user's expectation or a non-secure container with a security threat. In a case where the processor obtains feedback that the user determines that the trusted container is a secure container meeting the user's expectation, the processor determines that the trusted container is a secure container, and runs the trusted container to process the user data, otherwise, the processor determines that the trusted container is a non-secure container, and does not run the trusted container to process the user data. Alternatively, the processor can also check the security of the trusted container in other manners, which is not limited in the present application.

[0103] In a possible implementation, the processor can provide the certificate of the computing device 300 to the user on the REE side for legality check, that is, the user determines whether the computing device 300 is a secure device meeting the user's expectation or a non-secure device with a security threat. In a case where the processor obtains feedback that the user determines that the computing device 300 is a secure device meeting the user's expectation, the processor determines that the computing device 300 is a secure device, and runs the trusted container to process the user data, otherwise, the processor determines that the computing device 300 is a non-secure device, and does not run the trusted container to process the user data. Alternatively, the processor can also check the security of the computing device 300 in other manners, which is not limited in the present application.

[0104] Alternatively, if the processor detects that the configuration information of the trusted container, the APP name installed on the trusted container, and the hash value of the image of the trusted container, and the like are changed in the process of running the trusted container, the processor can re-determine the security of the changed trusted container, and run the changed trusted container in a case where the changed trusted container is determined to be secure, otherwise, the changed trusted container is refused to be run.

[0105] Alternatively, if the processor detects that the certificate of the computing device 300 is expired or detects that the computing device 300 has a security risk in the process of running the trusted container, the processor can remind the user that the certificate of the computing device 300 is expired on the REE side or provide the user that the computing device 300 has a security risk, and let the user determine whether to continue to use the computing device 300 to run the trusted container.

[0106] It can be understood that the security of the trusted container and the security of the computing device 300 are checked before the trusted container is run, and the security of the trusted container and the computing device 300 is continuously monitored in the process of running the trusted container, which can improve the security of the trusted container, and thus improve the security of the user data stored or used in the trusted container.

[0107] (4) The computing device 300 simulates a virtualized I / O device for the trusted container to use.

[0108] Before running the trusted container, the processor of the computing device 300 can also simulate a virtualized I / O device such as a virtualized disk, a VNIC, etc. for the trusted container to use, so that the computing device 300 can realize I / O communication of the trusted container through VirtIO technology. It should be understood that the virtualized I / O device can also include others, which are not limited in the present application.

[0109] (5) The computing device 300 manages the communication between the trusted container and the external network of the computing device 300.

[0110] The processor of the computing device 300 can forward the data related to the trusted container from the external network of the computing device 300 acquired on the REE side to the trusted container on the TEE side, and can also provide the data of the trusted container sent to the external network of the computing device 300 to the external network of the computing device 300 on the REE side.

[0111] It should be noted that in addition to performing the above operations, the processor of the computing device 300 can also perform other operations, such as creating, modifying or destroying the secondary page table on the REE side and / or the TEE side, and the present application does not limit the operations that the processor of the computing device 300 can perform.

[0112] In a possible embodiment, in addition to including the trusted VM, the TEE side of the computing device 300 can also include a virtual machine manager for managing the trusted VM, such as Figure 5 As shown in FIG. 8, in order to distinguish the virtual machine manager on the TEE side for managing the trusted VM from the virtual machine manager on the REE side for managing the ordinary VM on the REE side, in the following embodiments, the virtual machine manager on the REE side for managing the ordinary VM on the REE side is referred to as the first virtual machine manager, and the virtual machine manager on the TEE side for managing the trusted VM on the TEE side is referred to as the second virtual machine manager. Specifically, the second virtual machine manager runs on the SEL2 layer on the TEE side.

[0113] In Figure 5 the host operating system kernel on the REE side of the computing device 300 also includes a container runtime. A container agent module is also deployed in each trusted VM, and the container agent module is used to proxy the trusted container in the trusted VM to which the container agent module belongs, such as creating the trusted container, starting the trusted container, forwarding the data from the trusted container to other devices / components or forwarding the data from other devices / components to the trusted container, etc.

[0114] InFigure 5 In the computing device 300 shown, the operations performed by the processor of the computing device 300 on the REE side can be implemented by the processor running the container runtime on the REE side and the first virtual machine manager in cooperation, and the operations performed by the processor of the computing device 300 on the TEE side can be implemented by the processor running the second virtual machine manager on the TEE side and the container agent module in cooperation. Taking the processor of the computing device 300 starting a trusted container as an example, referring to the flowchart shown in Figure 6 The flowchart shown can include the following steps:

[0115] S601: The processor runs the container runtime on the REE side, generates a first management command, and the first management command is used to start a trusted container.

[0116] The container runtime can be k8s, containerd, docker, etc.

[0117] The specific process in which the processor runs the container runtime on the REE side to generate the first management command can be that the processor runs a shim process in the container runtime on the REE side to generate the first management command. The shim process is a component of the container runtime, and is mainly used to decouple the container runtime and the container process. The container runtime invokes a package function of a runc tool through the shim process to start the trusted container, that is, to generate the first management command.

[0118] The shim process allows the runc tool in the container runtime to exit after creating and running the trusted container, and serves as the parent process of the trusted container, instead of the container runtime serving as the parent process. The purpose of this is to ensure that the trusted container is not affected when the trusted container runtime hangs, because the shim process is still running normally. In addition, the shim process can also collect the exit status of the trusted container and report it to the container runtime.

[0119] S602: The processor running the container runtime on the REE side passes the first management command to the first virtual machine manager on the REE side.

[0120] S603: The processor running the first virtual machine manager on the REE side passes the first management command to the second virtual machine manager on the TEE side.

[0121] S604: The processor running the second virtual machine manager on the TEE side starts a trusted VM to which the trusted container belongs.

[0122] S605: The processor running the container agent module in the trusted VM to which the trusted container belongs on the TEE side executes the first management command to start the trusted container.

[0123] The process of the processor of the computing device 300 managing (such as stopping the trusted container, removing the mirror image of the trusted container, etc.) the trusted container is similar to the process of starting the trusted container shown in FIG. 3, and for the sake of brevity of the description, the process of starting the trusted container is not described here again. Figure 6 The process of starting the trusted container shown in FIG. 3 is similar, and for the sake of brevity of the description, the process of starting the trusted container is not described here again.

[0124] In a possible embodiment, as shown in FIG. 4, the REE side further includes a shadow of the trusted VM. The shadow of the trusted VM can be used to save the context of the trusted VM by the processor when the processor stops running the trusted VM and runs other programs. When the processor finishes executing the other programs and resumes running the trusted VM, the processor restores the context of the trusted VM saved in the shadow of the trusted VM to the trusted VM, thereby resuming the running of the trusted VM. Figure 5

[0125] In a possible embodiment, the processor of the computing device 300 can simulate a virtualized I / O device for the trusted container by using a VirtIO technology or the like.

[0126] When the computing device 300 simulates a virtualized I / O device for the trusted container by using the VirtIO technology, as shown in FIG. 5, the trusted VM on the TEE side in the computing device 300 further includes a VirtIO front-end driver in addition to the trusted container and the container agent module, the first virtual machine manager includes a VirtIO back-end driver, the second virtual machine manager includes a memory synchronization module, the memory resources on the TEE side include a first memory (VRING) (not shown in the figure) for data transmission of the VirtIO front-end driver and the VirtIO back-end driver, Figure 7 the memory resources on the REE side include a second memory (not shown in the figure) that is in a mapping relationship with the first memory. Figure 7 The second memory can be regarded as a shadow memory of the first memory, and the second memory is usually the same size as the first memory. Figure 7 In the computing device 300 shown in FIG. 5, specifically, the processor of the computing device 300 can run the VirtIO back-end driver to create a virtualized I / O device, and then run the VirtIO front-end driver in the trusted VM to load the virtualized I / O device after starting the trusted VM, thereby achieving simulation of the virtualized I / O device. In this way, the computing device 300 can achieve I / O communication of the trusted container by using the VirtIO technology.

[0127] Figure 7

[0128] ​​​The memory synchronization module is configured to synchronize data (hereinafter referred to as first data) in the first memory, which is to be sent by the VirtIO front-end driver to the VirtIO back-end driver, to the second memory, and to synchronize data (hereinafter referred to as second data) in the second memory, which is to be sent by the VirtIO back-end driver to the VirtIO front-end driver, to the first memory, in the process of implementing the I / O communication operation of the trusted container by the computing device 300 through the VirtIO technology. The first data can also be understood as data that the trusted container needs to transmit to the external network of the computing device 300, and the second data can also be understood as data that the trusted container needs to receive from the external network of the computing device 300.

[0129] Next, the process of implementing the I / O communication of the trusted container by the computing device 300 through the VirtIO technology will be described in detail. Figure 7

[0130] (1) Taking the I / O communication as a write operation for example, as shown in Figure 8 the communication process specifically includes the following steps:

[0131] S801: The processor runs the VirtIO front-end driver to write the first data into the first memory, and the first memory is the memory on the TEE side for data transmission between the VirtIO front-end driver and the VirtIO back-end driver.

[0132] S802: The processor runs the memory synchronization module in the second virtual machine manager to synchronize the first data in the first memory to the second memory according to the mapping relationship between the first memory and the second memory.

[0133] S803: The processor runs the VirtIO back-end driver to read the first data from the second memory.

[0134] (2) Taking the I / O communication as a read operation for example, as shown in Figure 8 the communication process specifically includes the following steps:

[0135] S804: The processor runs the VirtIO back-end driver to write the second data into the second memory.

[0136] S805: The processor runs the memory synchronization module to synchronize the second data in the second memory to the first memory according to the mapping relationship between the first memory and the second memory.

[0137] S806: The processor runs the VirtIO front-end driver to read the second data from the first memory.

[0138] ​It can be seen that in the computing device 300 and the data processing method provided in the present application, the processor of the computing device 300 creates a trusted container on the TEE side and runs the trusted container to process user business on the TEE side. Since the trusted container is deployed on the TEE side, the hardware security features of the TEE can protect the trusted container on the TEE side from being accessed by the host operating system kernel on the REE side. Therefore, even if an attacker breaks into the host operating system kernel on the REE side, the attacker cannot manipulate the trusted container running on the TEE side, thereby protecting the security of the container in the computing device and further protecting the security of the user data in the container.

[0139] In addition, since different trusted containers are included in different trusted VMs on the TEE side, even if an attacker breaks into a trusted container in a certain trusted VM, the attacker can only manipulate the trusted container running in the trusted VM and cannot manipulate the trusted container running in another trusted VM. Therefore, this scheme can further protect the security of the container in the computing device and improve the security of the user data.

[0140] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution. The execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0141] The data processing method provided in the present application is described in detail above. Based on the same inventive concept, the data processing apparatus and the computing device provided in the present application are further introduced below.

[0142] It should be understood that the unit modules inside the data processing apparatus can also be divided in various ways. Each module can be a software module, a hardware module, or a combination of a software module and a hardware module. The present application does not limit this.

[0143] Referring to Figure 9 , Figure 9 A structural schematic diagram of a data processing apparatus 900 exemplarily shown by an embodiment of the present application can be applied to Figure 3 , Figure 5 , Figure 7 The hardware resources shown in FIG. 9 are divided into the computing device 300 on the REE side and the TEE side, as shown in FIG. 1. Figure 9 The data processing apparatus 900 includes an acquisition module 910 and a processing module 920. The functions of each module of the data processing apparatus 900 are exemplarily introduced below. It should be understood that the functions of each module described below are only the functions that the data processing apparatus 900 can have in some embodiments of the present application, and the present application does not limit the functions of each module.

[0144] The obtaining module 910 is configured to obtain, on the REE side, the data to be processed.

[0145] The processing module 920 is configured to run, on the TEE side, the first container to process the data to be processed, the first container being any one of one or more containers (i.e., trusted containers) included on the TEE side.

[0146] In a possible implementation, the TEE side includes one or more VMs (i.e., the trusted VMs described above), and each of the one or more VMs includes at least one of the one or more containers.

[0147] In a possible implementation, the data to be processed obtained by the obtaining module 910 on the REE side is encrypted data, and before the processing module 920 runs the first container on the TEE side to process the data to be processed, the processing module 920 is further configured to obtain, on the TEE side, a decryption key stored on the TEE side, and then decrypt the encrypted data by using the decryption key to obtain plaintext of the data to be processed.

[0148] In a possible implementation, as shown in FIG. 9, the data processing apparatus 900 further includes a first verification module 930 configured to verify whether the first container is a secure container, and the processing module 920 runs the first container on the TEE side in a case where the first verification module 930 determines that the first container is a secure container. Figure 9

[0149] In a possible implementation, as shown in FIG. 9, the data processing apparatus 900 further includes a second verification module 940 configured to determine whether a computing device 300 to which the data processing apparatus 900 belongs is a secure device, and the processing module 920 runs the first container on the TEE side in a case where the second verification module 940 determines that the computing device 300 is a secure device. Figure 9

[0150] In a possible implementation, the obtaining module 910 is further configured to obtain, on the REE side, configuration information of the one or more VMs to be created, and the processing module 920 is configured to create the one or more VMs on the TEE side according to the configuration information, the obtaining module 910 is further configured to obtain, on the REE side, an image of the first container, and obtain, on the REE side, an identifier of a first VM used to create the first container, and then the processing module 920 is configured to create, on the TEE side, the first container in the first VM according to the image of the first container, according to the identifier of the first VM, the first VM belonging to the one or more VMs.

[0151] ​​In a possible implementation, the obtaining module 910 is configured to obtain, on the REE side, a first management command for the first container; and the processing module 920 is configured to perform, on the TEE side, one or any combination of the following operations on the first container according to the first management command: starting the first container, stopping the first container, removing the first container, migrating the first container, viewing an image of the first container, and removing the image of the first container.

[0152] In a possible implementation, the obtaining module 910 is configured to obtain, on the REE side, a second management command for the first container; and the processing module 920 is configured to perform, on the TEE side, one or any combination of the following operations on the first container according to the second management command: installing, starting, closing, upgrading, uninstalling, and migrating an APP.

[0153] In a possible implementation, the processing module 920 is further configured to provide, on the REE side, a processing result to a user, the processing result being obtained by the processor by processing the to-be-processed data using the first container on the TEE side.

[0154] In a possible implementation, the processing module 920 is further configured to simulate a virtualized I / O device for use by the first container. Optionally, the processing module 920 can simulate the virtualized I / O device for use by the first container by using a VirtIO technology.

[0155] In a possible implementation, the processing module 920 is further configured to synchronize, according to a mapping relationship between a first memory and a second memory, first data in the first memory to the second memory, the first data being data that needs to be sent, by a VirtIO front-end driver, to a VirtIO back-end driver, or to synchronize, according to the mapping relationship between the first memory and the second memory, second data in the second memory to the first memory, the second data being data that needs to be received, by the VirtIO front-end driver, from the VirtIO back-end driver. The first memory is a memory included on the TEE side and used for data transmission between the VirtIO front-end driver and the VirtIO back-end driver, and the second memory is a memory on the REE side. The VirtIO front-end driver is deployed in a virtual machine to which the first container belongs, and the VirtIO back-end driver is deployed in a first virtual machine manager on the REE side.

[0156] Specifically, the specific implementation of the data processing apparatus 900 performing various operations can refer to the description in the related content in the foregoing data processing method embodiments, and details are not described herein for the sake of brevity of the description.

[0157] Referring to Figure 10 , Figure 10This is another schematic diagram of the computing device 300 provided in an embodiment of this application. The computing device 300 includes: a processor 310, a memory unit 320, a communication interface 330, a memory 340, an input device 350, and an output device 360. The processor 310, memory unit 320, communication interface 330, memory 340, input device 350, and output device 360 ​​are interconnected via a bus 370.

[0158] The processor 310 can read the program code (including instructions) stored in the memory unit 320 and execute the program code stored in the memory unit 320, so that the computing device 300 performs the steps in the data processing method provided in the above method embodiments.

[0159] Processor 310 can have various specific implementations; for example, processor 310 can be at least one central processing unit (CPU), such as... Figure 10 As shown, including CPU0 and CPU1, processor 310 can also be a graphics processing unit (GPU), etc., and can be a single-core processor or a multi-core processor. Processor 310 can be a combination of CPU and hardware chips. The aforementioned hardware chips can be implemented with application-specific integrated circuits (ASICs) or programmable logic devices (PLDs). The aforementioned PLDs can be implemented with complex programmable logical devices (CPLDs), field-programmable gate arrays (FPGAs), generic array logic (GALs), or any combination thereof. Processor 310 can also be implemented solely with logic devices that have built-in processing logic, such as FPGAs or digital signal processors (DSPs).

[0160] Memory unit 320 is used to store the kernel, program code, and program data generated by processor 310 when executing the program code stored in memory unit 320. The program code includes the code of acquisition module 910 and processing module 920, etc., and the program data includes: data to be processed, the image of the trusted container, the processing results obtained by the trusted container from processing the data to be processed, etc.

[0161] The communication interface 330 can be a wired interface (e.g., an Ethernet interface, a fiber optic interface, other types of interfaces (e.g., an infiniBand (IB) interface)) or a wireless interface (e.g., a cellular network interface or a wireless local area network interface) for communicating with other computing devices or apparatuses. When the communication interface 330 is a wired interface, the communication interface 330 can employ a family of protocols on top of the transmission control protocol / internet protocol (TCP / IP), such as a remote function call (RFC) protocol, a simple object access protocol (SOAP) protocol, a simple network management protocol (SNMP) protocol, a common object request broker architecture (CORBA) protocol, and a distributed protocol, among others.

[0162] The memory 340 can be a non-volatile memory, such as a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically EPROM (EEPROM), or a flash memory. The memory 340 can also be a volatile memory, which can be a random access memory (RAM) used as an external cache.

[0163] The input device 350 can include a mouse and a keyboard, among others. A user can input data or instructions to the computing device 300 through the input device 350, such as the aforementioned to-be-processed data, configuration information of the trusted VM, the first management instruction, the second management instruction, and the like.

[0164] The output device 360 can include a display, through which the output device 360 can provide data to a user, such as results of processing of the data to be processed by the trusted VM, and the like, as described above. The display can include a cathode ray tube (CRT), a plasma display panel (PDP), a liquid crystal display (LCD), and the like. Taking the LCD as an example, the liquid crystal display includes a liquid crystal panel and a backlight module, where the liquid crystal panel includes a polarizing film, a glass substrate, a black matrix, a color filter, a protective film, a common electrode, an alignment layer, a liquid crystal layer (liquid crystal, spacer, sealant), a capacitor, a display electrode, a prism layer, and a light scattering layer. The backlight module includes an illumination light source, a reflective plate, a light guide plate, a diffusion sheet, a brightness enhancement film (prism sheet), and a frame, and the like.

[0165] The bus 370 can be a peripheral component interconnect express (PCIe) or an extended industry standard architecture (EISA) bus, or the like. The bus 370 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 10 Only one thick line is used to represent the bus in the figure, but it does not mean that there is only one bus or only one type of bus.

[0166] It should be understood that the computing device 300 according to the embodiments of the present application can correspond to the computing device including the data processing apparatus 900 in the embodiments of the present application, and can correspond to the computing device that executes the corresponding subject in the method shown in the embodiments of the present application, and the operations and / or functions of each module in the computing device 300 are respectively for realizing the corresponding flow of the method shown in the embodiments of the present application, and for brevity, will not be repeated here. Figure 4 、 Figure 6 、 Figure 8 The operations and / or functions of each module in the computing device 300 are respectively for realizing the corresponding flow of the method shown in the embodiments of the present application, and for brevity, will not be repeated here. Figure 4 、 Figure 6 、 Figure 8 The operations and / or functions of each module in the computing device 300 are respectively for realizing the corresponding flow of the method shown in the embodiments of the present application, and for brevity, will not be repeated here.

[0167] It should be understood that the computing device 300 is only one example provided by the embodiments of the present application, and the computing device 300 can have more or fewer components than those shown, can combine two or more components, or can have a different configuration of components. Figure 10

[0168] The present application also provides a computer-readable storage medium, which stores instructions, and the instructions, when executed, can implement some or all steps of the data processing method described in the above embodiments.​

[0169] The application also provides a computer program product, which can realize some or all steps of the data processing method described in the above method embodiments when the computer program product is read and executed by a computer.

[0170] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0171] In the above embodiments, all or part of the embodiments can be realized by software, hardware or any combination thereof. When realized by software, all or part of the embodiments can be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media, or semiconductor media, etc.

[0172] The above is only a specific embodiment of the application. Those skilled in the art can think of changes or replacements based on the specific embodiments provided by the application, which should be covered within the protection scope of the application.

Claims

1. A data processing method, characterized by, Applied to a computing device, hardware resources of the computing device are divided into a rich execution environment (REE) side and a trusted execution environment (TEE) side, the TEE side including one or more containers, the method comprising: A processor of the computing device acquires, on the REE side, to-be-processed data; The processor runs a first container on the TEE side to process the to-be-processed data, the first container being any container of the one or more containers included in the TEE side; wherein, The REE side is deployed with a container runtime and a first virtual machine manager, the TEE side is deployed with a second virtual machine manager, a container agent module is deployed in a VM to which the first container belongs, and operations performed by the processor on the REE side are performed by the processor running the container runtime and the first virtual machine manager in cooperation, and operations performed by the processor on the TEE side are performed by the processor running the second virtual machine manager and the container agent module in cooperation.

2. The method of claim 1, wherein, The TEE side includes one or more virtual machines (VMs), and each of the one or more VMs includes at least one container of the one or more containers.

3. The method of claim 2, wherein: The processor acquires, on the REE side, encrypted to-be-processed data; Before the processor runs the first container on the TEE side to process the to-be-processed data, the method further comprises: The processor acquires, on the TEE side, a decryption key stored on the TEE side; The processor decrypts, on the TEE side, the encrypted to-be-processed data using the decryption key to obtain the to-be-processed data.

4. The method of claim 3, wherein, The processor runs the first container on the TEE side, comprising: The processor runs the first container on the TEE side in a case where it is determined that the first container is a secure container.

5. The method of claim 3, wherein, The processor runs the first container on the TEE side, comprising: The processor runs the first container on the TEE side in a case where it is determined that the computing device is a secure device.

6. The method according to any one of claims 2 to 5, characterized in that, Before the processor acquires, on the REE side, to-be-processed data, the method further comprises: The processor acquires, on the REE side, configuration information of the one or more VMs to be created; The processor creates, on the TEE side, the one or more VMs according to the configuration information; The processor acquires, on the REE side, an image of the first container; The processor acquires, on the REE side, an identifier of a first VM used to create the first container, the first VM belonging to the one or more VMs; The processor creates, on the TEE side, the first container in the first VM according to the image of the first container according to the identifier of the first VM.

7. The method of claim 6, wherein, The method further comprises: The processor acquires, on the REE side, a first management command for a life cycle of the first container; The processor executes, on the TEE side, one or any combination of the following operations on the first container according to the first management command: starting the first container, stopping the first container, removing the first container, migrating the first container, viewing an image of the first container, and removing an image of the first container.

8. The method of claim 7, wherein, The method further includes: The processor obtains, on the REE side, a second management command for the first container; The processor executes, on the TEE side, one or any combination of the following operations on the first container according to the second management command: installing an application, starting the application, closing the application, upgrading the application, uninstalling the application, and migrating the application.

9. The method according to claim 7 or 8, characterized in that, The VM to which the first container belongs includes an input output device virtualization VirtIO front-end driver, and the first virtual machine manager includes a VirtIO back-end driver, and the method further includes: The processor runs the VirtIO front-end driver and the VirtIO back-end driver in cooperation to simulate a virtualized I / O device for use by the first container.

10. The method of claim 9, wherein, The TEE side includes a first memory for data transmission between the VirtIO front-end driver and the VirtIO back-end driver, the REE side includes a second memory, the second virtual machine manager is deployed with a memory synchronization module, and the memory synchronization module includes a mapping relationship between the first memory and the second memory; The method further includes: The processor runs the memory synchronization module to synchronize first data in the first memory to the second memory according to the mapping relationship between the first memory and the second memory, the first data being data to be sent by the VirtIO front-end driver to the VirtIO back-end driver; Or, The processor runs the memory synchronization module to synchronize second data in the second memory to the first memory according to the mapping relationship between the first memory and the second memory, the second data being data to be received by the VirtIO front-end driver from the VirtIO back-end driver.

11. A computing device, comprising: The computing device includes a processor and a memory; the processor of the computing device is configured to execute instructions stored in the memory of the computing device, so that the computing device performs the method according to any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that, Computer program instructions are included, when the computer program instructions are executed by a computing device, the computing device performs the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Data transaction method and device, electronic equipment and storage medium

    CN115617766A

  • Data storage method and device, electronic equipment and computer readable storage medium

    CN116049913A

Cited By

  • Data processing method, apparatus and computer-readable storage medium

    EP4722907A1

  • Data processing method, apparatus and computer-readable storage medium

    WO2024255577A1