A safety detection method, device, storage medium and electronic equipment
By monitoring the data flow information of the computing process in the distributed computing system and determining the conditions for data partitioning, it solves the problem of security risks in the dense big data framework and achieves effective detection of system security and prevention of data leaks.
Patent Information
- Application Number
- CN202410606127.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-05-15
AI Technical Summary
Existing dense big data frameworks have security risks when performing computing tasks. Malicious platforms may steal sensitive information through data flow information between master and slave nodes.
By obtaining the test data divided into several data partitions in the distributed computing system, sending it to the slave node for caching, and monitoring the data flow information of the computing process, the conditions for dividing the data partitions are judged to determine whether there are security risks in the system.
Effectively detect whether there are security risks in distributed systems that can decode original data through data flow information, helping the platform improve the dense big data computing framework and prevent data leakage.
Smart Images

Figure CN118200054B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a security detection method, device, storage medium and electronic device. Background Art
[0002] In the modern information society, big data technology has become an indispensable tool for enterprises and organizations. In order to efficiently process huge amounts of data, many common big data processing frameworks adopt a distributed system architecture. This architectural design enables data to be split and processed among multiple computing nodes, achieving parallel computing tasks and significantly improving processing speed and efficiency.
[0003] With the development of big data technology and the improvement of user security awareness, a confidential big data framework has gradually taken shape. The architecture mainly consists of three roles: platform, data provider and data user. The platform is responsible for providing cluster computing capabilities and data storage services; the data provider provides the original data; and the data user is the party that hopes to use the data for analysis and calculation. In order to ensure that "the platform cannot peek into the data content while providing computing resources", the big data processing framework is placed in the Trusted Execution Environment (TEE) to ensure that these computing tasks can be executed correctly and the original data will not be tampered with or spied on.
[0004] However, in the existing technology, many secret big data frameworks still have security risks. Although the original data of the secret big data framework cannot be directly peeped when executing computing tasks, malicious platform parties may steal sensitive information by using the data flow information between the computing processes of the master and slave nodes.
[0005] Therefore, how to detect whether there are security risks in the encrypted big data framework is an urgent problem to be solved. Summary of the invention
[0006] This specification provides a security detection method, device, storage medium and electronic device to at least partially solve the above-mentioned problems existing in the prior art.
[0007] This manual adopts the following technical solutions:
[0008] This specification provides a security detection method, which is applied to a distributed computing system, wherein the distributed computing system includes a master node and a plurality of slave nodes set in a trusted execution environment, each slave node including a plurality of computing processes, and the method includes:
[0009] Obtain test data divided into a number of data partitions;
[0010] Sending the test data to the slave node, so that the computing process of the slave node caches the test data contained in the data partition, wherein the test data cached in each computing process belongs to a different data partition;
[0011] For each test data, the master node distributes a query task for querying the test data to each slave node, and determines data flow information when the computing process of each slave node executes the query task;
[0012] Determine, according to the data flow information, the computing process in which the test data is cached;
[0013] According to the computing process to which each test data is cached, determining whether the division condition of the data partition can be determined;
[0014] In response to successfully determining the division condition of the data partition, it is determined that the distributed system has a security risk.
[0015] Optionally, sending the test data to the slave node so that the computing process of the slave node caches the test data contained in the data partition specifically includes:
[0016] Submitting a data cache request to the master node, causing the master node to establish a cache task and distribute the cache task to the slave nodes, each cache task being used to cache test data contained in a data partition;
[0017] The slave node receives the cache task and obtains the test data contained in the data partition corresponding to the cache task;
[0018] The slave node calls the computing process to execute the cache task, so that the computing process caches the test data contained in the data partition corresponding to the cache task.
[0019] Optionally, determining the data flow information when the computing process of each slave node executes the query task specifically includes:
[0020] The data flow information of the computing process of each slave node when executing the query task is obtained through a network packet capture tool, and / or the data flow information of the computing process of each slave node when executing the query task is obtained through a query task log.
[0021] Optionally, determining the computing process in which the test data is cached according to the data flow information specifically includes:
[0022] For each computing process, determining the size of the communication data volume of the computing process when executing the query task;
[0023] The computing process to which the test data is cached is determined according to the amount of data communication of each computing process when executing the query task.
[0024] Optionally, determining the computing process to which the test data is cached according to the amount of data communication of each computing process when executing the query task specifically includes:
[0025] The computing process with the largest data communication volume when executing the query task is determined as the computing process in which the test data is cached.
[0026] Optionally, judging whether the division condition of the data partition can be determined according to the computing process to which each test data is cached specifically includes:
[0027] According to the computing process to which each test data is cached, determining the test data contained in the data partition cached by each computing process;
[0028] According to the similarities and differences of the test data contained in each data partition, it is judged whether the division condition of the data partition can be determined.
[0029] Optionally, in response to successfully determining the division condition of the data partition, before determining that the distributed system has a potential safety hazard, the method further includes:
[0030] The master node receives a task execution request submitted by a data user, establishes a test task according to the data call range carried in the task execution request, and distributes the test task to the slave node, so that the slave node calls a computing process to execute the test task;
[0031] Determine the computing process used when executing the test task according to the data flow information when the computing process of each slave node executes the test task;
[0032] In response to successfully determining the division condition of the data partition, determining that the distributed system has a security risk specifically includes:
[0033] In response to a match between a computing process used when executing the test task and a computing process in which the test data included in the data call range is cached, it is determined that there is a security risk in the distributed system.
[0034] The present specification provides a security detection device, which is applied to a distributed computing system, wherein the distributed computing system includes a master node and a plurality of slave nodes arranged in a trusted execution environment, each of which includes a plurality of computing processes, and the device includes:
[0035] An acquisition module, used for acquiring test data divided into a plurality of data partitions;
[0036] A cache module, used for sending the test data to the slave node, so that the computing process of the slave node caches the test data contained in the data partition, wherein the test data cached in each computing process belongs to a different data partition;
[0037] A distribution module, used for distributing, for each test data, a query task of querying the test data to each slave node by the master node, and determining data flow information when the computing process of each slave node executes the query task;
[0038] A determination module, used to determine the computing process to which the test data is cached according to the data flow information;
[0039] A judgment module, used for judging whether the division condition of the data partition can be determined according to the computing process to which each test data is cached;
[0040] The response module is used to determine that there is a security risk in the distributed system in response to successfully determining the division condition of the data partition.
[0041] Optionally, the cache module is specifically used to submit a data cache request to the master node, so that the master node establishes a cache task and distributes the cache task to the slave nodes, each cache task is used to cache the test data contained in a data partition; the slave node receives the cache task and obtains the test data contained in the data partition corresponding to the cache task; the slave node calls the computing process to execute the cache task, so that the computing process caches the test data contained in the data partition corresponding to the cache task.
[0042] Optionally, the distribution module is specifically used to obtain data flow information of the computing process of each slave node when executing the query task through a network packet capture tool, and / or to obtain data flow information of the computing process of each slave node when executing the query task through a query task log.
[0043] Optionally, the determination module is specifically used to determine, for each computing process, the size of the communication data volume of the computing process when executing the query task; and determine the computing process to which the test data is cached based on the size of the data communication volume of each computing process when executing the query task.
[0044] Optionally, the determination module is specifically configured to determine a computing process with the largest data communication volume when executing the query task as the computing process in which the test data is cached.
[0045] Optionally, the judgment module is specifically used to determine the test data contained in the data partition cached by each computing process according to the computing process to which each test data is cached; and to determine whether the division conditions of the data partitions can be determined according to the similarities and differences of the test data contained in each data partition.
[0046] Optionally, the device further comprises a test module, which is specifically used for the master node to receive a task execution request submitted by a data user, to establish a test task according to a data call range carried in the task execution request, and to distribute the test task to the slave nodes so that the slave nodes call a computing process to execute the test task; and to determine a computing process to be used when executing the test task according to data flow information when the computing process of each slave node executes the test task;
[0047] The response module is specifically used to determine that there is a security risk in the distributed system in response to the computing process used when executing the test task matching the computing process in which the test data included in the data call range is cached.
[0048] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned security detection method is implemented.
[0049] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned security detection method when executing the program.
[0050] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0051] In the security detection method provided in the present specification, test data divided into several data partitions are obtained; the test data is sent to the slave node, so that the computing process of the slave node caches the test data contained in the data partition, wherein the test data cached in each computing process belongs to a different data partition; for each test data, the master node distributes a query task for querying the test data to each slave node, and determines the data flow information when the computing process of each slave node executes the query task; based on the data flow information, the computing process to which the test data is cached is determined; based on the computing process to which each test data is cached, it is judged whether the division condition of the data partition can be determined; in response to successfully determining the division condition of the data partition, it is determined that the distributed system has a security risk.
[0052] When the security detection method provided in this specification is used to detect the security of a distributed computing system in a secret environment, it is possible to determine whether the division conditions of each data partition of the test data can be predicted by monitoring the data flow information of each computing process when the distributed computing system processes a computing task using test data, and when the division conditions can be determined, it can be determined that there are security risks in the distributed computing system. This method can effectively detect whether there are security risks in a distributed computing system in a secret environment where a malicious party can crack the original data by monitoring the data flow information, and can help the platform improve its own secret big data computing framework and prevent data leakage. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:
[0054] Figure 1 A schematic diagram of the overall process of performing calculations in a dense big data computing framework provided in this specification;
[0055] Figure 2 A schematic diagram of a safety detection method provided in this specification;
[0056] Figure 3 A schematic diagram of how to obtain data flow information provided in this manual;
[0057] Figure 4 A schematic diagram of a safety detection device provided in this manual;
[0058] Figure 5 A method corresponding to the Figure 2 Schematic diagram of electronic equipment. DETAILED DESCRIPTION
[0059] In order to make the security detection method provided in this manual easier to understand, this manual first provides necessary introduction and explanation of the big data computing framework and distributed system architecture.
[0060] In a big data computing framework that adopts a distributed system architecture, it usually includes a master node and multiple slave nodes. Among them, the master node is responsible for coordinating computing tasks; there are one or more computing processes in the slave nodes, and each computing process is responsible for executing a computing task, that is, performing actual data processing. In general, the responsibilities of the master node include receiving user requests, generating a set of task plans based on the code, distributing tasks to the computing processes in the slave nodes, optimizing the task execution path, monitoring the status of the slave nodes, and aggregating the final computing results; the computing processes in the slave nodes run tasks to perform specific data processing, such as data filtering, aggregation, sorting and other common operations.
[0061] In order to improve the processing efficiency of large-scale data sets, designers of distributed systems provide partitioners. The function of partitioners is to split the processed data. Each small data set split out is called a data partition. Different partitioners have different splitting strategies. Common partitioners include hash partitioners, range partitioners, and custom partitioners.
[0062] Similarly, in order to improve computing efficiency, the big data computing framework also provides a data cache function, that is, the data in the data partition involved in the current computing task is cached in the computing process. When the same data partition is accessed in the future, it can be directly read from the cache, avoiding the consumption of reading the disk or requesting network transmission from other nodes for each operation. Based on this function, when the master node distributes subtasks to the slave nodes, it follows the following priorities in descending order:
[0063] 1. Distribute the subtasks to the computing processes where the data partitions involved are located;
[0064] 2. Distribute the subtasks to the computing processes of the nodes where the data partitions involved are located;
[0065] 3. Distribute the subtasks to the computing process of any node on the rack where the data partition involved is located;
[0066] 4. Randomly distribute.
[0067] When distributing computing tasks, computing tasks are distributed to computing processes with high priority first; when a computing process with higher priority is not idle and cannot process computing tasks, a computing process with the next priority is found and the computing tasks are distributed until the lowest priority. The purpose of the above distribution strategy is to distribute a subtask to the computing process that can most easily call the data of the data partition according to the data partition involved in the processing process, thereby increasing the overall work efficiency of the big data computing framework.
[0068] Furthermore, with the growing demand for data confidentiality, a confidential big data computing framework has gradually taken shape. In a confidential big data framework, there are usually platforms, data providers, and data users. The platform is responsible for providing computing resources, that is, a distributed computing system; the data provider is responsible for providing raw data; and the data user hopes to use raw data and computing resources to perform task calculations. In the confidential big data computing framework, the distributed computing system will be set up in TEE to prevent the leakage of raw data.
[0069] Figure 1 This is a schematic diagram of the overall process of performing calculations in a dense big data computing framework provided in this specification. Figure 1 As shown in the figure, first, the data user submits a computing application to the distributed computing system, and then the distributed computing system applies for authorization from the data provider; after obtaining the authorization from the data provider, the master node of the distributed computing system will establish a computing task according to the information carried in the computing application submitted by the data user, and distribute it to the slave nodes after splitting the computing task; in the process of distributing the computing task, the master node will follow the priority introduced above, that is, the computing task will be distributed to the computing process that caches the data of the corresponding data partition. If no computing process caches the data of the required data partition, the computing task will be randomly distributed to a computing process. At this time, the slave node where the computing process is located will request the external data storage device to obtain the data of the data partition involved. The data storage device also belongs to the platform, but is separated from the distributed computing system, and its function is only to store the data provided by the data provider. The data storage device stores data confidentially, and the data cannot be directly peeped from the outside. The data provider will store all the data that it can provide in the data storage device in advance, so that there is no need to involve multiple communications with the data provider when executing the computing task. The logic of the computing process cache is to cache the latest acquired data. Therefore, after receiving the data of the data partition required for the computing task, the data of this data partition will be cached while executing the computing task. Finally, each slave node returns the result of the computing process executing the computing task to the master node, and the master node returns the result to the data user, which means that the processing of a task is completed.
[0070] It can be seen that in the above process, all computing tasks are processed in a trusted execution environment. Therefore, external data users and the platform itself cannot know the specific process of distributed system processing computing tasks, let alone obtain the original data. Nevertheless, in the above process, the platform can obtain information about data flow between the master and slave nodes by capturing packets or viewing the node logs. Even if the data itself cannot be seen directly, if the trusted execution environment does not provide a perfect confidentiality level for the computing process, the platform can still mine the sensitive data of the data provider to a certain extent through a large amount of data flow information.
[0071] In response to the security risks existing in the above-mentioned confidential big data computing framework, this specification provides a method for performing security detection on the confidential big data computing framework to detect whether it has the above-mentioned security risks.
[0072] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0073] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0074] Figure 2 The present invention is a flowchart of a security detection method provided in this specification. The method is applied to a distributed computing system, wherein the distributed computing system includes a master node and a plurality of slave nodes arranged in a trusted execution environment, each slave node includes a plurality of computing processes, and the method includes the following steps:
[0075] S100: Acquire test data divided into a plurality of data partitions.
[0076] In this specification, the execution subject for implementing the security detection method is a distributed computing system set up on the business platform.
[0077] This method is mainly used to detect security risks in a distributed computing system set up in a trusted execution environment. It is necessary to execute a certain number of computing tasks in the distributed computing system to be detected, and detect whether there are security risks in the process. Based on this, in this step, a certain amount of test data can be first obtained.
[0078] As introduced in this specification, when a distributed computing system is actually applied, neither the platform nor the data user can obtain the original data of the data provider. However, when the method applies a distributed system for the purpose of security testing, the platform itself can act as a data provider and provide test data; or cooperate with the data provider to obtain part of the data that the data provider is willing to provide as test data; or directly purchase part of the data from the data provider as test data, etc. In the above manner, the test data required to execute this method can be obtained, and the specific content of this part of the test data is known.
[0079] In the dense big data computing framework for processing computing tasks, there is a partitioner used to divide a large amount of data into several data partitions. Different partitioners will divide the data according to different logics. Common partitioners include hash partitioners, range partitioners, custom partitioners, etc. Among them, the hash partitioner divides the data with the same hash value into the same data partition; the range partitioner divides the data within the range contained in a given partitioning condition into the same data partition; the custom partitioner divides according to any rules defined by the user.
[0080] This specification mainly uses the partitioner used in the distributed computing system as a range partitioner for explanation. For example, assuming there is a batch of user information data, including the date of birth of each user, then the range partitioner can divide this batch of user information data into two data partitions according to {born before 2000, born after 2000}, one data partition contains the data of users born before 2000, and the other data partition contains the data of users born after 2000. Of course, the range partitioner can also divide the data into other numbers of data partitions according to other partitioning conditions. For example, users born every month can be used as a partitioning condition to divide the user information data into 12 data partitions, etc.
[0081] In actual applications, in order to protect the original data provided by the data provider to the greatest extent, the partitioning conditions when partitioning the original data cannot be directly known by the platform and the data user. The data provider can transmit the original data and the partitioning conditions to the confidential big data computing framework, and the partitioner will partition the original data according to the partitioning conditions and directly store it in the external data storage device.
[0082] Therefore, in this method, the acquired test data may also be test data divided into a number of data partitions, and the partitioning conditions used when partitioning the test data may be unknown. Of course, since the test data itself is known, and the platform itself may act as a data provider, in this method, the partitioning conditions used when partitioning the test data may also be known. Whether the partitioning conditions are known or not has no effect on the implementation of the subsequent steps of this method.
[0083] S102: Send the test data to the slave node, so that the computing process of the slave node caches the test data contained in the data partition, wherein the test data cached in each computing process belongs to a different data partition.
[0084] For the distributed computing system being tested, the test data obtained in step S100 should be brand new test data, that is, the distributed computing system has not been exposed to these test data before. Therefore, in this step, it is first necessary to let the computing process of the slave node in the distributed computing system cache the test data to execute the subsequent steps of this method.
[0085] In this step, the test data can be sent to the slave node in a variety of ways, and this specification provides a specific embodiment for reference. Specifically, a data cache request can be submitted to the master node, so that the master node establishes a cache task and distributes the cache task to the slave node, each cache task is used to cache the test data contained in a data partition; the slave node receives the cache task and obtains the test data contained in the data partition corresponding to the cache task; the slave node calls the computing process to execute the cache task, so that the computing process caches the test data contained in the data partition corresponding to the cache task.
[0086] Since the platform is not clear about the data partitioning conditions in the actual application environment, it is impossible to know in advance the data contained in each data partition. Therefore, in this method, the computing process can be made to actively obtain test data from an external data storage device by making the computing process execute tasks. Since the content of the test data obtained in step S100 is known, a computing task that needs to call the test data can be constructed based on the known test data. The content of the computing task can be any content, and it only needs to call the test data.
[0087] Submit the information of the constructed computing task as a data cache request to the master node, so that the master node constructs the corresponding cache task according to the information of the computing task, and distributes it to the slave node for execution. When the slave node uses the computing process to execute the cache task, it will obtain the data of the data partition required for the cache task from the external data storage device, and then cache the data in the data partition into the computing process. In this way, the process of caching the test data into the computing process can be completed. At the same time, in order to ensure that the test data cached in each computing process is different, in the above process, only one computing task can be executed at a time to ensure that the previous computing task is completed and all computing processes are in an idle state, and then create the next cache task. In this way, it can be ensured that when the called test data has been cached in a computing process, the master node will definitely distribute the cache task to the computing process, without the need for other computing processes to obtain additional data.
[0088] It is worth mentioning that, since the specific division conditions of the test data are not known when constructing the cache task for caching, the cache task that needs to be constructed calls each test data. Of course, without restricting the cache task, a cache task may only call the calculation data in one data partition, or it may call the calculation data in multiple data partitions, so that a computing process may cache test data in multiple data partitions. In order to avoid the above situation, when constructing the cache task, each cache task can only call one test data. Since each test data can only exist in one data partition, it can ensure that a cache task only involves the test data of one data partition, so that a computing process only caches the data in one data partition.
[0089] In addition to the above method, other methods can be used to implement the caching of test data. For example, when the partitioning conditions for partitioning the test data are known, the test data can be directly partitioned into corresponding data partitions according to the partitioning conditions and sent to the computing process of each slave node, so that the computing process of the slave node can directly cache the test data in the data partition.
[0090] S104: For each test data, the master node distributes a query task for querying the test data to each slave node, and determines data flow information when the computing process of each slave node executes the query task.
[0091] After the test data is cached in the computing process of the slave node in step S102, the query task can be started to be executed using the test data in this step, thereby obtaining data flow information when the computing process in each slave node executes the query task.
[0092] When executing this step, it is known that all test data has been cached in each computing process according to data partitions, and each computing process caches data from different data partitions. Therefore, when the same test data is used to perform computing tasks later, the test data cached in the computing process of the slave node will not change.
[0093] Based on this, in this step, by submitting computing tasks that require different test data to the distributed computing system, the data flow information of each computing process when executing computing tasks involving different test data can be monitored. In this method, a relatively simple and direct query task is used as the computing task in this step, which is established by the master node and distributed to the slave nodes.
[0094] In the process of executing the query task from the slave node, the data flow information of the computing process in the slave node can be monitored in a variety of ways. For example, the data flow information of the computing process of each slave node when executing the query task can be obtained through a network packet capture tool, and the data flow information of the computing process of each slave node when executing the query task can also be obtained through query task logs. A variety of different ways of obtaining data flow information can be used separately or together, and this manual does not impose specific restrictions on this.
[0095] Figure 3 This is a schematic diagram of how to obtain data flow information provided in this specification, which corresponds to the content of steps S102 to S104 of this method. Figure 3 As shown, first you need to let the computing process in the slave node cache the test data. Figure 3 The method of using cache tasks introduced in step S102 is adopted. First, the master node establishes and distributes cache tasks to slave nodes. The slave nodes will obtain the test data of the data partitions involved in the cache tasks in the external data storage device, and then the computing process in the slave node can cache the acquired test data. In the above process, whether the cache task needs to return the task execution result does not affect the execution of this method, so the cache task may not return any results. Subsequently, after the test data of all data partitions are cached by each computing process, the master node can establish and distribute query tasks to the computing processes in the slave nodes. Each query task is used to query whether a test data exists, and will be distributed to the computing process that caches the test data according to the priority strategy of the distributed computing system. After executing the query task, the computing process of the slave node needs to return the query result to the master node, and the content of the query result can be any character. At this time, the data communication between each computing process and the master node can be monitored, and the data flow information of each computing process can be obtained.
[0096] S106: Determine the computing process in which the test data is cached according to the data flow information.
[0097] The task content of the query task is to query a specified test data and return it. The returned query result can be the test data itself or any character, etc. This specification does not impose specific restrictions on this. Based on the distribution priority strategy for computing tasks in the distributed computing system, when the master node distributes a query task for querying a test data to the slave node, it will distribute this test task to the computing process that has cached the data partition containing the test data.
[0098] This also means that when the master node distributes a query task for querying a test data, the communication content between the computing process that has not received this query task and the master node is only regular communication content such as reporting the process status, while the computing process that has received this query task needs to return the query result to the master node after executing the query task, and then the communication content between this computing process and the master node will additionally include feedback on the task execution results.
[0099] Although the specific content of the data flow information monitored in a trusted execution environment is still invisible, the amount of data communication is known when the data flows. Therefore, based on the above principles, by comparing the amount of data communication of each computing process when executing the query task, it can be determined which computing process has executed the query task, and then the test data queried by the query task is cached in which computing process. Specifically, for each computing process, the amount of communication data of the computing process when executing the query task can be determined; according to the amount of data communication of each computing process when executing the query task, the computing process to which the test data is cached can be determined.
[0100] Furthermore, since the direct communication content between the computing process that executes the query task and the main node has one more feedback on the task execution result than the direct communication content between other computing processes and the main node, the data communication volume between the computing process that executes the query task and the main node must be greater than the data communication volume between other computing processes and the main node. Therefore, after comparison, the computing process with the largest data communication volume with the main node can be determined as the computing process that executes the query task, that is, the computing process with the largest data communication volume when executing the query task can be determined as the computing process to which the test data is cached.
[0101] The above description is for a query task for querying a test data. For each test data, a query task for querying the test data can be constructed, and the computing process to which the query data is cached can be determined in the above manner.
[0102] S108: judging whether the division condition of the data partition can be determined according to the computing process to which each test data is cached.
[0103] After completing step S106, the computing process to which each test data is cached can be determined. Since the test data stored in a computing process is the test data under a data partition, all the test data contained in each computing partition can be obtained according to the computing process to which each test data is cached.
[0104] When the range partitioner partitions the test data, the test data under the same partitioning condition will be divided into one data partition. This means that the test data under the same data partition must have at least one common attribute. Based on this, in this step, an attempt can be made to determine the partitioning conditions of each data partition of the test data. Specifically, the test data contained in the data partition cached by each computing process can be determined based on the computing process to which each test data is cached; based on the similarities and differences of the test data contained in each data partition, it can be determined whether the partitioning conditions of the data partition can be determined.
[0105] Compare the test data in the same data partition to find the common points of all the test data in the same data partition; at the same time, compare the test data in different data partitions to find the differences of the test data in different data partitions. Through the above comparison, if the clear range of the test data contained in each data partition can be determined, then this range can be the division condition of the data partition.
[0106] For the range partitioner, the partitioning conditions must be meaningful, and the data in each data partition must belong to a certain accurate range, so that the huge amount of data can be effectively divided into small data sets. At the same time, when the range partitioner partitions the data, since each partitioned data partition will not contain the same data, the partitioning conditions of each data partition must be based on the same attributes.
[0107] For example, suppose a range partitioner is used to partition a batch of user information data, and each user information data contains attributes such as the user's age, gender, date of birth, etc. Then when the range partitioner is partitioning, it may divide this batch of user information data into two data partitions, {male users, female users}, according to the user's gender attribute; it may also divide this batch of user information data into three data partitions, {less than 20 years old, 20 to 40 years old, and more than 40 years old}, according to the age attribute. However, the range partitioner will not divide the user information data into two data partitions, {less than 20 years old, male users}. This division method will cause overlapping data in different data partitions, and some data will not be divided into any partition. Both of these situations cannot happen. Of course, the range partitioner can also divide data according to multiple attributes at the same time. For example, the above two division conditions can be combined to divide it into six data partitions, {male users less than 20 years old, female users less than 20 years old, male users between 20 and 40 years old, female users between 20 and 40 years old, male users more than 40 years old, and female users more than 40 years old}. In any case, the data attributes targeted by the division conditions of each data partition must be the same.
[0108] Therefore, it can be concluded that if the computing process to which each test data is cached determined in step S106 is correct in this method, then the division conditions of each data partition can be found in this step. On the contrary, if the computing process to which each test data is cached determined in step S106 is incorrect, then the division conditions of each data partition cannot be determined in the end.
[0109] S110: In response to successfully determining the division condition of the data partition, determining that the distributed system has a security risk.
[0110] By inferring the conclusion in step S110, it can be seen that if the division conditions of the data partition can be successfully determined in step S108, then the computing process to which each test data is cached determined in step S106 is correct. This also means that the detected secret big data computing framework can crack what kind of data is stored in each data partition by monitoring the data flow information of its computing process. The malicious party is likely to crack the original data of the data provider through this information, and it can be determined that there are security risks in the distributed computing system.
[0111] On the contrary, if the division conditions of the data partition cannot be successfully determined in step S108, it means that the computing process to which each test data is cached determined in step S106 is incorrect. This also means that it is impossible to crack what kind of data is stored in each data partition in the detected secret big data computing framework by monitoring the data flow information of each computing process, and it can be determined that there is no security risk in this aspect in the distributed computing system.
[0112] When the security detection method provided in this specification is used to detect the security of a distributed computing system in a secret environment, it is possible to determine whether the division conditions of each data partition of the test data can be predicted by monitoring the data flow information of each computing process when the distributed computing system processes a computing task using test data, and when the division conditions can be determined, it can be determined that there are security risks in the distributed computing system. This method can effectively detect whether there are security risks in a distributed computing system in a secret environment where a malicious party can crack the original data by monitoring the data flow information, and can help the platform improve its own secret big data computing framework and prevent data leakage.
[0113] Additionally, in the present method, in addition to directly determining whether there are security risks in the distributed computing system based on the division conditions that can determine the data partitions of the test data, it is also possible to further design a special computing task to verify whether the determined division conditions are correct. Specifically, before determining that there are security risks in the distributed computing system, the master node may receive a task execution request submitted by a data user, establish a test task based on the data call range carried in the task execution request, and distribute the test task to the slave node so that the slave node calls a computing process to execute the test task; based on the data flow information when the computing process of each slave node executes the test task, determine the computing process used when executing the test task; at this time, in response to the computing process used when executing the test task matching the computing process to which the test data contained in the data call range is cached, determine that there are security risks in the distributed system.
[0114] Although it is possible to determine with a high probability that there are security risks in the distributed computing system when a clear partitioning condition can be determined, in extreme cases, when the computing process to which the determined test data is cached is incorrect, it is possible that a set of matching partitioning conditions can be determined. Therefore, it is possible to further determine whether the determined partitioning condition is correct by executing a specific computing task.
[0115] In this process, according to the determined data partitioning conditions, a task request that will only call all the test data in one data partition can be submitted to the master node, and the master node will create the corresponding test task and distribute it to the slave node for execution. If the determined partitioning conditions are correct, then it can be imagined that since this batch of test tasks only calls the data of one data partition, this batch of test tasks will be distributed to the same computing process, that is, the computing process that caches the test data of the data partition for execution. At this time, by monitoring the data flow information between each computing process and the master node, it can be obtained that only this computing process will return more data communication volume than other computing processes. On the contrary, if the determined partitioning conditions are incorrect, then this batch of test data should not belong to the same data partition, and the master node will not distribute all of this batch of test tasks to the same computing process. At this time, there will be more than one computing process returning more data communication volume.
[0116] Without considering whether the determined partitioning condition is correct, according to the information of the computing process to which each test data is cached determined in step S106, and the partitioning condition determined in step S108, it can be determined which computing process caches the test data of which data partition. After submitting a task application involving data partitions to the master node, if it is subsequently found that the master node distributes all test tasks to a computing process, and this computing process matches the computing process that caches the test data involved in the test task obtained through steps S106~S108, then it can be determined that the contents determined in S106~S108 are correct, and it is further determined that there are security risks in the distributed computing system. On the contrary, if this computing process does not match the computing process that caches the test data involved in the test task obtained through steps S106~S108, or the master node distributes the test task to more than one computing process, then it can be determined that the contents determined in steps S106~S108 are not correct, and it can be further determined that there are no security risks in this aspect in the distributed computing system.
[0117] The above are one or more methods for implementing safety detection in this specification. Based on the same idea, this specification also provides corresponding safety detection devices, such as Figure 4 shown.
[0118] Figure 4 This is a schematic diagram of a security detection device provided in this specification, the device is applied to a distributed computing system, the distributed computing system includes a master node and a plurality of slave nodes arranged in a trusted execution environment, each slave node includes a plurality of computing processes, the device includes:
[0119] An acquisition module 200, used to acquire test data divided into a plurality of data partitions;
[0120] A cache module 202, configured to send the test data to the slave node, so that the computing process of the slave node caches the test data contained in the data partition, wherein the test data cached in each computing process belongs to a different data partition;
[0121] A distribution module 204 is used for distributing, for each test data, a query task of querying the test data to each slave node by the master node, and determining data flow information when the computing process of each slave node executes the query task;
[0122] A determination module 206, configured to determine the computing process to which the test data is cached according to the data flow information;
[0123] A judgment module 208, used to judge whether the division condition of the data partition can be determined according to the computing process to which each test data is cached;
[0124] The response module 210 is used to determine that there is a security risk in the distributed system in response to successfully determining the division condition of the data partition.
[0125] Optionally, the cache module 202 is specifically used to submit a data cache request to the master node, so that the master node establishes a cache task and distributes the cache task to the slave nodes, each cache task is used to cache the test data contained in a data partition; the slave node receives the cache task and obtains the test data contained in the data partition corresponding to the cache task; the slave node calls the computing process to execute the cache task, so that the computing process caches the test data contained in the data partition corresponding to the cache task.
[0126] Optionally, the distribution module 204 is specifically used to obtain data flow information of the computing process of each slave node when executing the query task through a network packet capture tool, and / or obtain data flow information of the computing process of each slave node when executing the query task through a query task log.
[0127] Optionally, the determination module 206 is specifically used to determine, for each computing process, the size of the communication data volume of the computing process when executing the query task; and determine the computing process to which the test data is cached based on the size of the data communication volume of each computing process when executing the query task.
[0128] Optionally, the determination module 206 is specifically configured to determine the computing process with the largest data communication volume when executing the query task as the computing process in which the test data is cached.
[0129] Optionally, the judgment module 208 is specifically used to determine the test data contained in the data partition cached by each computing process according to the computing process to which each test data is cached; and to determine whether the division conditions of the data partitions can be determined according to the similarities and differences of the test data contained in each data partition.
[0130] Optionally, the device further includes a test module 212, which is specifically used for the master node to receive a task execution request submitted by a data user, establish a test task according to the data call range carried in the task execution request, and distribute the test task to the slave nodes so that the slave nodes call a computing process to execute the test task; determine the computing process used when executing the test task according to data flow information when the computing process of each slave node executes the test task;
[0131] The response module 210 is specifically configured to determine that there is a security risk in the distributed system in response to a match between the computing process used when executing the test task and the computing process in which the test data included in the data call range is cached.
[0132] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 2 A safety detection method is provided.
[0133] This manual also provides Figure 5 The one shown corresponds to Figure 2 A schematic diagram of the electronic device. Figure 5 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 2 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0134] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with hardware entity modules. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0135] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0136] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0137] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0138] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0139] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0140] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0142] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0143] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0144] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0145] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0146] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0147] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0148] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0149] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A security detection method, the method is applied to a distributed computing system, the distributed computing system includes a master node and a plurality of slave nodes arranged in a trusted execution environment, each slave node includes a plurality of computing processes, the method include: Obtain test data divided into a number of data partitions; Sending the test data to the slave node, so that the computing process of the slave node caches the test data contained in the data partition, wherein the test data cached in each computing process belongs to a different data partition; For each test data, the master node distributes a query task for querying the test data to each slave node, and determines data flow information when the computing process of each slave node executes the query task; Determine, according to the data flow information, the computing process in which the test data is cached; According to the computing process to which each test data is cached, determining whether the division condition of the data partition can be determined; In response to successfully determining the division condition of the data partition, it is determined that the distributed computing system has a security risk.
2. The method according to claim 1, wherein the test data is sent to the slave node so that the computing process of the slave node caches the test data contained in the data partition, specifically include: Submitting a data cache request to the master node, causing the master node to establish a cache task and distribute the cache task to the slave nodes, each cache task being used to cache test data contained in a data partition; The slave node receives the cache task and obtains the test data contained in the data partition corresponding to the cache task; The slave node calls the computing process to execute the cache task, so that the computing process caches the test data contained in the data partition corresponding to the cache task.
3. The method according to claim 1, determining the data flow information when the computing process of each slave node executes the query task, specifically include: The data flow information of the computing process of each slave node when executing the query task is obtained through a network packet capture tool, and / or the data flow information of the computing process of each slave node when executing the query task is obtained through a query task log.
4. The method according to claim 1, wherein the computing process to which the test data is cached is determined according to the data flow information, specifically include: For each computing process, determining the size of the communication data volume of the computing process when executing the query task; The computing process to which the test data is cached is determined according to the amount of data communication of each computing process when executing the query task.
5. The method according to claim 4, wherein the computing process to which the test data is cached is determined according to the amount of data communication of each computing process when executing the query task, specifically include: The computing process with the largest data communication volume when executing the query task is determined as the computing process in which the test data is cached.
6. The method according to claim 1, wherein the conditions for partitioning the data partitions can be determined according to the computing process to which each test data is cached. include: According to the computing process to which each test data is cached, determining the test data contained in the data partition cached by each computing process; According to the similarities and differences of the test data contained in each data partition, it is judged whether the division condition of the data partition can be determined.
7. The method according to claim 1, before determining that the distributed computing system has a security risk in response to successfully determining the partitioning condition of the data partition, the method further comprises: include: The master node receives a task execution request submitted by a data user, establishes a test task according to the data call range carried in the task execution request, and distributes the test task to the slave node, so that the slave node calls a computing process to execute the test task; Determine the computing process used when executing the test task according to the data flow information when the computing process of each slave node executes the test task; In response to successfully determining the division condition of the data partition, determining that the distributed computing system has a security risk specifically includes: In response to the computing process used when executing the test task matching the computing process in which the test data included in the data call range is cached, it is determined that there is a security risk in the distributed computing system.
8. A security detection device, the device is applied to a distributed computing system, the distributed computing system includes a master node and a plurality of slave nodes arranged in a trusted execution environment, each slave node includes a plurality of computing processes, the device include: An acquisition module, used for acquiring test data divided into a plurality of data partitions; A cache module, used for sending the test data to the slave node, so that the computing process of the slave node caches the test data contained in the data partition, wherein the test data cached in each computing process belongs to a different data partition; A distribution module, used for distributing, for each test data, a query task of querying the test data to each slave node by the master node, and determining data flow information when the computing process of each slave node executes the query task; A determination module, used to determine the computing process to which the test data is cached according to the data flow information; A judgment module, used for judging whether the division condition of the data partition can be determined according to the computing process to which each test data is cached; The response module is used to determine that there is a security risk in the distributed computing system in response to successfully determining the division condition of the data partition.
9. The device according to claim 8, wherein the cache module is specifically used to submit a data cache request to the master node, so that the master node establishes a cache task, and distributes the cache task to the slave node, each cache task is used to cache the test data contained in a data partition ; The slave node receives the cache task and obtains the test data contained in the data partition corresponding to the cache task; The slave node calls the computing process to execute the cache task, so that the computing process caches the test data contained in the data partition corresponding to the cache task.
10. In the device as described in claim 8, the distribution module is specifically used to obtain the data flow information of the computing process of each slave node when executing the query task through a network packet capture tool, and / or obtain the data flow information of the computing process of each slave node when executing the query task through a query task log.
11. In the device as described in claim 8, the determination module is specifically used to determine, for each computing process, the size of the communication data volume of the computing process when executing the query task; and determine the computing process to which the test data is cached based on the size of the data communication volume of each computing process when executing the query task.
12. The device according to claim 11, wherein the determination module is specifically used to determine the computing process with the largest data communication volume when executing the query task as the computing process in which the test data is cached.
13. In the device as described in claim 8, the judgment module is specifically used to determine the test data contained in the data partition cached by each computing process according to the computing process to which each test data is cached; and to judge whether the division conditions of the data partitions can be determined according to the similarities and differences of the test data contained in each data partition.
14. The device as claimed in claim 8, further comprising a test module, which is specifically used for the master node to receive a task execution request submitted by a data user, establish a test task according to the data call range carried in the task execution request, and distribute the test task to the slave nodes so that the slave nodes call a computing process to execute the test task; determine the computing process used when executing the test task according to data flow information when the computing process of each slave node executes the test task; The response module is specifically used to determine that there is a security risk in the distributed computing system in response to the computing process used when executing the test task matching the computing process in which the test data included in the data call range is cached.
15. A computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
16. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the program.
