Secure computing method based on trusted execution environment and distributed system
By constructing a trusted execution environment on the server, the resource consumption of encrypted data is predicted and the target security zone is created, the problem of data leakage risks in the traditional security calculation method is solved, and the security and efficiency of data processing are improved.
Patent Information
- Application Number
- CN202411386212.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-09-30
AI Technical Summary
Traditional security computing methods based on trusted execution environments and distributed systems have a risk of data leakage when processing encrypted data sent by the user, resulting in poor security.
By constructing a trusted execution environment in the server, after multi -terminal certification, the resource consumption of encrypted data in the basic security zone, creating a target safety zone that matches the expected resource consumption, and in this safety area Processed encrypted data.
Improve the security of data processing, avoid waste of hardware resources, and ensure the security and efficiency of data processing results.
Smart Images

Figure CN119378022A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things, and in particular to a secure computing method, apparatus, computer equipment, storage medium and computer program product based on a trusted execution environment and a distributed system. Background Art
[0002] With the development of IoT technology, more and more users are enjoying the services provided by IoT by accessing the network. For example, users can send data to the service, and the service will process the data sent by the user according to the user's expected processing method.
[0003] Since the server side in the Internet of Things may also be subject to malicious attacks, there is a risk of data leakage when the server side uses traditional technology to process the encrypted data provided by users. Therefore, the traditional secure computing method based on trusted execution environment and distributed system has the problem of poor security. Summary of the invention
[0004] Based on this, it is necessary to provide a secure computing method, apparatus, computer device, computer-readable storage medium and computer program product based on a trusted execution environment and a distributed system that can improve the security of data processing in response to the above technical problems.
[0005] In a first aspect, the present application provides a secure computing method based on a trusted execution environment and a distributed system. The method comprises:
[0006] Acquire the encrypted data sent by the user end and the expected processing method for the encrypted data; build a trusted execution environment on the server end when the server end and the user end are authenticated by a multi-end authentication protocol; predict the resource consumption of the data processing process of the encrypted data in the basic security zone of the trusted execution environment to determine the expected resource consumption of the encrypted data; create a target security zone in the trusted execution environment that matches the expected resource consumption; and process the encrypted data in the target security zone according to the expected processing method to obtain a data processing result.
[0007] In one of the embodiments, the expected resource consumption includes computing resource consumption and storage resource consumption; the resource consumption prediction for the data processing process of the encrypted data to determine the expected resource consumption of the encrypted data includes: determining the encryption level and data volume of the encrypted data; based on the data volume and the expected processing method, predicting the storage resource consumption for the data processing process of the encrypted data to determine the storage resource consumption of the encrypted data; the storage resource consumption is positively correlated with the data volume and with the complexity of the expected processing method; based on the encryption level, predicting the computing resource consumption for the data processing process of the encrypted data to determine the computing resource consumption of the encrypted data; the encryption level and computing resource consumption are positively correlated.
[0008] In one of the embodiments, based on the data volume and the expected processing method, the storage resource consumption of the data processing process of the encrypted data is predicted to determine the storage resource consumption of the encrypted data, including: based on the complexity of the expected processing method, determining a first expected resource consumption that matches the complexity; determining a second expected resource consumption that matches the data volume; and according to the impact weights of the expected processing method and the data volume on storage resources, respectively, counting the first expected resource consumption and the second expected resource consumption to determine the storage resource consumption of the encrypted data.
[0009] In one of the embodiments, the server includes multiple computing service nodes; creating a target security zone that matches the expected resource consumption in the trusted execution environment includes: obtaining node operation information of each of the multiple computing service nodes associated with the trusted execution environment, and a security zone creation function that matches the expected resource consumption; screening target nodes that meet node screening conditions in each of the computing service nodes based on the node operation information; and creating a target security zone in the target node according to the security zone creation function.
[0010] In one of the embodiments, the node operation information includes available computing resources and available storage resources; the expected resource consumption includes computing resource consumption and storage resource consumption; and screening target nodes that meet node screening conditions in each of the computing service nodes based on the node operation information includes: screening multiple selected nodes in each of the computing service nodes whose available computing resources are greater than or equal to the computing resource consumption; and screening target nodes in each of the selected nodes whose available storage resources are greater than or equal to the storage resource consumption.
[0011] In one of the embodiments, the method further includes: encrypting the data processing result to obtain encrypted return data; sending the encrypted return data to the server, and destroying the basic security zone and the target security zone.
[0012] In a second aspect, the present application also provides a secure computing device based on a trusted execution environment and a distributed system. The device includes:
[0013] An acquisition module is used to acquire encrypted data sent by a user terminal and an expected processing method for the encrypted data; a construction module is used to build a trusted execution environment on the server side when the server side and the user terminal are authenticated by a multi-terminal authentication protocol; a prediction module is used to predict the resource consumption of the data processing process of the encrypted data in the basic security zone of the trusted execution environment and determine the expected resource consumption of the encrypted data; a creation module is used to create a target security zone that matches the expected resource consumption in the trusted execution environment; a processing module is used to process the encrypted data in the target security zone according to the expected processing method to obtain a data processing result.
[0014] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0015] Acquire the encrypted data sent by the user end and the expected processing method for the encrypted data; build a trusted execution environment on the server end when the server end and the user end are authenticated by a multi-end authentication protocol; predict the resource consumption of the data processing process of the encrypted data in the basic security zone of the trusted execution environment to determine the expected resource consumption of the encrypted data; create a target security zone in the trusted execution environment that matches the expected resource consumption; and process the encrypted data in the target security zone according to the expected processing method to obtain a data processing result.
[0016] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0017] Acquire the encrypted data sent by the user end and the expected processing method for the encrypted data; build a trusted execution environment on the server end when the server end and the user end are authenticated by a multi-end authentication protocol; predict the resource consumption of the data processing process of the encrypted data in the basic security zone of the trusted execution environment to determine the expected resource consumption of the encrypted data; create a target security zone in the trusted execution environment that matches the expected resource consumption; and process the encrypted data in the target security zone according to the expected processing method to obtain a data processing result.
[0018] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0019] Acquire the encrypted data sent by the user end and the expected processing method for the encrypted data; build a trusted execution environment on the server end when the server end and the user end are authenticated by a multi-end authentication protocol; predict the resource consumption of the data processing process of the encrypted data in the basic security zone of the trusted execution environment to determine the expected resource consumption of the encrypted data; create a target security zone in the trusted execution environment that matches the expected resource consumption; and process the encrypted data in the target security zone according to the expected processing method to obtain a data processing result.
[0020] The above-mentioned secure computing method, device, computer equipment, storage medium and computer program product based on a trusted execution environment and a distributed system obtains the encrypted data sent by the user end and the expected processing method for the encrypted data. When the server end and the user end are authenticated by a multi-terminal authentication protocol, a trusted execution environment is constructed on the server end to provide a securely verified environment for subsequent data processing processes, thereby improving the security of data processing. In the basic security zone of the trusted execution environment, the resource consumption of the data processing process of the encrypted data is predicted to determine the expected resource consumption of the encrypted data. Using the above-mentioned method, a target security zone matching the expected resource consumption is created in the trusted execution environment. In the target security zone, the encrypted data is processed according to the expected processing method to obtain the data processing result. The target security zone matches the expected resource consumption, thereby ensuring the safe and efficient processing of data while avoiding the waste of hardware resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] FIG1 is an application environment diagram of a secure computing method based on a trusted execution environment and a distributed system in one embodiment;
[0022] FIG2 is a schematic diagram of a flow chart of a secure computing method based on a trusted execution environment and a distributed system in one embodiment;
[0023] FIG3 is a flow chart of a distributed secure computing method combining SGX technology and Hadoop in one embodiment;
[0024] FIG4 is a system architecture diagram in one embodiment;
[0025] FIG5 is a calculation flow chart in one embodiment;
[0026] FIG6 is a block diagram of a secure computing device based on a trusted execution environment and a distributed system in one embodiment;
[0027] FIG. 7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0029] The secure computing method based on a trusted execution environment and a distributed system provided in the embodiment of the present application can be applied to the application environment shown in FIG1 . In which, the user terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers.
[0030] The server 104 obtains the encrypted data sent by the user terminal 102 and the expected processing method for the encrypted data. When the server terminal 104 and the user terminal 102 are authenticated by a multi-terminal authentication protocol, the server 104 builds a trusted execution environment on the server side. In the basic security zone of the trusted execution environment, the server 104 predicts the resource consumption of the data processing process of the encrypted data and determines the expected resource consumption of the encrypted data. In the trusted execution environment, the server 104 creates a target security zone that matches the expected resource consumption. In the target security zone, the server 104 processes the encrypted data according to the expected processing method to obtain a data processing result.
[0031] The user terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0032] In one embodiment, as shown in FIG2 , a secure computing method based on a trusted execution environment and a distributed system is provided, and the method is applied to the server in FIG1 as an example for explanation, including:
[0033] S202, obtaining encrypted data sent by the user terminal and a desired processing method for the encrypted data.
[0034] The encrypted data may refer to data that has been encrypted on the user side.
[0035] The expected processing method indicates a specific processing method for user encryption. More specifically, the expected processing method includes a decryption method for encrypted data and a calculation method for the decrypted data, for example, addition, multiplication, and the like.
[0036] The user end encrypts the data to be processed according to a preset encryption method to obtain encrypted data. There are multiple preset encryption methods, for example, encrypting the data to be processed based on the RSA encryption algorithm to prevent the data to be processed from being stolen during transmission.
[0037] Specifically, the server obtains the encrypted data and the desired processing method for the encrypted data from the user terminal.
[0038] In one embodiment, the expected processing method may be a processing method configured for encrypted data. The server parses the expected processing method to obtain multiple expected sub-processing methods. The server may process the encrypted data in turn according to each expected sub-processing method to obtain a data processing result.
[0039] The desired sub-processing method may be a decryption function for the encrypted data and a mapping function and a reduction function for the decrypted data, etc. Specifically, the server processes the encrypted data according to the decryption function, the mapping function and the reduction function to obtain a data processing result.
[0040] S204, when the server and the user are authenticated by the multi-terminal authentication protocol, a trusted execution environment is constructed on the server.
[0041] Among them, the multi-terminal authentication protocol refers to the authentication protocol performed by the server, the user and the key distribution end. Exemplarily, the multi-terminal authentication protocol can represent a protocol based on the Kerberos authentication method. Among them, the Kerberos authentication method consists of three ends: the user end, the server end and the key distribution end. The specific authentication process is as follows: (1) The user end and the key distribution end perform identity information verification. If the verification is successful, the key distribution end sends the TGT to the user end, otherwise the secondary verification is rejected within 10 seconds. (2) After receiving the TGT, the user end sends the TGT to the key distribution end. If the TGT is valid, the key distribution end packages the Session Key into a Ticket and sends it to the user end, otherwise the authentication is rejected within 10 seconds. (3) The user end packages the identity information and the Ticket and sends them to the server end. If the verification is successful, it means that the communication between the server end and the user end is established, otherwise the secondary verification is rejected within 10 seconds.
[0042] Trusted Execution Environment SGX is a processor technology developed by Intel that can provide a trusted space, namely TEE, on the computing platform. This space protects users' key code and data from malware attacks through hardware encryption and isolation mechanisms.
[0043] The Trusted Execution Environment provides an isolated trusted execution environment that can protect the code and data within the Enclave even if the underlying software (such as BIOS, VMM, and main operating system) is maliciously compromised.
[0044] Specifically, the server builds a trusted execution environment on the server side when the server side and the user side are authenticated through a multi-terminal authentication protocol.
[0045] In one of the embodiments, when the server and the user are authenticated by a multi-terminal authentication protocol, the server creates a trusted execution environment for each sub-server in the server cluster.
[0046] S206, in the basic security zone of the trusted execution environment, predicting resource consumption of the data processing process of the encrypted data to determine the expected resource consumption of the encrypted data.
[0047] The basic security zone may represent a security zone shared by all sub-servers in a trusted execution environment.
[0048] The basic security zone is a hardware-encrypted memory area created by the CPU. This area is designed to be independent of the underlying software such as the operating system, virtual machine monitor (VMM), and BIOS to ensure that the code and data in it are protected at the highest level. The basic security zone can be created in any sub-server.
[0049] Resource consumption prediction refers to predicting the amount of resources required for a data processing process of encrypted data.
[0050] The expected resource consumption indicates the estimated resource consumption for encrypted data in the security zone, and includes computing resource consumption and storage resource consumption. The computing resource consumption may indicate CPU utilization, GPU utilization, etc., and the storage resource consumption may indicate the size of the occupied storage space.
[0051] Specifically, when the server builds a trusted execution environment on the server side, it can simultaneously generate a basic security zone of the trusted execution environment.
[0052] In one embodiment, the server obtains the operating parameters of each sub-server, and based on the operating parameters, selects the target sub-server whose operating parameters meet the operating parameter requirements (for example, the maximum CPU idle rate or the maximum remaining storage space, etc.), and creates a basic security zone in the target sub-server, thereby ensuring the data processing efficiency of the target security zone.
[0053] In one embodiment, the server can create a basic security zone in each sub-server respectively. The server can also create a basic security zone in a main server, and the main server is connected to each sub-server respectively.
[0054] S208, creating a target security zone matching the expected resource consumption in the trusted execution environment.
[0055] The target security zone refers to a security zone that matches the expected resource consumption. More specifically, the target security zone may refer to a security zone that matches both the computing resource consumption and the storage resource consumption.
[0056] Specifically, the server creates a target security zone that matches the expected resource consumption in the trusted execution environment.
[0057] In one of the embodiments, the server obtains node operation information of each of multiple computing service nodes associated with the trusted execution environment, and a security zone creation function that matches the expected resource consumption, and selects target nodes that meet the node screening conditions in each computing service node based on the node operation information, and creates a target security zone in the target node according to the security zone creation function.
[0058] In one embodiment, the server selects multiple selected nodes whose available computing resources are greater than or equal to the computing resource consumption in each computing service node, and selects target nodes whose available storage resources are greater than or equal to the storage resource consumption in each selected node.
[0059] S210: In the target security zone, the encrypted data is processed according to a desired processing method to obtain a data processing result.
[0060] Specifically, the server processes the encrypted data in the target security zone according to the expected processing method to obtain a data processing result.
[0061] Specifically, after obtaining the data processing result, the server encrypts the data processing result to obtain encrypted return data, sends the encrypted return data to the service end, and destroys the basic security zone and the target security zone.
[0062] In the above-mentioned secure computing method based on a trusted execution environment and a distributed system, the encrypted data sent by the user end and the expected processing method for the encrypted data are obtained. When the server end and the user end are authenticated by a multi-terminal authentication protocol, a trusted execution environment is constructed on the server end to provide a securely verified environment for subsequent data processing processes, thereby improving the security of data processing. In the basic security zone of the trusted execution environment, the resource consumption of the data processing process of the encrypted data is predicted to determine the expected resource consumption of the encrypted data. Using the above-mentioned method, a target security zone matching the expected resource consumption is created in the trusted execution environment. In the target security zone, the encrypted data is processed according to the expected processing method to obtain the data processing result. The target security zone matches the expected resource consumption, thereby ensuring the safe and efficient processing of data while avoiding the waste of hardware resources.
[0063] In one embodiment, resource consumption is predicted for a data processing process of encrypted data to determine expected resource consumption of the encrypted data, including: determining the encryption level and data volume of the encrypted data, predicting storage resource consumption for the data processing process of the encrypted data based on the data volume and the expected processing method, and determining storage resource consumption of the encrypted data, where the storage resource consumption is positively correlated with the data volume and with the complexity of the expected processing method, and predicting computing resource consumption for the data processing process of the encrypted data based on the encryption level, and determining computing resource consumption of the encrypted data, where the encryption level and computing resource consumption are positively correlated.
[0064] The encryption level indicates the risk level of encrypted data after being decrypted. The higher the encryption level, the more important the data before encryption. Decrypting encrypted data with a higher encryption level consumes more computing resources.
[0065] The data volume indicates the data scale of the encrypted data. The larger the data volume of the encrypted data, the more storage resources the encrypted data consumes, and vice versa.
[0066] The expected resource consumption includes computing resource consumption and storage resource consumption. The computing resource consumption can represent CPU utilization, GPU utilization, etc., and the storage resource consumption can represent the size of the occupied storage space.
[0067] The storage resource consumption prediction means predicting the storage resources consumed by the encrypted data processing process in the basic security zone. The computing resource consumption prediction means predicting the computing resources consumed by the encrypted data processing process in the basic security zone.
[0068] The expected processing method may include multiple sub-processing methods, and the complexity of the expected processing method may indicate the number of expected sub-processing methods and the complexity of each expected sub-processing method. Exemplarily, the expected sub-processing method may be a processing function, such as a decryption function, a mapping function, and a reduction function. A higher complexity of the expected processing method may indicate a greater number of processing functions, or a greater number of parameters of the processing function itself.
[0069] Specifically, the server predicts the storage resource consumption of the data processing process of the encrypted data based on the data volume and the expected processing method, and determines the storage resource consumption of the encrypted data. The storage resource consumption is positively correlated with the data volume and the complexity of the expected processing method.
[0070] In one embodiment, the server predicts the storage resource consumption of the data processing process of the encrypted data based on the data volume, and determines the first storage resource consumption of the encrypted data. The server predicts the storage resource consumption of the data processing process of the encrypted data based on the expected processing method, and determines the second storage resource consumption of the encrypted data. The server can add the first storage resource consumption and the second storage resource consumption to obtain the storage resource consumption of the encrypted data.
[0071] In one of the embodiments, the server further determines the larger of the first storage resource consumption and the second storage resource consumption as the storage resource consumption of the encrypted data.
[0072] In this embodiment, the encryption level and data volume of the encrypted data are determined, and based on the data volume and the expected processing method, the storage resource consumption of the data processing process of the encrypted data is predicted to determine the storage resource consumption of the encrypted data. The storage resource consumption is positively correlated with the data volume and the complexity of the expected processing method. Based on the encryption level, the computing resource consumption of the data processing process of the encrypted data is predicted to determine the computing resource consumption of the encrypted data. The encryption level and computing resource consumption are positively correlated, and accurate computing resource consumption and storage resource consumption are obtained, thereby ensuring secure and efficient data processing while avoiding waste of hardware resources.
[0073] In one embodiment, based on the data volume and the expected processing method, a resource consumption prediction is performed on the data processing process of the encrypted data to determine the storage resource consumption of the encrypted data, including: based on the complexity of the expected processing method, determining a first expected resource consumption that matches the complexity, determining a second expected resource consumption that matches the data volume, and statistically analyzing the first expected resource consumption and the second expected resource consumption according to the impact weights of the expected processing method and the data volume on the storage resources to determine the storage resource consumption of the encrypted data.
[0074] The expected processing method may include multiple sub-processing methods, and the complexity of the expected processing method may represent the number of expected sub-processing methods and the complexity of each expected sub-processing method. Exemplarily, the expected sub-processing method may be a processing function, such as a decryption function, a mapping function, and a reduction function. A higher complexity of the expected processing method may represent a greater number of processing functions, or may represent a greater number of parameters of the processing function itself.
[0075] The first expected resource consumption represents the resource value expected to be consumed by the encrypted data in the complexity dimension. The second expected resource consumption represents the resource value expected to be consumed by the encrypted data in the data volume dimension.
[0076] The impact weight indicates the impact degree of the expected processing method on the storage resources and the impact degree of the data volume on the storage resources. The impact weight can be a pre-configured size.
[0077] Specifically, the server collects statistics on the first expected resource consumption and the second expected resource consumption according to the expected processing mode and the data volume respectively for the influence weights of the storage resources, and determines the storage resource consumption of the encrypted data.
[0078] In one embodiment, when the difference between the first impact weight corresponding to the expected processing method and the second impact weight corresponding to the data volume is small, the first expected resource consumption and the second expected resource consumption are counted according to the first impact weight and the second impact weight to determine the storage resource consumption of the encrypted data. For example, the product of the first impact weight and the first expected resource consumption is added to the product of the second impact weight and the second expected resource consumption value to obtain the storage resource consumption of the encrypted data.
[0079] In one of the embodiments, when there is a large difference between the first impact weight and the second impact weight, the expected resource consumption corresponding to the larger weight is retained, and the expected resource consumption is determined as the storage resource consumption of the encrypted data.
[0080] In this embodiment, based on the complexity of the expected processing method, a first expected resource consumption that matches the complexity is determined, and a second expected resource consumption that matches the data amount is determined. The first expected resource consumption and the second expected resource consumption are statistically analyzed for the impact weights of storage resources according to the expected processing method and the data amount, and the storage resource consumption of the encrypted data is determined to obtain accurate storage resource consumption, thereby avoiding waste of hardware resources.
[0081] In one embodiment, the server includes multiple computing service nodes, and creates a target security zone that matches the expected resource consumption in a trusted execution environment, including: obtaining node operation information of each of the multiple computing service nodes associated with the trusted execution environment, and a security zone creation function that matches the expected resource consumption, screening target nodes that meet the node screening conditions in each computing service node according to the node operation information, and creating a target security zone in the target node according to the security zone creation function.
[0082] The computing service node may be a node of a server in an IoT network, which provides computing services to the outside world.
[0083] The node operation information indicates the operation parameters of the server corresponding to the computing server node. The operation parameters include CPU parameters, memory parameters, and IO parameters.
[0084] The security zone creation function represents a function pre-configured in the system for creating a security zone. The security zone creation function matches the expected resource consumption.
[0085] The target node may be a computing service node with a large CPU idle rate, a large available memory, and a large IO idle rate.
[0086] Specifically, the server obtains the node operation information of each of the multiple computing service nodes associated with the trusted execution environment, and a security zone creation function that matches the expected resource consumption. The server selects target nodes that meet the node screening conditions in each computing service node based on the node operation information. The server creates a target security zone in the target node according to the security zone creation function.
[0087] In one embodiment, the server selects multiple selected nodes whose available computing resources are greater than or equal to the computing resource consumption in each computing service node, and selects target nodes whose available storage resources are greater than or equal to the storage resource consumption in each selected node.
[0088] In one of the embodiments, the server randomly selects a computing service node from among the computing service nodes as a target node, and creates a target security zone in the target node according to a security zone creation function.
[0089] In this embodiment, the server includes multiple computing service nodes, obtains node operation information of each of the multiple computing service nodes associated with the trusted execution environment, and a security zone creation function matching the expected resource consumption, selects target nodes that meet the node selection conditions in each computing service node according to the node operation information, and creates a target security zone in the target node according to the security zone creation function. While ensuring the safe and efficient processing of data, it avoids the waste of hardware resources.
[0090] In one embodiment, based on the node operation information, target nodes that meet the node screening conditions are screened in each computing service node, including: screening multiple selected nodes whose available computing resources are greater than or equal to the computing resource consumption in each computing service node, and screening target nodes whose available storage resources are greater than or equal to the storage resource consumption in each selected node.
[0091] The node operation information includes available computing resources and available storage resources, and the expected resource consumption includes computing resource consumption and storage resource consumption.
[0092] Available computing resources refer to the available resources of computing service nodes in the resource computing dimension. Available storage resources refer to the available resources of computing service nodes in the resource storage dimension.
[0093] The computing resource consumption indicates the resource consumption in the computing dimension that is expected to be consumed by encrypted data during data processing. The storage resource consumption indicates the resource consumption in the storage dimension that is expected to be consumed by encrypted data during data processing.
[0094] Specifically, the server selects multiple selected nodes whose available computing resources are greater than or equal to the computing resource consumption in each computing service node according to the resource computing dimension, and selects target nodes whose available storage resources are greater than or equal to the storage resource consumption in each selected node according to the resource storage dimension.
[0095] In this embodiment, multiple selected nodes whose available computing resources are greater than or equal to the computing resource consumption are selected from each computing service node, and target nodes whose available storage resources are greater than or equal to the storage resource consumption are selected from each selected node. While ensuring the safe and efficient processing of data, the waste of hardware resources is avoided.
[0096] In one embodiment, the method further includes: encrypting the data processing result to obtain encrypted return data, sending the encrypted return data to the server, and destroying the basic security zone and the target security zone.
[0097] The encrypted return data may be an encrypted result obtained by encrypting the data processing result according to a preset encryption algorithm.
[0098] Destroying a security zone means destroying the created base security zone and target security zone in the trusted execution environment.
[0099] Specifically, the server may destroy the basic security zone and the target security zone at the same time, or the server may retain the basic security zone and only destroy the target security zone.
[0100] In one of the embodiments, the server destroys the security zone using a security zone destruction function, which reclaims memory resources occupied by the security zone and cleans up related states.
[0101] In one embodiment, before destroying the security zone, the server monitors the resources related to the security zone (such as keys, temporary files, etc.), and if the monitoring result indicates that the resources have been properly handled, the security zone destruction procedure is entered. If the security zone holds any sensitive data when it is destroyed, it is necessary to ensure that the data will not be leaked during the destruction process.
[0102] In this embodiment, the data processing result is encrypted to obtain encrypted return data, which is sent to the server, and the basic security zone and the target security zone are destroyed, thereby avoiding the risk of resource leakage and improving the security of data transmission.
[0103] In one embodiment, as shown in FIG3 , a distributed secure computing method combining SGX technology and Hadoop is provided, including:
[0104] S302, obtaining encrypted data sent by the user terminal and a desired processing method for the encrypted data.
[0105] S304, when the server and the user are authenticated by the multi-terminal authentication protocol, a trusted execution environment is constructed on the server.
[0106] S306: Determine the encryption level and data volume of the encrypted data in the basic security zone of the trusted execution environment.
[0107] S308, predicting the storage resource consumption of the data processing process of the encrypted data based on the data volume and the expected processing method, and determining the storage resource consumption of the encrypted data.
[0108] Among them, storage resource consumption is positively correlated with the amount of data and the complexity of the expected processing method. The expected resource consumption includes computing resource consumption and storage resource consumption.
[0109] S310: Based on the encryption level and the complexity of the expected processing method, determine a first expected resource consumption that matches the complexity.
[0110] S312: Determine a second expected resource consumption that matches the data volume.
[0111] S314: According to the expected processing mode and the data volume, statistics are collected on the first expected resource consumption and the second expected resource consumption for the impact weights of the storage resources to determine the storage resource consumption of the encrypted data.
[0112] Among them, the encryption level is positively correlated with the computing resource consumption.
[0113] S316, obtaining node operation information of each of the multiple computing service nodes associated with the trusted execution environment and a security zone creation function that matches the expected resource consumption.
[0114] Among them, the server includes multiple computing service nodes.
[0115] S318, screening multiple selected nodes whose available computing resources are greater than or equal to the computing resource consumption in each computing service node.
[0116] S320, screening target nodes whose available storage resources are greater than or equal to the storage resource consumption from each selected node.
[0117] The node operation information includes available computing resources and available storage resources. The expected resource consumption includes computing resource consumption and storage resource consumption.
[0118] S322: In the target node, create a target security zone according to the security zone creation function.
[0119] S324, in the target security zone, the encrypted data is processed according to the expected processing method to obtain a data processing result.
[0120] Exemplarily, as shown in the system architecture diagram of FIG4 , the encrypted data is decrypted in the Enclave security zone using the RSA decryption algorithm to obtain decrypted data, and then the decrypted data is processed according to the desired processing method to obtain a data processing result.
[0121] The framework includes user apps, Hadoop-side distributed computing nodes, and SGX trusted execution environment modules. User apps use the RSA encryption algorithm to encrypt the data to be calculated, transmit the encrypted data to the HDFS file system of the Hadoop platform through a secure transmission protocol, and receive the decrypted calculation results after the calculation is completed. The Hadoop-side distributed computing nodes are responsible for performing efficient distributed operations on encrypted data, and verify the reliability of user apps by adding a Kerberos authentication module to ensure that only authenticated users can participate in the calculation. The SGX trusted execution environment module creates an Enclave security zone in the Hadoop computing node for decrypting and processing sensitive data, ensuring that data is only calculated in a secure environment. After the calculation is completed, the result is encrypted again and transmitted back to the user app.
[0122] Specifically, Hadoop nodes are used to complete the computing tasks in a distributed manner, specifically in the two stages of Map and Reduce, and finally the computing results are obtained. As shown in the computing flow chart in Figure 5, the specific distributed computing process is as follows:
[0123] (1) Input data segmentation. Read the input data file and determine the total size of the file. According to the predefined segment size, the input data file is segmented into multiple independent segments, each of which is usually 64MB or 128MB in size. Each segmented segment is assigned to a Map task for processing.
[0124] (2) Mapping. The Map task reads the assigned input data segment. It applies the user-defined Map function to the input data segment to convert the input data into a series of key-value pairs. The Map function processes the input data according to the user-defined logic. For example, it maps each word in a text file to a key and the value to the number of occurrences 1.
[0125] (3) Partitioning of intermediate key-value pairs. Partition the intermediate results according to the key of the key-value pair. Use the hash partitioning method to determine the partition to which the key belongs based on the hash value of the key. Assign key-value pairs with the same partition to the corresponding Reduce task.
[0126] (4) Shuffling and Sorting. Sort the intermediate key-value pairs output by each Map task to ensure that all records with the same key are together. Before transmitting them to the Reduce task, combine the records with the same key to reduce the amount of data transmitted.
[0127] Specifically, grouping. Group the sorted intermediate key-value pairs according to the key to ensure that records with the same key are treated as a set. Pass each key and its corresponding value list to the corresponding Reduce task.
[0128] Specifically, the Reduce task receives a grouped list of key-value pairs. It applies a user-defined Reduce function to each key, processes the corresponding list of values, and generates the final output key-value pairs. For example, for a word counting program, the Reduce function aggregates the counts of each word and outputs the word and its total number of occurrences.
[0129] (5) Output results. Write the output results of the Reduce task to a distributed file system (such as HDFS) or other storage system. The output results of each Reduce task form the final output file and are stored in a predefined output path.
[0130] S326, encrypt the data processing result to obtain encrypted return data.
[0131] S328, sending the encrypted return data to the server, and destroying the basic security zone and the target security zone.
[0132] In this embodiment, the encrypted data sent by the user end and the expected processing method for the encrypted data are obtained. When the server end and the user end are authenticated by the multi-terminal authentication protocol, a trusted execution environment is constructed on the server end to provide a securely verified environment for the subsequent data processing process, thereby improving the security of data processing. In the basic security zone of the trusted execution environment, the resource consumption of the data processing process of the encrypted data is predicted to determine the expected resource consumption of the encrypted data. The above method is used to create a target security zone that matches the expected resource consumption in the trusted execution environment. In the target security zone, the encrypted data is processed according to the expected processing method to obtain the data processing result. The target security zone matches the expected resource consumption, while ensuring the safe and efficient processing of data, avoiding the waste of hardware resources. The method proposes a Hadoop distributed secure computing framework based on SGX technology, which aims to solve the data security and privacy protection problems existing in the prior art and realize efficient and secure distributed computing. By combining SGX technology and Hadoop distributed computing framework, this patent provides an innovative solution to meet the dual needs of data security and computing efficiency in the era of the Internet of Things. Compared with existing technologies, this framework improves computing performance and flexibility while ensuring data privacy and security, and is an ideal solution to solve security issues in large-scale data processing.
[0133] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0134] Based on the same inventive concept, the embodiment of the present application also provides a secure computing device based on a trusted execution environment and a distributed system for implementing the secure computing method based on a trusted execution environment and a distributed system involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more secure computing devices based on a trusted execution environment and a distributed system provided below can refer to the limitations of the secure computing method based on a trusted execution environment and a distributed system above, and will not be repeated here.
[0135] In one embodiment, as shown in FIG. 6 , a secure computing device based on a trusted execution environment and a distributed system is provided, including: an acquisition module 602, a construction module 604, a prediction module 606, a creation module 608, and a processing module 610, wherein:
[0136] The acquisition module 602 is used to acquire the encrypted data sent by the user terminal and the desired processing method for the encrypted data;
[0137] A construction module 604 is used to construct a trusted execution environment on the server side when the server side and the user side are authenticated by the multi-end authentication protocol;
[0138] A prediction module 606 is used to predict resource consumption of a data processing process of encrypted data in a basic security zone of a trusted execution environment to determine an expected resource consumption of the encrypted data;
[0139] A creation module 608, for creating a target security zone matching the expected resource consumption in a trusted execution environment;
[0140] The processing module 610 is used to process the encrypted data in a target security zone according to a desired processing method to obtain a data processing result.
[0141] In one of the embodiments, the expected resource consumption includes computing resource consumption and storage resource consumption; the prediction module 606 is also used to determine the encryption level and data volume of the encrypted data; based on the data volume and the expected processing method, the storage resource consumption of the data processing process of the encrypted data is predicted to determine the storage resource consumption of the encrypted data; the storage resource consumption is positively correlated with the data volume and the complexity of the expected processing method; based on the encryption level, the computing resource consumption of the data processing process of the encrypted data is predicted to determine the computing resource consumption of the encrypted data; the encryption level and computing resource consumption are positively correlated.
[0142] In one embodiment, the prediction module 606 is also used to determine a first expected resource consumption that matches the complexity based on the complexity of the expected processing method; determine a second expected resource consumption that matches the data volume; and perform statistics on the first expected resource consumption and the second expected resource consumption according to the impact weights of the storage resources for the expected processing method and the data volume, so as to determine the storage resource consumption of the encrypted data.
[0143] In one embodiment, the server includes multiple computing service nodes; the creation module 608 is also used to obtain the node operation information of each of the multiple computing service nodes associated with the trusted execution environment, and a security zone creation function that matches the expected resource consumption; according to the node operation information, the target node that meets the node screening condition is screened in each computing service node; in the target node, the target security zone is created according to the security zone creation function.
[0144] In one of the embodiments, the node operation information includes available computing resources and available storage resources; the expected resource consumption includes computing resource consumption and storage resource consumption; the creation module 608 is also used to screen multiple selected nodes in each computing service node whose available computing resources are greater than or equal to the computing resource consumption; and to screen target nodes in each selected node whose available storage resources are greater than or equal to the storage resource consumption.
[0145] In one of the embodiments, the secure computing device based on a trusted execution environment and a distributed system also includes: a return module, which is used to encrypt the data processing results to obtain encrypted return data; send the encrypted return data to the server, and destroy the basic security zone and the target security zone.
[0146] Each module in the secure computing device based on the trusted execution environment and distributed system can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0147] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store encrypted data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a secure computing method based on a trusted execution environment and a distributed system is implemented.
[0148] Those skilled in the art will understand that the structure shown in FIG. 7 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0149] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the above method steps are implemented when the processor executes the computer program.
[0150] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method steps are implemented.
[0151] In one embodiment, a computer program product is provided, comprising a computer program, which implements the above method steps when executed by a processor.
[0152] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0153] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0154] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A secure computing method based on a trusted execution environment and a distributed system, characterized in that: Applied to the server, the method includes: Obtaining encrypted data sent by a user terminal and a desired processing method for the encrypted data; When the server and the client are authenticated by a multi-terminal authentication protocol, a trusted execution environment is established on the server; In the basic security zone of the trusted execution environment, predicting resource consumption of the data processing process of the encrypted data to determine expected resource consumption of the encrypted data; In the trusted execution environment, creating a target security zone matching the expected resource consumption; In the target security zone, the encrypted data is processed according to the expected processing method to obtain a data processing result.
2. The method according to claim 1, characterized in that The expected resource consumption includes computing resource consumption and storage resource consumption; The predicting of resource consumption of the data processing process of the encrypted data to determine the expected resource consumption of the encrypted data includes: Determining the encryption level and data volume of the encrypted data; Based on the data volume and the expected processing method, a storage resource consumption amount is predicted for the data processing process of the encrypted data to determine the storage resource consumption amount of the encrypted data; the storage resource consumption amount is positively correlated with the data volume and positively correlated with the complexity of the expected processing method; Based on the encryption level, the computing resource consumption of the data processing process of the encrypted data is predicted to determine the computing resource consumption of the encrypted data; the encryption level and the computing resource consumption are positively correlated.
3. The method according to claim 2, characterized in that The predicting of storage resource consumption of the data processing process of the encrypted data based on the data volume and the expected processing mode to determine the storage resource consumption of the encrypted data includes: Based on the complexity of the expected processing mode, determining a first expected resource consumption matching the complexity; determining a second expected resource consumption amount matching the data amount; According to the expected processing method and the data volume, the first expected resource consumption and the second expected resource consumption are counted for the impact weights of storage resources respectively, to determine the storage resource consumption of the encrypted data.
4. The method according to claim 1, characterized in that: The server includes multiple computing service nodes; The step of creating, in the trusted execution environment, a target security zone matching the expected resource consumption includes: Obtaining node operation information of each of a plurality of computing service nodes associated with the trusted execution environment and a security zone creation function matching the expected resource consumption; According to the node operation information, select a target node that meets a node screening condition from each of the computing service nodes; In the target node, a target security zone is created according to the security zone creation function.
5. The method according to claim 4, characterized in that The node operation information includes available computing resources and available storage resources; the expected resource consumption includes computing resource consumption and storage resource consumption; The step of screening target nodes that meet node screening conditions from among the computing service nodes according to the node operation information includes: Screening multiple selected nodes in each of the computing service nodes whose available computing resources are greater than or equal to the computing resource consumption; A target node whose available storage resources are greater than or equal to the storage resource consumption is screened from the selected nodes.
6. The method according to claim 1, characterized in that The method further comprises: Encrypting the data processing result to obtain encrypted return data; The encrypted return data is sent to the server, and the basic security zone and the target security zone are destroyed.
7. A secure computing device based on a trusted execution environment and a distributed system, characterized in that: The device comprises: An acquisition module, used to acquire the encrypted data sent by the user terminal and a desired processing method for the encrypted data; A construction module, used to construct a trusted execution environment on the server side when the server side and the user side are authenticated by a multi-terminal authentication protocol; A prediction module, configured to predict resource consumption of a data processing process of the encrypted data in a basic security zone of the trusted execution environment, and determine an expected resource consumption of the encrypted data; A creation module, configured to create, in the trusted execution environment, a target security zone matching the expected resource consumption; The processing module is used to process the encrypted data in the target security zone according to the expected processing method to obtain a data processing result.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Security database system and method based on SGX technology and medium
CN112395631A
Database security access control technology based on trusted execution environment
CN115758396A
Cloud computing resource prediction method and device, computer equipment and storage medium
CN116303410A
Resource node allocation method and system in cloud computing system
CN117112242A
Cluster capacity expansion method and device, electronic equipment and storage medium
CN117407158A
Cited By
Data encryption and decryption method and device based on parallel processing of GPU (Graphic Processing Unit)
CN120611405A
Data encryption and decryption method and device based on graphics processor (GPU) parallel processing
CN120611405B