Data transmission method and device, electronic equipment and storage medium

By introducing the counting stage and shuffling encryption module into the MapReduce architecture, the data between the Mapper node and the Counter node is encrypted, which solves the problem of data transmission between the Mapper node and the Reducer node leaking user privacy, and realizes the protection of user privacy. protection.

CN118802893APending Publication Date: 2024-10-18LIAONING MOBILE COMM +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311523714.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-15
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In the MapReduce remote service architecture, data transmission between Mapper nodes and Reducer nodes will leak user privacy. Attackers can infer users' private data by analyzing traffic information.

Method used

The counting phase is introduced into the MapReduce architecture, and the data is encrypted through the shuffling encryption module to ensure that the data transmitted between the Mapper node and the Counter node is not easy to interpret, and the input and output data volumes are confused in the Counter node, making it impossible for attackers to Analyze transmitted traffic.

Benefits of technology

It effectively protects user privacy, prevents attackers from analyzing user privacy through traffic data between nodes, and ensures the security of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802893A_ABST
    Figure CN118802893A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method and device, electronic equipment and a storage medium, a first node of the method receives N grouped files sent by a second node, fragment file types in each grouped file are the same, and then N shuffling encryption modules are created, the input data volume and the output data volume of the shuffling encryption module are both larger than the number of the input fragmented files, then target input data corresponding to each grouped file is constructed and input to the corresponding shuffling encryption module for encryption, and an encryption tuple corresponding to each fragmented file is obtained and sent to a third node. The shuffled N groups are transmitted between the first node and the second node, so that data among the nodes are not easy to interpret, and the number of input objects and the number of output objects of the shuffling encryption module are both greater than the number of fragment files in the corresponding groups, so that hidden channel information among the nodes can be confused; therefore, an attacker cannot analyze the data transmitted between the nodes, and the privacy of a user is protected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of big data analysis, and in particular, relates to a method, device, electronic device and storage medium for data transmission. Background Art

[0002] MapReduce remote service architecture is a system structure for programming big data processing. It consists of a map phase and a reduce phase. It is easy to program, highly scalable, and highly fault-tolerant. However, in the process of providing remote services to users, this system architecture will encounter information security issues caused by data processing.

[0003] In the prior art, sensitive information on remote services is often encrypted, or partitioned, that is, sensitive data is processed on the trusted server side, and ordinary data is processed on the public service side, so as to avoid leaking user privacy. However, due to the characteristics of multiple computing nodes sharing memory and data storage in the MapReduce remote service architecture, attackers can obtain the distribution information of the overall input data by analyzing the traffic transmitted between the Mapper node and the Reducer node, and locate and analyze each record, thereby inferring user privacy.

[0004] Therefore, the problem with the prior art is that the traffic transmitted between the Mapper node and the Reducer node will leak user privacy. Summary of the invention

[0005] The embodiments of the present application provide a method, device, electronic device and storage medium for data transmission, which solve the problem that the traffic transmitted between the Mapper node and the Reducer node may leak user privacy.

[0006] In a first aspect, an embodiment of the present application provides a data transmission method, applied to a first node, including:

[0007] Receiving N grouped files sent by the second node, wherein each grouped file includes slice files of the same type;

[0008] According to the number of fragment files in the group file, N shuffle encryption modules are created, wherein each group file corresponds to a shuffle encryption module, and the input data volume and output data volume of the shuffle encryption module are both greater than the number of fragment files input to the shuffle encryption module;

[0009] Based on each group file and the fake input data, construct the target input data corresponding to each group file respectively;

[0010] Input each target input data into the corresponding shuffle encryption module for encryption, and obtain the first encrypted tuple corresponding to each shard file;

[0011] The first encrypted tuple is sent to the third node.

[0012] In some possible implementations, based on each group file and the fake input data, target input data corresponding to each group file is constructed respectively, including:

[0013] According to the first correspondence between the positions of the shard files and the input data, the shard files in the same group are filled into the first position of the input data;

[0014] Fill the second position of the input data with fake input data to obtain fully filled target input data, wherein the sum of the number at the first position and the number at the second position is the input data amount.

[0015] In some possible implementations, the method further includes:

[0016] Obtaining a second encrypted tuple corresponding to each false input data, wherein the second encrypted tuple is obtained by inputting the false input data into a corresponding shuffle encryption module for encryption;

[0017] According to the second correspondence between the positions of the encrypted tuples and the output data, each first encrypted tuple is filled into the third position of the output data, and each second encrypted tuple is filled into the fourth position of the output data, to obtain the fully filled target output data, wherein the sum of the number of the third position and the number of the fourth position is the output data amount;

[0018] Sending the first encrypted tuple to the third node includes:

[0019] The target output data is sent to the third node.

[0020] In a second aspect, an embodiment of the present application further provides a data transmission method, applied to a second node, including:

[0021] Get M fragment files, which are obtained by splitting the target file;

[0022] Segment files of the same type are grouped together to obtain N group files.

[0023] N grouping files are sent to the first node, so that the first node can create N shuffle encryption modules according to the number of shard files in the grouping files, wherein each grouping file corresponds to a shuffle encryption module; based on each grouping file and false input data, target input data corresponding to each grouping file is respectively constructed; each target input data is input into the corresponding shuffle encryption module for encryption, so as to obtain a first encrypted tuple corresponding to each shard file; and the first encrypted tuple is sent to the third node.

[0024] In some possible implementations, the M slice files are encrypted files; the slice files of the same type are grouped in the same group to obtain N group files, including:

[0025] Parse each shard file separately to obtain M shard files after parsing;

[0026] Obtain the type information of the M fragment files after parsing respectively;

[0027] Segment files with the same type information are grouped together to obtain N group files.

[0028] In some possible implementations, the method further includes:

[0029] Semantically encrypt the M fragment files after parsing respectively to obtain M fragment files after semantic encryption;

[0030] Segment files with the same type information are grouped together to obtain N groups, including:

[0031] The semantically encrypted fragment files with the same type information are grouped into the same group to obtain N group files.

[0032] In a third aspect, an embodiment of the present application further provides a data transmission device, applied to a first node, including:

[0033] A receiving module, configured to receive N group files sent by the second node, wherein each group file includes slice files of the same type;

[0034] A creation module is used to create N shuffle encryption modules according to the number of fragment files in the group file, wherein each group file corresponds to a shuffle encryption module, and the input data volume and output data volume of the shuffle encryption module are both greater than the number of fragment files input to the shuffle encryption module;

[0035] A construction module, used for respectively constructing target input data corresponding to each group file based on each group file and the false input data;

[0036] The encryption module is used to input each target input data into the corresponding shuffle encryption module for encryption, so as to obtain the first encryption tuple corresponding to each fragment file;

[0037] The sending module is used to send the first encrypted tuple to the third node.

[0038] In some possible implementations, the construction module is used to construct target input data corresponding to each group file based on each group file and the fake input data, including:

[0039] A filling unit, used to fill the slice files in the same group into the first position of the input data according to the first corresponding relationship between the positions of the slice files and the input data;

[0040] The filling unit is further used to fill the false input data at the second position of the input data to obtain the fully filled target input data, wherein the sum of the quantity at the first position and the quantity at the second position is the input data quantity.

[0041] In some possible implementations, the device further includes an acquisition module and a filling module:

[0042] An acquisition module, used for acquiring a second encrypted tuple corresponding to each false input data, wherein the second encrypted tuple is obtained by inputting the false input data into a corresponding shuffle encryption module for encryption;

[0043] a filling module, configured to fill each first encrypted tuple into a third position of the output data and fill each second encrypted tuple into a fourth position of the output data according to a second corresponding relationship between the positions of the encrypted tuple and the output data, so as to obtain the target output data after all the filling, wherein the sum of the number of the third position and the number of the fourth position is the output data amount;

[0044] A sending module, used to send the first encrypted tuple to a third node, comprising:

[0045] The sending module is used to send the target output data to the third node.

[0046] In a fourth aspect, an embodiment of the present application further provides a data transmission device, which is applied to a second node, including:

[0047] An acquisition module is used to acquire M fragment files, where the fragment files are obtained by splitting the target file;

[0048] The summarization module is used to summarize the fragment files of the same type into the same group to obtain N group files;

[0049] A sending module is used to send N group files to the first node, so that the first node can create N shuffle encryption modules according to the number of fragment files in the group files, wherein each group file corresponds to a shuffle encryption module; based on each group file and false input data, respectively construct the target input data corresponding to each group file; input each target input data into the corresponding shuffle encryption module for encryption, and obtain the first encrypted tuple corresponding to each fragment file; and send the first encrypted tuple to the third node.

[0050] In some possible implementations, the M slice files are encrypted files; the summarization module is used to summarize the slice files of the same type into the same group to obtain N group files, including:

[0051] A parsing unit, used to parse each fragment file respectively to obtain M fragment files after parsing;

[0052] An acquisition unit, used to respectively acquire type information of the M fragment files after parsing;

[0053] The summarizing unit is used to summarize the fragment files with the same type information into the same group to obtain N group files.

[0054] In some possible implementations, the apparatus further includes:

[0055] An encryption module is used to perform semantic encryption on the parsed M fragment files respectively to obtain M semantically encrypted fragment files;

[0056] The summarization module is used to summarize the fragment files with the same type information into the same group to obtain N groups, including:

[0057] The summarization module is used to summarize the semantically encrypted fragment files with the same type information into the same group to obtain N group files.

[0058] In a fifth aspect, an embodiment of the present application further provides an electronic device comprising a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements a method for data transmission as in the first aspect or any possible implementation of the first aspect, or implements a method for data transmission as in the second aspect or any possible implementation of the second aspect.

[0059] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method for data transmission in the first aspect or any possible implementation of the first aspect is implemented, or the method for data transmission in the second aspect or any possible implementation of the second aspect is implemented.

[0060] The data transmission method, device, electronic device and storage medium of the embodiments of the present application receive N group files sent by the second node through the first node, wherein each group file includes slice files of the same type, and then create N shuffle encryption modules according to the number of slice files in the group file, wherein each group file corresponds to a shuffle encryption module, and the input data volume and output data volume of the shuffle encryption module are both greater than the number of slice files input to the shuffle encryption module. Then, based on each group file and false input data, the target input data corresponding to each group file can be constructed respectively, and then each target input data is input into the corresponding shuffle encryption module for encryption, so as to obtain the first encrypted tuple corresponding to each slice file, and then the first encrypted tuple can be sent to the third node. The embodiment of the present application adds a new node in the MapReduce remote service architecture, and transmits the shuffled N groups to the first node through the second node, so that the data transmitted between the first node and the second node is not easy to be interpreted. Then, in the first node, since the number of input objects and the number of output objects of the shuffled encryption module are both greater than the number of shard files in the corresponding group, the purpose of obfuscating the hidden channel information between nodes can be achieved. Then the first node can transmit the encrypted first encrypted tuple to the third node, thereby completing the processing and transmission of user data information in each node, making it impossible for attackers to analyze the traffic data transmitted between each node, thereby protecting user privacy. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0062] Figure 1 It is a flowchart of a data transmission method provided by an embodiment of the present application;

[0063] Figure 2 is a flowchart of another method for data transmission provided by an embodiment of the present application;

[0064] Figure 3 It is a structural diagram of a shuffle encryption module provided in an embodiment of the present application;

[0065] Figure 4 It is a schematic diagram of a process of creating a shuffle encryption module provided by an embodiment of the present application;

[0066] Figure 5 is a schematic diagram of a data transmission device provided in an embodiment of the present application;

[0067] Figure 6 is a schematic diagram of another data transmission device provided in an embodiment of the present application;

[0068] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0069] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0070] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0071] MapReduce remote service architecture is a system structure for programming big data processing. It consists of a map phase and a reduce phase. It is easy to program, highly scalable, and highly fault-tolerant. However, in the process of providing remote services to users, this system architecture will encounter information security issues caused by data processing.

[0072] In the prior art, sensitive information on remote services is often encrypted, or partitioned, that is, sensitive data is processed on a trusted server and ordinary data is processed on a public service, to avoid leaking user privacy. However, due to the characteristics of the MapReduce remote service architecture, such as multiple computing nodes sharing memory and data storage, attackers can obtain the distribution information of the overall input data by analyzing the traffic transmitted between the Mapper node and the Reducer node, and locate and analyze each record, thereby inferring user privacy. Therefore, the prior art has the problem that the traffic transmitted between the Mapper node and the Reducer node will leak user privacy.

[0073] Based on this, the embodiments of the present application provide a method, apparatus, device and storage medium for data transmission, and add a counting phase (Counting) in the mapreduce process, which mainly includes a mapping phase (Mapping), a counting phase (Counting) and a reduction phase (Reducing), wherein the mapper node is mainly used to classify the M fragment files after the target file is split, the counter node is mainly used to shuffle the classified fragment files through a shuffling encryption module to perform a fixed input / output quantity, and the reducer node is mainly used to receive the encrypted tuples shuffled by the shuffling encryption module and perform reduction and other processing, thereby solving the problem that the traffic transmitted between the mapper node and the reducer node may leak user privacy.

[0074] The data transmission method provided by the embodiment of the present application is further described in detail below with reference to the accompanying drawings.

[0075] Figure 1 is a schematic diagram of a data transmission method provided by an embodiment of the present application, such as Figure 1 As shown, the method may include steps S110 to S180.

[0076] S110: The second node obtains M fragment files, where the fragment files are obtained by splitting the target file.

[0077] The second node is a node for classifying the M fragment files after the target file is split, for example, it can be a mapper mapping node in the MapReduce remote service architecture.

[0078] The first node is a node used to shuffle the classified fragment files through a shuffling encryption module, for example, it can be a counter computing node in a MapReduce remote service architecture.

[0079] The third node is a node for receiving the encrypted tuples shuffled by the shuffling encryption module and performing reduction and other processing, for example, it can be a reducer reduction node in the MapReduce remote service architecture.

[0080] Specifically, the second node may obtain M fragment files obtained based on the splitting of the target file. For example, the mapper node may obtain M fragment files obtained based on the splitting of the target file.

[0081] S120: The second node groups the same type of slice files into the same group to obtain N group files.

[0082] Specifically, the second node may group the same type of slice files into the same group to obtain N group files. For example, the mapper node may group the same type of slice files into the same group to obtain N group files.

[0083] In some embodiments, the M slice files are encrypted files; the slice files of the same type are grouped into the same group to obtain N group files, including:

[0084] Parse each shard file separately to obtain M shard files after parsing;

[0085] Obtain the type information of the M fragment files after parsing respectively;

[0086] Segment files with the same type information are grouped together to obtain N group files.

[0087] Specifically, the M slice files may be encrypted files, and the slice files of the same type are grouped together in the same group to obtain N group files, which may include: parsing each encrypted slice file separately to obtain the parsed M slice files, and then obtaining the type information of the parsed M slice files separately, and then grouping the slice files with the same type information in the same group to obtain N group files. For example, group_1 includes slice files of type_1, group_2 includes slice files of type_2, ..., and group_N includes slice files of type_N. In an embodiment of the present application, by decrypting the encrypted slice files, the type information of the slice files can be obtained, which can be used for subsequent grouping according to the types of the slice files.

[0088] In some embodiments, the data transmission method further includes:

[0089] Semantically encrypt the M fragment files after parsing respectively to obtain M fragment files after semantic encryption;

[0090] Segment files with the same type information are grouped together to obtain N groups, including:

[0091] The semantically encrypted fragment files with the same type information are grouped into the same group to obtain N group files.

[0092] Specifically, the data transmission method may further include: semantically encrypting the M parsed slice files respectively to obtain M semantically encrypted slice files. Therefore, the slice files with the same type information are grouped together to obtain N groups, which may include: grouping the semantically encrypted slice files with the same type information into the same group to obtain N group files. For example, group_1 includes semantically encrypted slice files of type_1, group_2 includes semantically encrypted slice files of type_2, ..., and group_N includes semantically encrypted slice files of type_N. In an embodiment of the present application, after parsing the M slice files and obtaining the type information, the slice files may be semantically encrypted again to obtain N group files. At this time, the slice files in each group file are not only of the same type, but also voice-encrypted slice files, which are not easily parsed by attackers, thereby protecting user privacy.

[0093] S130: The second node sends N group files to the first node, where each group file includes slice files of the same type.

[0094] Specifically, the second node can send N group files to the first node, wherein each group file includes slice files of the same type, and the traffic transmitted between the second node and the first node is different group files obtained according to different types. For example, the mapper_1 node sends group file_1 to the counter_1 node, and the group file_1 includes slice files of type_1; the mapper_2 node sends group file_2 to the counter_2 node, and the group file_2 includes slice files of type_2; ...; the mapper_N node sends group file_N to the counter_N node, and the group file_N includes slice files of type_N. Since the data transmitted between each mapper node and the counter node is a group file, the group file is obtained by shuffling the slice files after type classification, and one group file includes slice files of the same type, different target files can obtain different group files according to the diversity of types, so that attackers cannot find out the rules by analyzing the traffic transmitted between the mapper node and the counter node, thereby protecting user privacy.

[0095] S140, the first node creates N shuffle-encryption modules according to the number of fragment files in the group file, wherein each group file corresponds to a shuffle-encryption module, and the input data volume and output data volume of the shuffle-encryption module are both greater than the number of fragment files input to the shuffle-encryption module.

[0096] Specifically, the first node can create N shuffle encryption modules according to the number of shard files in the group file, wherein each group file can correspond to a shuffle encryption module, and the input data volume and output data volume of the shuffle encryption module are both greater than the number of shard files of the input shuffle encryption module. For example, the number of shard files in group file_1 is 10, the number of shard files in group file_2 is 20, ..., and the number of shard files in group file_N is 100. Then, the counter node can create N shuffle encryption modules according to the number of shard files in the group file, wherein each group file can correspond to a shuffle encryption module, the input data volume of the shuffle encryption module is greater than the number of shard files of the input shuffle encryption module, and the output data volume of the shuffle encryption module is greater than the number of shard files of the output shuffle encryption module.

[0097] S150: The first node constructs target input data corresponding to each group file based on each group file and the false input data.

[0098] Specifically, after creating N shuffle encryption modules (the input data volume and output data volume of the shuffle encryption module are both greater than the number of shard files of the input shuffle encryption module), the first node can construct the target input data corresponding to each group file based on each group file and the false input data. For example, shuffle encryption module_1 corresponds to group file_1, and the input data volume of shuffle encryption module_1 is target input data_1, which is constructed by the shard files and false input data in group file_1.

[0099] S160, the first node inputs each target input data into the corresponding shuffle encryption module for encryption, and obtains a first encryption tuple corresponding to each shard file.

[0100] The encrypted tuple refers to the encrypted tuple obtained after the shuffle encryption module encrypts the slice file, and the encrypted tuple may include the slice file and the key value corresponding to the slice file.

[0101] Specifically, the first node inputs each target input data into the corresponding shuffle encryption module for encryption, and the first encrypted tuple corresponding to each shard file can be obtained. For example, the counter node can input the target input data_1 into the corresponding shuffle encryption module_1, and encrypt each shard file in the group file_1, and obtain the encrypted tuple corresponding to each shard file, which can be called the first encrypted tuple. For another example, the group file_1 includes shard files_1 to shard files_10, which are input into the corresponding shuffle encryption module_1 for encryption, and the encrypted tuples_1 to encrypted tuples_10 corresponding to the shard files_1 to shard files_10 are obtained.

[0102] S170, the first node sends the first encrypted tuple to the third node.

[0103] Specifically, the first node can send the first encrypted tuple to the third node. For example, the counter_1 node can send the first encrypted tuple corresponding to each shard file in the group file_1 to the reducer_1 node; the counter_2 node can send the first encrypted tuple corresponding to each shard file in the group file_2 to the reducer_2 node;...; the counter_N node can send the first encrypted tuple corresponding to each shard file in the group file_N to the reducer_N node.

[0104] It should be noted that in MapReduce, data can be transmitted in the form of key-value pairs. Therefore, during transmission, the shard files and key values ​​can be processed simultaneously to obtain new key-value pairs. The processing process is the same as steps S110 to S170 and will not be repeated here.

[0105] In the data transmission method provided in the embodiment of the present application, N group files sent by the second node are received by the first node, wherein each group file includes shard files of the same type, and then N shuffle encryption modules are created according to the number of shard files in the group file, wherein each group file corresponds to a shuffle encryption module, and the input data volume and output data volume of the shuffle encryption module are both greater than the number of shard files input to the shuffle encryption module. Then, based on each group file and the false input data, the target input data corresponding to each group file can be constructed respectively, and then each target input data is input into the corresponding shuffle encryption module for encryption, so as to obtain the first encrypted tuple corresponding to each shard file, and then the first encrypted tuple can be sent to the third node. The embodiment of the present application adds a new node in the MapReduce remote service architecture, and transmits the shuffled N groups to the second node through the first node, so that the data transmitted between the first node and the second node is not easy to be interpreted. Then, in the second node, since the number of input objects and the number of output objects of the shuffled encryption module are both greater than the number of shard files in the corresponding group, the purpose of obfuscating the hidden channel information between nodes can be achieved. Then, the second node can transmit the encrypted first encrypted tuple to the third node, thereby completing the processing and transmission of user data information in each node, making it impossible for attackers to analyze the traffic data transmitted between each node, thereby protecting user privacy.

[0106] In some embodiments, based on each group file and the fake input data, target input data corresponding to each group file is constructed respectively, including:

[0107] According to the first correspondence between the positions of the shard files and the input data, the shard files in the same group are filled into the first position of the input data;

[0108] Fill the second position of the input data with fake input data to obtain fully filled target input data, wherein the sum of the number at the first position and the number at the second position is the input data amount.

[0109] Specifically, based on each group file and the fake input data, the target input data corresponding to each group file is constructed respectively, which may include: according to the corresponding relationship between the position of the shard file and the input data, the corresponding relationship may be called the first corresponding relationship, the shard file in the same group may be filled into the first position of the input data, and then the fake input data may be filled into the second position of the input data, to obtain the input data after all the filling, which may be called the target input data, wherein the sum of the number of the first position and the number of the second position is the input data volume, which may also be understood as the sum of the number of the shard files at the first position and the number of the fake input objects at the second position is the input data volume of a shuffle encryption module corresponding to the input. In an embodiment of the present application, a group file may correspond to a shuffle encryption module, and according to the first corresponding relationship between the position of the shard file and the input data, the shard file in the same group may be filled into the first position of the input data, and then the fake input data may be filled into the second position of the input data, to obtain the target input data after all the filling, wherein the sum of the number of the first position and the number of the second position is the input data volume, which realizes the confusion of the input data volume and content, and can confuse the implicit channel information between nodes, and protect the privacy of users.

[0110] In some embodiments, the data transmission method further includes:

[0111] Obtaining a second encrypted tuple corresponding to each false input data, wherein the second encrypted tuple is obtained by inputting the false input data into a corresponding shuffle encryption module for encryption;

[0112] According to the second correspondence between the positions of the encrypted tuples and the output data, each first encrypted tuple is filled into the third position of the output data, and each second encrypted tuple is filled into the fourth position of the output data, to obtain the fully filled target output data, wherein the sum of the number of the third position and the number of the fourth position is the output data amount;

[0113] Sending the first encrypted tuple to the third node includes:

[0114] The target output data is sent to the third node.

[0115] Specifically, each false input data is input into the corresponding shuffle encryption module and encrypted to obtain the corresponding encrypted tuple, which can be called the second encrypted tuple, and then according to the corresponding relationship between the encrypted tuple and the position of the output data, which can be called the second corresponding relationship, the first encrypted tuple after each shard file is encrypted can be filled into the third position of the output data, and the second encrypted tuple after each false input object is encrypted can be filled into the fourth position of the output data to obtain the output data after all filling, which can be called the target output data, wherein the sum of the number of the third position and the number of the fourth position is the output data amount, which can also be understood as the sum of the number of the first encrypted tuples at the third position and the number of the second encrypted tuples at the fourth position is the output data amount. The first node sending the first encrypted tuple to the third node can include: the first node can send the target output data to the third node, and the target output data consists of the first encrypted tuple and the second encrypted tuple. In an embodiment of the present application, by fixing the amount of output data, that is, the amount of data output to the shuffle encryption module is greater than the number of shard files input to the shuffle encryption module, the obfuscation of the amount and content of the output data is achieved, the implicit channel information between nodes can be obfuscated, and user privacy is protected.

[0116] In one embodiment, a counting phase is added to the mapreduce process, which mainly includes a mapping phase, a counting phase, and a reducing phase. The overall architecture is as follows: Figure 2 shown.

[0117] like Figure 2 As shown, 1) in the Mapping phase, the mapper node can obtain M shard files obtained by splitting the target file based on the user, for example, block 0, block 1, block 2, block 3, block 4, block 5, ..., block M. Then the mapper node can call the mapping function map calculation task to group the shard files of the same type into the same group, and obtain N group files. For another example, the M shard files obtained by splitting the target file can be evenly distributed to each map calculation task in the same proportion. In each map calculation task, the user data can exist in the task in the form of key-value pairs, and then be processed according to the following steps:

[0118] 1.1) When the map task receives the encrypted shard file, it can first decrypt it and pass it as a parameter to the map function. Then the map function can perform logical processing on the tuple according to the specific distributed computing task to find the type attribute of each shard file;

[0119] 1.2) Merge the shard files with the same category attributes into an aggregate tuple set (∫m ), obtain N group files;

[0120] 1.3) Aggregate the tuple set (∫ m ) is stored in the set K m middle;

[0121] 1.4) For the set K m Each shard file in the ciphertext is encrypted symmetrically for privacy protection, and the encrypted set [K m ] as the input of the Counting stage.

[0122] 2) In the counting phase, the counter node can count the number of shard files in each group file. By fixing the number of node input / output tuples, the hidden channel information between nodes can be obfuscated to protect the data privacy of users in distributed computing tasks, thereby protecting the data and program security of hidden channels in the MapReduce architecture.

[0123] 2.1) Create a shuffle encryption module, each group file corresponds to a shuffle encryption module. For example, Figure 3 As shown, the shuffle encryption module can be a Bloom filter variant structure, which can create n Bloom filters (P i ,m i ,s,λ,r,1 / 2), where the initialization parameter P i is the Bloom filter misjudgment rate, m i is the fragment size of the Bloom filter, r (less than 1) is the reduction factor, s is the expansion factor, and λ is the upper limit of the number of filters. Figure 3 As shown, the created n shuffle encryption modules may include Bloom filter_1, Bloom filter_2, ..., Bloom filter_n.

[0124] like Figure 4 As shown, the specific process of creating a shuffle encryption module is as follows:

[0125] 2.11) After the program starts, the specific parameters of the Bloom filter are initialized, such as the number of Bloom filters, the element data in the filter, and the calculation error rate.

[0126] 2.12) Determine whether the number N of Bloom filters is greater than the number threshold λ.

[0127] When the number of filters N> the number threshold λ, repeat the parameter initialization and initialize the parameters according to the following formula to create a new Bloom filter:

[0128] p i =p i-1 ·r

[0129] m i =m i-1 ·s

[0130] When the number of Bloom filters N is less than the number threshold λ, it means that the number of filters created can support the input of N group files respectively, and then judge whether the number of elements in the Bloom filter reaches the input data threshold. If the input data threshold is reached, the number of Bloom filter input / output data is increased; if the threshold is not reached, the group files are

[0131] [K m ]={x1,x2,…,x m The element xq (1<=q<=m) in} is inserted into the corresponding Bloom filter.

[0132] 2.13) If the number of elements in the Bloom filter does not reach the input data threshold, perform element matching. Calculate the target element x q The bit hash value H q , and generate an index value, retrieve the distribution of the bit corresponding to the index in the Bloom filter, and convert H q Match with the Bloom filter. Determine whether all bits in the Bloom filter are 1. If all bits are 1, it means that the element already exists. If all bits are not 1, continue matching until the match is completed. If no match is found, insert the element into the Bloom filter.

[0133] 2.14) Element insertion: When the filling rate of the Bloom filter reaches 1 / 2, a new Bloom filter is added. When the filling rate of the shards of the Bloom filter does not reach 1 / 2, the grouped file is inserted into the Bloom filter.

[0134] 2.2) The constructed Bloom filter can calculate the number of key-value pairs Kd in the map task, and then encrypt the value Kd and transmit it to each map task. For each map task in the Mapping phase, when receiving the number of encrypted key-value pair categories [Kd], it will decrypt it and generate K pseudo-tuples, each of which contains a key-value pair (kf, vf).

[0135] 2.3) The shard files and fake tuples are filled into the corresponding positions, and the synthetic target input data is input into the Bloom filter for encryption to obtain the encrypted tuple t<key,value> , and distributed to each reduce task to perform reduction logic processing.

[0136] 3) Reducing stage.

[0137] 1) First, decrypt the received encrypted tuple<key,value> ;

[0138] 2) Tuple authentication. If the tuple key value is a false tuple key value or the tuple should not be processed at this node, then remove the tuple.

[0139] 3) For the tuples that still remain, perform reduction processing.

[0140] 4) Each reduce task will generate an aggregated tuple set Tr, where the key value of each tuple is unique and independent. If the number of elements in the aggregated tuple set Tr is less than the number of categories of different attribute key-value pairs in all map tasks (|Tr| < Kd), then the reduce task r will generate Fr false tuples, where Fr = Kd - |Tr|, and similarly each false tuple contains a key-value pair (kf, vf).

[0141] 5) The last |Tr| aggregated tuples and Fr false tuples will be encrypted and saved to the distributed file system.

[0142] In the embodiment of the present application, a Counter node is newly added to the MapReduce remote service architecture. The Mapper node transmits the N shuffled groups to the Counter node, making the data transmitted between the Counter node and the Mapper node not easily interpretable. Then, in the Counter node, since the number of input objects and output objects of the shuffle encryption module is greater than the number of shard files in the corresponding group, the purpose of obfuscating the information of the hidden channel between nodes can be achieved. Then, the Counter node can transmit the first encrypted tuple and the second encrypted tuple after encryption to the Reducer node. The Reducer node removes the false tuples (i.e., the second encrypted tuples) and then performs reduction, thus completing the processing and transmission of user data information in each node, making it impossible for attackers to analyze through the traffic data transmitted between each node, thereby protecting user privacy.

[0143] As Figure 5 shown, the embodiment of the present application also provides a data transmission device, which is applied to the first node. The device 500 may include a receiving module 510, a creating module 520, a constructing module 530, an encrypting module 540, and a sending module 550:

[0144] The receiving module 510 is configured to receive N grouped files sent by the second node, where each grouped file includes shard files of the same type.

[0145] The creating module 520 is configured to create N shuffle encryption modules according to the number of shard files in the grouped files, where each grouped file corresponds to one shuffle encryption module, and the input data volume and output data volume of the shuffle encryption module are both greater than the number of shard files input to the shuffle encryption module.

[0146] A construction module 530, configured to construct target input data corresponding to each group file based on each group file and the false input data;

[0147] The encryption module 540 is used to input each target input data into the corresponding shuffle encryption module for encryption, so as to obtain a first encryption tuple corresponding to each fragment file;

[0148] The sending module 550 is used to send the first encrypted tuple to the third node.

[0149] The data transmission device provided by the embodiment of the present application receives N group files sent by the second node through the first node, wherein each group file includes slice files of the same type, and then creates N shuffle encryption modules according to the number of slice files in the group file, wherein each group file corresponds to a shuffle encryption module, and the input data volume and output data volume of the shuffle encryption module are both greater than the number of slice files input to the shuffle encryption module. Then, based on each group file and false input data, the target input data corresponding to each group file can be constructed respectively, and then each target input data is input into the corresponding shuffle encryption module for encryption, so as to obtain the first encrypted tuple corresponding to each slice file, and then the first encrypted tuple can be sent to the third node. The embodiment of the present application adds a new node in the MapReduce remote service architecture, and transmits the shuffled N groups to the second node through the first node, so that the data transmitted between the first node and the second node is not easy to be interpreted. Then, in the second node, since the number of input objects and the number of output objects of the shuffled encryption module are both greater than the number of shard files in the corresponding group, the purpose of obfuscating the hidden channel information between nodes can be achieved. Then, the second node can transmit the encrypted first encrypted tuple to the third node, thereby completing the processing and transmission of user data information in each node, making it impossible for attackers to analyze the traffic data transmitted between each node, thereby protecting user privacy.

[0150] In some embodiments, the construction module is used to construct target input data corresponding to each group file based on each group file and the fake input data, including:

[0151] A filling unit, used to fill the slice files in the same group into the first position of the input data according to the first corresponding relationship between the positions of the slice files and the input data;

[0152] The filling unit is further used to fill the false input data at the second position of the input data to obtain the fully filled target input data, wherein the sum of the quantity at the first position and the quantity at the second position is the input data quantity.

[0153] In some embodiments, the device further includes an acquisition module and a filling module:

[0154] An acquisition module, used for acquiring a second encrypted tuple corresponding to each false input data, wherein the second encrypted tuple is obtained by inputting the false input data into a corresponding shuffle encryption module for encryption;

[0155] a filling module, configured to fill each first encrypted tuple into a third position of the output data and fill each second encrypted tuple into a fourth position of the output data according to a second corresponding relationship between the positions of the encrypted tuple and the output data, so as to obtain the target output data after all the filling, wherein the sum of the number of the third position and the number of the fourth position is the output data amount;

[0156] A sending module, used to send the first encrypted tuple to a third node, comprising:

[0157] The sending module is used to send the target output data to the third node.

[0158] like Figure 6 As shown, the embodiment of the present application further provides a data transmission device, which is applied to a second node. The device 600 may include an acquisition module 610, an induction module 620, and a sending module 630:

[0159] An acquisition module 610 is used to acquire M fragment files, where the fragment files are obtained by splitting the target file;

[0160] The summarizing module 620 is used to summarize the fragment files of the same type into the same group to obtain N group files;

[0161] The sending module 630 is used to send N group files to the first node, so that the first node can create N shuffle encryption modules according to the number of shard files in the group files, wherein each group file corresponds to a shuffle encryption module; based on each group file and false input data, the target input data corresponding to each group file is respectively constructed; each target input data is input into the corresponding shuffle encryption module for encryption to obtain a first encrypted tuple corresponding to each shard file; and the first encrypted tuple is sent to the third node.

[0162] In some embodiments, the M slice files are encrypted files; the summarization module is used to summarize the slice files of the same type into the same group to obtain N group files, including:

[0163] A parsing unit, used to parse each fragment file respectively to obtain M fragment files after parsing;

[0164] An acquisition unit, used to respectively acquire type information of the M fragment files after parsing;

[0165] The summarizing unit is used to summarize the fragment files with the same type information into the same group to obtain N group files.

[0166] In some embodiments, the apparatus may further include:

[0167] An encryption module is used to perform semantic encryption on the parsed M fragment files respectively to obtain M semantically encrypted fragment files;

[0168] The summarization module is used to summarize the fragment files with the same type information into the same group to obtain N groups, including:

[0169] The summarization module is used to summarize the semantically encrypted fragment files with the same type information into the same group to obtain N group files.

[0170] Each module in the data transmission device provided in the embodiment of the present application can realize Figures 1 to 4 The functions of each step of the provided data transmission method and the ability to achieve its corresponding technical effects are described briefly and will not be repeated here.

[0171] Figure 7 A schematic diagram of the hardware structure of a data transmission device provided in an embodiment of the present application is shown.

[0172] The data transmission device may include a processor 701 and a memory 702 storing computer program instructions.

[0173] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0174] The memory 702 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 702 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 702 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 702 is a non-volatile solid-state memory.

[0175] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present application.

[0176] The processor 701 implements any one of the data transmission methods in the above embodiments by reading and executing computer program instructions stored in the memory 702 .

[0177] In one example, the data transmission device may further include a communication interface 703 and a bus 704. Figure 7 As shown, the processor 701, the memory 702, and the communication interface 703 are connected via a bus 704 and communicate with each other.

[0178] The communication interface 703 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0179] The bus 704 includes hardware, software or both, coupling the components of the data transmission device to each other. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Linear Predictive Coding (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (Peripheral Component Interconnect-X, PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VESA Local Bus, VLB) bus or other suitable buses or a combination of two or more of these. Where appropriate, the bus 704 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0180] The device can execute the data transmission method in the embodiment of the present application based on each unit / component in the data transmission device, thereby realizing the combination Figures 1 to 4 Describes the method of data transfer.

[0181] In addition, in combination with the data transmission method in the above embodiment, the embodiment of the present application can provide a computer storage medium to implement. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the data transmission methods in the above embodiment is implemented.

[0182] The present application also provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes each process of implementing any one of the above-mentioned data transmission method embodiments.

[0183] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0184] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (Read-Only Memory, ROM), flash memory, erasable read-only memory (Erasable ReadOnly Memory, EROM), floppy disks, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0185] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0186] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (system) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square boxes of the flow chart and / or the block diagram.Such a processor can be but is not limited to a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.

[0187] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for data transmission, characterized in that: Applied to the first node, including: Receiving N grouped files sent by the second node, wherein each of the grouped files includes slice files of the same type; According to the number of the fragment files in the group file, N shuffle-encryption modules are created, wherein each group file corresponds to one shuffle-encryption module, and the input data volume and output data volume of the shuffle-encryption module are both greater than the number of the fragment files input into the shuffle-encryption module; Based on each of the grouping files and the false input data, respectively construct the target input data corresponding to each of the grouping files; Input each of the target input data into the corresponding shuffle encryption module for encryption, to obtain a first encryption tuple corresponding to each of the slice files; The first encrypted tuple is sent to a third node.

2. The method according to claim 1, characterized in that The step of constructing target input data corresponding to each of the grouping files based on each of the grouping files and the false input data comprises: According to a first correspondence between the positions of the slice files and the input data, the slice files in the same group are filled into the first position of the input data; Fill the second position of the input data with dummy input data to obtain fully filled target input data, wherein the sum of the number of the first position and the number of the second position is the input data amount.

3. The method according to claim 2, characterized in that The method further comprises: Obtaining a second encrypted tuple corresponding to each of the false input data, wherein the second encrypted tuple is obtained by inputting the false input data into the corresponding shuffle encryption module for encryption; According to the second correspondence between the positions of the encrypted tuples and the output data, each of the first encrypted tuples is filled into the third position of the output data, and each of the second encrypted tuples is filled into the fourth position of the output data, to obtain the fully filled target output data, wherein the sum of the number of the third position and the number of the fourth position is the output data amount; Sending the first encrypted tuple to a third node comprises: The target output data is sent to a third node.

4. A method for data transmission, characterized in that: Applied to the second node, including: Obtain M fragment files, where the fragment files are obtained by splitting the target file; Grouping the same type of fragment files into the same group to obtain N group files; The N group files are sent to the first node, so that the first node can create N shuffle encryption modules according to the number of the slice files in the group files, wherein each of the group files corresponds to one shuffle encryption module; based on each of the group files and the false input data, the target input data corresponding to each of the group files is respectively constructed; each of the target input data is input into the corresponding shuffle encryption module for encryption, so as to obtain a first encrypted tuple corresponding to each of the slice files; and the first encrypted tuple is sent to the third node.

5. The method according to claim 4, characterized in that The M slice files are encrypted files; the slice files of the same type are grouped into the same group to obtain N group files, including: Parse each of the slice files separately to obtain M slice files after parsing; Obtaining type information of the M fragment files after parsing respectively; The fragment files with the same type information are grouped into the same group to obtain N group files.

6. The method according to claim 5, characterized in that The method further comprises: Semantically encrypt the M fragment files after the analysis respectively to obtain M fragment files after the semantic encryption; The segment files with the same type information are grouped into the same group to obtain N groups, including: The semantically encrypted segment files with the same type information are grouped into the same group to obtain N group files.

7. A data transmission device, characterized in that: Applied to the first node, including: A receiving module, configured to receive N group files sent by the second node, wherein each of the group files includes slice files of the same type; A creation module, used for creating N shuffle-encryption modules according to the number of the fragment files in the grouping file, wherein each of the grouping files corresponds to one shuffle-encryption module, and the input data volume and output data volume of the shuffle-encryption module are both greater than the number of the fragment files input into the shuffle-encryption module; A construction module, used for constructing target input data corresponding to each of the grouping files based on each of the grouping files and the false input data; An encryption module, used for inputting each of the target input data into the corresponding shuffle encryption module for encryption, to obtain a first encryption tuple corresponding to each of the fragment files; A sending module is used to send the first encrypted tuple to a third node.

8. A data transmission device, characterized in that: Applied to the second node, including: An acquisition module is used to acquire M fragment files, where the fragment files are obtained by splitting the target file; An induction module, used for grouping the same type of the fragment files into the same group to obtain N group files; A sending module is used to send the N group files to the first node, so that the first node can create N shuffle encryption modules according to the number of the slice files in the group files, wherein each of the group files corresponds to one shuffle encryption module; based on each of the group files and false input data, respectively construct the target input data corresponding to each of the group files; input each of the target input data into the corresponding shuffle encryption module for encryption, and obtain a first encrypted tuple corresponding to each of the slice files; and send the first encrypted tuple to the third node.

9. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the method for data transmission as described in any one of claims 1 to 3, or implements the method for data transmission as described in any one of claims 4 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for data transmission according to any one of claims 1 to 3 is implemented, or the method for data transmission according to any one of claims 4 to 6 is implemented.