Data transmission method, device, computer readable storage medium and product
Patent Information
- Application Number
- CN202111284076.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-01
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2041-11-01
AI Technical Summary
[0005]本公开实施例提供一种数据传输方法、设备、计算机可读存储介质及产品,用以解决联邦学习进行数据交互时执行效率较低的技术问题
[0028]第七方面,本公开实施例提供一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现如第一方面或第二方面所述的数据传输方法。
Smart Images

Figure CN116073980B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of big data encrypted computing, and in particular to a data transmission method, device, computer-readable storage medium, and product. Background Technology
[0002] With the advent of the big data era, data has gradually become the fifth major factor of production after human resources, land, capital, and technology, playing an increasingly important role in the socio-economic landscape. Breaking down data silos and enabling the free and secure flow of data across companies, regions, and countries to fully realize its value has become an urgent need in the big data era. In the context of free communication of data among multiple parties, how to achieve the flow of data value without data leakage has become a pressing issue that needs to be addressed.
[0003] In existing technologies, federated learning is generally used to implement multi-party data transmission operations. Specifically, federated learning can achieve secure multi-party data modeling through data interaction combined with semi-homomorphic encryption technology.
[0004] In developing this disclosure, the inventors discovered at least the following problems in the prior art: Federated learning requires continuous data interaction during computation, and computational efficiency is constrained by bandwidth and the computational efficiency of other participants. When multiple different participants engage in extensive interactions, the public network bandwidth between them is generally small, which greatly restricts the execution efficiency of the computation. Summary of the Invention
[0005] This disclosure provides a data transmission method, apparatus, computer-readable storage medium, and product to address the technical problem of low execution efficiency during data interaction in federated learning.
[0006] In a first aspect, embodiments of this disclosure provide a data transmission method, including:
[0007] The system acquires model building data sent by the data requesting device and at least two homomorphic encrypted data sent by at least two data providing devices, wherein the homomorphic encrypted data is obtained by the data providing device encrypting the data to be transmitted using a public key preset by the data requesting device.
[0008] Based on the model, an encrypted data processing model is established.
[0009] The homomorphic encrypted data and the encrypted data processing model are sent to a third-party computing platform, and the model training results sent by the third-party computing platform are obtained. The model training results are obtained by the third-party computing platform after training the encrypted data using the homomorphic encrypted data.
[0010] The model training results are sent to the data-requiring device.
[0011] Secondly, embodiments of this disclosure provide a data transmission method, including:
[0012] The homomorphic encrypted data and the encrypted data processing model sent by the third-party encryption platform are obtained. The homomorphic encrypted data is obtained by the data providing device encrypting the data to be transmitted using the public key preset by the data requesting device. The encrypted data processing model is established by the third-party encryption platform using the model establishment data sent by the data requesting device.
[0013] The homomorphically encrypted data is used to train the encrypted data processing model to obtain the model training result.
[0014] The model training results are sent to the third-party encryption platform, so that the third-party encryption platform can send the model training results to the data-requiring device.
[0015] Thirdly, embodiments of this disclosure provide a data transmission apparatus, including:
[0016] The acquisition module is used to acquire model building data sent by the data requesting device, and to acquire at least two homomorphic encrypted data sent by at least two data providing devices, wherein the homomorphic encrypted data is obtained by the data providing device encrypting the data to be transmitted using a public key preset by the data requesting device;
[0017] A module is established to build an encrypted data processing model based on the model's data.
[0018] The transceiver module is used to send the homomorphic encrypted data and the encrypted data processing model to a third-party computing platform, and to obtain the model training results sent by the third-party computing platform. The model training results are obtained by the third-party computing platform after training the encrypted data processing model using the homomorphic encrypted data.
[0019] The transceiver module is also used to send the model training results to the data-requiring device.
[0020] Fourthly, embodiments of this disclosure provide a data transmission apparatus, including:
[0021] The data acquisition module is used to acquire homomorphic encrypted data and an encrypted data processing model sent by a third-party encryption platform. The homomorphic encrypted data is obtained by the data providing device encrypting the data to be transmitted using a public key preset by the data requesting device. The encrypted data processing model is established by the third-party encryption platform using model establishment data sent by the data requesting device.
[0022] The training module is used to perform model training operations on the encrypted data processing model using the homomorphic encrypted data to obtain model training results;
[0023] The sending module is used to send the model training results to the third-party encryption platform, so that the third-party encryption platform can send the model training results to the data request device.
[0024] Fifthly, embodiments of this disclosure provide an electronic device, including: a memory and a processor;
[0025] Memory; memory for storing executable instructions of the processor;
[0026] The processor is used to invoke program instructions in the memory to execute the data transmission method as described in the first or second aspect.
[0027] In a sixth aspect, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the data transmission method as described in the first or second aspect.
[0028] In a seventh aspect, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the data transmission method as described in the first or second aspect.
[0029] The data transmission method, apparatus, computer-readable storage medium, and product provided in this disclosure acquire model building data sent by a data requesting device, and at least two homomorphically encrypted data sets sent by at least two data providing devices, which are encrypted using a public key pre-negotiated between the data requesting device and the at least two data providing devices. Therefore, an encrypted data processing model can be built based on the model building data, and the homomorphically encrypted data and the encrypted data processing model can be sent to a third-party computing platform. The model training results sent by the third-party computing platform can then be acquired and fed back to the data requesting device. Since the homomorphically encrypted data provided by each data providing device is encrypted using a negotiated public key, ciphertext-level data computation operations can be achieved. Furthermore, by acquiring data sent by both the data requesting device and the data providing devices and forwarding the data to a third-party computing platform for data processing, data value can be realized without data leakage with only one data transmission, eliminating the need for multiple data interactions and improving data processing efficiency. Attached Figure Description
[0030] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0031] Figure 1 This is a schematic diagram of the system architecture upon which this disclosure is based;
[0032] Figure 2 This is a flowchart illustrating the data transmission method provided in Embodiment 1 of this disclosure;
[0033] Figure 3 This is a flowchart illustrating the data transmission method provided in Embodiment 2 of this disclosure;
[0034] Figure 4 This is a flowchart illustrating the data transmission method provided in Embodiment 3 of this disclosure;
[0035] Figure 5 This is a schematic diagram of data summation calculation provided in the embodiments of this disclosure;
[0036] Figure 6 This is a flowchart illustrating the data transmission method provided in Embodiment 4 of this disclosure;
[0037] Figure 7 This is yet another schematic diagram of data summation calculation provided in an embodiment of the present disclosure;
[0038] Figure 8 This is a schematic diagram of the data transmission device provided in Embodiment 5 of this disclosure;
[0039] Figure 9 This is a schematic diagram of the data transmission device provided in Embodiment Six of this disclosure;
[0040] Figure 10 This is a schematic diagram of the structure of an electronic device provided in Embodiment 7 of this disclosure.
[0041] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0042] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0043] First, the terms used in the embodiments of this disclosure will be explained:
[0044] Fully homomorphic encryption: an encryption technology based on ideal lattice technology that can resist quantum attacks. The result of operations on the ciphertext is equivalent to addition and multiplication operations on the plaintext.
[0045] To address the aforementioned technical problem of low execution efficiency during data interaction in federated learning, this disclosure provides a data transmission method, apparatus, computer-readable storage medium, and product.
[0046] It should be noted that the data transmission methods, devices, computer-readable storage media, and products disclosed herein can be used in various scenarios where multiple parties conduct encrypted data transmission.
[0047] To enable the flow of data value without data leakage, various technologies have been developed, including federated learning, secure multi-party computation, trusted execution environments (TEAs), and homomorphic encryption. Federated learning achieves secure multi-party data modeling through data interaction combined with semi-homomorphic encryption. Secure multi-party computation enables joint computation through multi-party data interaction without exposing data other than the results. TEAs achieve secure computation by constructing an encrypted computation "enclave" within the computer, inaccessible to both users and the system; its security relies on the hardware technology of the CPU manufacturer. Homomorphic encryption ensures that the computation result on the ciphertext is identical to the computation result on the plaintext, thus achieving data usability without visibility. However, federated learning and secure multi-party computation require continuous data interaction during the computation process. Computational efficiency is constrained by bandwidth and the computational efficiency of other participants, exhibiting significant bottlenecks. This is especially true when multiple different participants engage in extensive interactions, as the public network bandwidth between parties is generally limited, severely restricting computational efficiency. Trusted Execution Environment (TEE) technology is a hardware-based secure computing technology. On the one hand, its security heavily relies on the CPU manufacturer's hardware security technology and cannot achieve complete security. For example, Intel's SGX faces security issues such as side-channel attacks, cache attacks, and AsyncShock attacks. On the other hand, using TEE technology requires vendors to purchase a large amount of additional hardware, resulting in high costs. Current homomorphic encryption technologies, especially fully homomorphic encryption based on ideal lattices, offer very high security, but compared to other technologies, they still suffer from significant computational performance limitations.
[0048] In solving the aforementioned technical problems, the inventors discovered through research that distributed technology can be used to improve the operational efficiency of fully homomorphic encrypted computation. Furthermore, in the process of multi-party participation, apart from the initial upload of encrypted data from each party, the computation process does not require continuous large-scale data interaction among the parties. The computation process is not limited by network bandwidth and can fully utilize the existing computing resources of various manufacturers, resulting in lower costs.
[0049] The technical solutions of this disclosure and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this disclosure will now be described with reference to the accompanying drawings.
[0050] Figure 1 This is a schematic diagram of the system architecture upon which this disclosure is based, such as Figure 1 As shown, the system architecture upon which this disclosure is based includes at least: a data requesting device 1, a data providing device 2, a third-party encryption platform 3, and a distributed computing cluster 4. Both the third-party encryption platform 3 and the distributed computing cluster 4 are equipped with data transmission devices, which can be written in languages such as C / C++, Java, Shell, or Python. The third-party encryption platform 3 is communicatively connected to the data requesting device 1, the data providing device 2, and the distributed computing cluster 4.
[0051] Specifically, based on the above system architecture diagram, the third-party encryption platform 3 can obtain model building data sent by the data requesting device 1 and at least two homomorphic encrypted data sets sent by the data providing device 2. The data providing device 2 can encrypt the data to be transmitted using a public key preset by the data requesting device to obtain homomorphic encrypted data. The third-party encryption platform 3 can build an encrypted data processing model based on the obtained model building data. It can then send the homomorphic encrypted data and the encrypted data processing model to the distributed computing cluster 4 and obtain the model training results sent by the distributed computing cluster 4. The model training results are then sent to the data requesting device 1.
[0052] Figure 2 This is a flowchart illustrating the data transmission method provided in Embodiment 1 of this disclosure, as shown below. Figure 2 As shown, the method includes:
[0053] Step 201: Obtain model building data sent by the data requesting device, and obtain at least two homomorphic encrypted data sent by at least two data providing devices, wherein the homomorphic encrypted data is obtained by the data providing device encrypting the data to be transmitted using a public key preset by the data requesting device.
[0054] The execution entity in this embodiment is a data transmission device, which can be coupled to a third-party encryption platform. The third-party encryption platform can communicate with the data requesting device and the data providing device, respectively.
[0055] In this embodiment, the data requesting device and other data providing devices can jointly negotiate and determine the computation parameters. These parameters include data dimensions and modeling parameters for each party. Then, each party constructs plaintext data with its own unique structure based on the negotiated parameters. The data requesting device generates an encryption key and sends the public key to at least two data providing devices for data encryption. After receiving the public key, each party encrypts the data to obtain ciphertext and uploads it to a third-party encryption platform. Because all parties use the same public key to generate the ciphertext data, the ciphertext data generated by each party can undergo homomorphic computation and can be used as homomorphically encrypted data.
[0056] The data-demanding device sends the model-building data obtained through multi-party negotiation and communication to a third-party encryption platform. This model-building data is used to build an encrypted data processing model.
[0057] Accordingly, the data transmission device coupled in the third-party encryption platform can acquire model building data sent by the data requesting device, as well as at least two homomorphic encrypted data sent by at least two data providing devices.
[0058] Step 202: Establish an encrypted data processing model based on the model.
[0059] In this embodiment, after acquiring the model building data, the data transmission device can build an encrypted data processing model based on the model building data. This encrypted data processing model can use homomorphically encrypted data provided by a data providing device for model training and data processing.
[0060] Step 203: Send the homomorphic encrypted data and the encrypted data processing model to a third-party computing platform, and obtain the model training results sent by the third-party computing platform. The model training results are obtained by the third-party computing platform after training the encrypted data processing model using the homomorphic encrypted data.
[0061] In this embodiment, to further improve the efficiency of model training and data processing, the data transmission device coupled to the third-party encryption platform, after establishing the encrypted data processing model, can send the encrypted data processing model and homomorphically encrypted data to the third-party computing platform and obtain the model training results sent by the third-party computing platform. The third-party computing platform can be a distributed computing cluster.
[0062] After obtaining the encrypted data processing model and homomorphically encrypted data, the third-party computing platform can use the homomorphically encrypted data to iteratively train the encrypted data processing model until it converges, obtaining the model training result. This training result is then sent to the data transmission device.
[0063] Correspondingly, the data transmission device is able to acquire model training results sent by a third-party computing platform.
[0064] Step 204: Send the model training results to the data request device.
[0065] In this embodiment, after the data transmission device obtains the model training results sent by the third-party computing platform, it can feed back the model training results to the data requesting device.
[0066] The data transmission method provided in this embodiment acquires model building data sent by a data requesting device and at least two homomorphically encrypted data sets sent by at least two data providing devices, which are encrypted using a public key pre-negotiated between the data requesting device and the at least two data providing devices. Therefore, an encrypted data processing model can be built based on the model building data, and the homomorphically encrypted data and the encrypted data processing model can be sent to a third-party computing platform. The model training results sent by the third-party computing platform can then be acquired and fed back to the data requesting device. Since the homomorphically encrypted data provided by each data providing device is encrypted using a negotiated public key, ciphertext-level homomorphic encrypted data computation operations can be achieved. Furthermore, by acquiring data sent by both the data requesting device and the data providing devices and forwarding the data to the third-party computing platform for data processing, data value can be realized without data leakage with only one data transmission, eliminating the need for multiple data interactions and improving data processing efficiency.
[0067] Furthermore, based on Embodiment 1, step 203 specifically includes:
[0068] Homomorphic encrypted data and the encrypted data processing model are sent to each computing node in the distributed computing cluster, so that each computing node uses the homomorphic encrypted data to perform model training operations on the encrypted data processing model and obtain model training results.
[0069] In this embodiment, to further improve the efficiency of model training and data processing, a distributed computing cluster can be used to train the encrypted data processing model. Specifically, homomorphic encrypted data and the encrypted data processing model can be sent to each computing node in the distributed computing cluster. After obtaining the encrypted data processing model and the homomorphic encrypted data, each computing node can use the homomorphic encrypted data to iteratively train the encrypted data processing model until the model converges, obtaining the model training result. The model training result is then sent to the data transmission device.
[0070] By utilizing distributed computing clusters to train encrypted data processing models, the operational efficiency of fully homomorphic encrypted computing can be effectively improved.
[0071] Furthermore, based on Embodiment 1, after step 201, the method further includes:
[0072] A data fusion operation is performed on at least two homomorphic encrypted data sent by the at least two data providing devices to obtain the target encrypted data;
[0073] Step 203 includes:
[0074] The target encrypted data and the encrypted data processing model are sent to a third-party computing platform.
[0075] In this embodiment, after the data transmission device acquires at least two homomorphic encrypted data sent by at least two data providing devices, in order to improve resource utilization and data computation efficiency, it also needs to perform a data fusion operation on the at least two homomorphic encrypted data.
[0076] Data fusion operations can be divided into two methods: batch feature fusion and record feature fusion. Record feature fusion processes multiple data records in a single batch, while batch feature fusion processes the same feature columns in a single batch.
[0077] Therefore, when using batch feature fusion, data fusion operations can be performed on at least two homomorphically encrypted data sent by at least two data providing devices to obtain the target encrypted data. A batch encryption process encrypts a batch of data for a certain feature column, with a maximum encrypted data size equal to the number of slots. Then, the feature columns of the homomorphically encrypted data from multiple parties are concatenated to obtain the target encrypted data from multiple parties. Correspondingly, the target encrypted data after data fusion, along with the encrypted data processing model, can be sent to a third-party computing platform.
[0078] Furthermore, based on Embodiment 1, after step 201, the method further includes:
[0079] Identify data characteristics in at least two homomorphic encrypted data streams sent by at least two data-providing devices;
[0080] The at least two homomorphic encrypted data are fused according to the data characteristics to obtain the target encrypted data;
[0081] Step 203 includes:
[0082] The target encrypted data and the encrypted data processing model are sent to a third-party computing platform.
[0083] In this embodiment, when using record feature fusion, data fusion can be performed according to the data features in the homomorphic encrypted data. Specifically, the data features in at least two homomorphic encrypted data sent by at least two data providing devices can be determined. Data fusion is then performed on the at least two homomorphic encrypted data according to the data features to obtain the target encrypted data. Accordingly, the fused target encrypted data and the encrypted data processing model can be sent to a third-party computing platform.
[0084] Each data provider negotiates and determines its own data provider index [0,1,…,p]. Before encrypting the same data record, each data provider needs to determine its starting index and feature space based on its own index number and the number of features it possesses. For example, for data provider 0, its starting index is 0, and it possesses m features. 0, This means it occupies space at positions 0-(m0-1). Data provider 1 has a starting index of m0 and possesses m1 features, thus occupying space at positions m0-(m0+m1-1). To achieve feature dimension fusion during the calculation process and to obtain correct fusion results, ensuring that the aggregation calculations between data records do not interfere with each other, a ciphertext 0 vector of at least m features can be appended after the features in a complete data record. Furthermore, the optimal row length for a single data record is greater than 2m and less than 2m. k This numerical value ensures the correctness and universality of calculations during global data summation. It can generate an encrypted ciphertext containing multiple data records from multiple individual data entries.
[0085] By performing data fusion operations on multiple homomorphic ciphertext data, resource utilization and data computation efficiency can be improved.
[0086] Furthermore, based on Embodiment 1, the model building data includes model calculation parameters and a public key;
[0087] Step 202 specifically includes:
[0088] A model to be processed is established based on the parameters calculated by the model, and the model to be processed is capable of processing plaintext data.
[0089] The parameters of the model to be processed are encrypted using the public key to obtain the encrypted data processing model, wherein the encrypted data processing model is capable of processing ciphertext data.
[0090] In this embodiment, the model building data may specifically include model calculation parameters and a public key. After acquiring the model building data, the data transmission device can first build a model to be processed based on the model calculation parameters. This model to be processed can perform data processing on plaintext data and train the model based on plaintext data.
[0091] Since the data provided by the data providing device is homomorphic ciphertext data, in order to enable the model to be processed to have the ability to process ciphertext data, the public key in the model building data can be used to encrypt the parameters of the model to be processed, resulting in an encrypted data processing model. This encrypted data processing model can process homomorphic ciphertext data and train the model based on homomorphic ciphertext data.
[0092] The data transmission method provided in this embodiment encrypts the parameters of the model to be processed using the public key in the model establishment data after the model to be processed is established. This enables the encrypted data processing model to process homomorphic ciphertext data and train the model based on the homomorphic ciphertext data.
[0093] Figure 3 This is a flowchart illustrating the data transmission method provided in Embodiment 2 of this disclosure, as shown below. Figure 3 As shown, the method includes:
[0094] Step 301: Obtain homomorphic encrypted data and encrypted data processing model sent by a third-party encryption platform. The homomorphic encrypted data is obtained by the data providing device encrypting the data to be transmitted using the public key preset by the data requesting device. The encrypted data processing model is established by the third-party encryption platform using the model establishment data sent by the data requesting device.
[0095] Step 302: Use the homomorphic encrypted data to train the encrypted data processing model and obtain the model training results.
[0096] Step 303: Send the model training results to the third-party encryption platform so that the third-party encryption platform can send the model training results to the data request device.
[0097] The execution entity in this embodiment is a data transmission device, which can be coupled to a third-party computing platform. The third-party computing platform can be a computing node in a distributed computing cluster, and it can communicate with a third-party encryption platform.
[0098] In this embodiment, to further improve the efficiency of model training and data processing, a distributed computing cluster can be used to train the encrypted data processing model. Specifically, the data transmission device in the distributed computing cluster can acquire homomorphically encrypted data and the encrypted data processing model sent by a third-party encryption platform. The data requesting device and other data providing devices can jointly negotiate and determine the computation parameters, which include the data dimensions of each party and the modeling parameters. The data requesting device can pre-determine the public key. The homomorphically encrypted data is obtained by the data providing device encrypting the data to be transmitted using the public key. The encrypted data processing model is built by the third-party encryption platform using the model building data sent by the data requesting device.
[0099] After acquiring the encrypted data processing model and homomorphically encrypted data, the data transmission device can use the homomorphically encrypted data to iteratively train the encrypted data processing model until it converges, obtaining the model training result. The training result is then sent to the data transmission device.
[0100] The data transmission method provided in this embodiment can effectively improve the operating efficiency of fully homomorphic encrypted computing by using a distributed computing cluster to train the encrypted data processing model.
[0101] Furthermore, based on Embodiment 2, step 302 specifically includes:
[0102] The homomorphic encrypted data is input into the feature extraction layer in the encrypted data processing model to obtain the homomorphic ciphertext to be processed output by the feature extraction layer.
[0103] The model training result is obtained by summing the data within the homomorphic ciphertext to be processed.
[0104] In this embodiment, homomorphic ciphertext data is input into the feature extraction layer of the encrypted data processing model to obtain the homomorphic ciphertext to be processed output by the feature extraction layer. A data summation operation can be performed on the homomorphic ciphertext to be processed to obtain the model training result. Specifically, the homomorphic ciphertext data can be the fused target encrypted data. Since it is impossible to operate on individual elements within the batch-processed target encrypted data, a shift operation can be performed on the homomorphic ciphertext to be processed according to actual needs to achieve the summation operation.
[0105] Figure 4 This is a flowchart illustrating the data transmission method provided in Embodiment 3 of this disclosure, as shown below. Figure 4 As shown, the step of performing data summation calculation within the homomorphic ciphertext to be processed includes:
[0106] Step 401: Determine the interval identifier for which the summation operation needs to be performed.
[0107] Step 402: Perform a shift operation on the homomorphic ciphertext to be processed according to the interval identifier to obtain the ciphertext to be calculated.
[0108] Step 403: Perform a misaligned summation operation on the homomorphic ciphertext to be processed and the ciphertext to be calculated to obtain the model training result.
[0109] In this embodiment, interval ciphertext summation can be performed on the homomorphic ciphertext to be processed. Specifically, the interval identifier for the summation operation can be determined according to the actual needs of model training. Based on the interval identifier, a shift operation is performed on the homomorphic ciphertext to be processed to obtain the ciphertext to be calculated. A staggered summation operation is then performed on the homomorphic ciphertext to be processed and the ciphertext to be calculated to obtain the model training result.
[0110] Specifically, the homomorphic ciphertext data can be the fused target encrypted data. Since each ciphertext data (or the same feature data in a batch) in the target encrypted data retains a zero vector space of the same number of bits after it, when calculating the aggregation of internal data, the vectors can be added by misalignment to achieve the summation between different data within the ciphertext.
[0111] Figure 5 This is a schematic diagram of data summation calculation provided in the embodiments of this disclosure, such as... Figure 5 As shown, a right-hand shift operation can be performed on the homomorphic ciphertext 51 to obtain the shifted ciphertext 52 to be calculated. After m-1 right shifts with a step size of 1 and summing, the data d0-d will be obtained at the original position 0-(m-1). m-1 The sum of.
[0112] Furthermore, based on any of the above embodiments, after performing the misaligned summation operation on the homomorphic ciphertext to be processed and the ciphertext to be computed, the method further includes:
[0113] A mask vector is determined based on the interval identifier that needs to be summed, wherein the vector at the position corresponding to the interval identifier is 1, and the vector at the other positions is 0, and the mask vector has the same length as the homomorphic ciphertext to be processed after misaligned summation.
[0114] The model training result is obtained by multiplying the homomorphic ciphertext to be processed after the misalignment summation with the mask vector.
[0115] In this embodiment, during the summation calculation, additional calculation results are generated at the original zero vector. If these results need to be decrypted into plaintext, these unnecessary calculation results may lead to data leakage, making the calculation results insecure. Therefore, to ensure the security of data calculation, a mask vector can be set. The mask vector can be determined based on the interval identifiers for which the summation operation needs to be performed. In this mask vector, the vector at the position corresponding to the interval identifier is 1, and the vectors at other positions are 0. The mask vector has the same length as the homomorphic ciphertext to be processed after the misaligned summation. Multiplying the homomorphic ciphertext to be processed after the misaligned summation with the mask vector yields the model training result.
[0116] By multiplying the homomorphic ciphertext to be processed after the shifted summation with the mask vector, unnecessary data leakage caused by the shifted summation can be eliminated, thereby enhancing data security.
[0117] Figure 6 This is a flowchart illustrating the data transmission method provided in Embodiment 4 of this disclosure, as shown below. Figure 6 As shown, the step of performing data summation calculation within the homomorphic ciphertext to be processed includes:
[0118] Step 601: Move the homomorphic ciphertext to be processed in a preset direction by a preset step size to obtain the ciphertext to be calculated.
[0119] Step 602: Perform a misaligned summation operation on the homomorphic ciphertext to be processed and the ciphertext to be calculated to obtain a global calculation result, and determine the global calculation result as the model training result.
[0120] In this embodiment, global ciphertext summation can be performed on the homomorphic ciphertext to be processed. Specifically, the homomorphic ciphertext to be processed can be moved in a preset direction by a preset step size to obtain the ciphertext to be calculated. A staggered summation operation is performed on the homomorphic ciphertext to be processed and the ciphertext to be calculated to obtain the global calculation result, which is then determined as the model training result.
[0121] Figure 7 This is another schematic diagram of data summation calculation provided in an embodiment of the present disclosure, such as... Figure 7 As shown, the homomorphic ciphertext 71 to be processed can be shifted m-1 times to obtain the ciphertext 72 to be calculated. The homomorphic ciphertext to be processed and the ciphertext to be calculated are then subjected to a shift summation operation to obtain the global calculation result.
[0122] By shifting and then adding the homomorphic ciphertext in a staggered manner, it is possible to flexibly perform global or range-based ciphertext summation of the homomorphic ciphertext.
[0123] Figure 8This is a schematic diagram of the data transmission device provided in Embodiment 5 of this disclosure, as shown below. Figure 8 As shown, the data transmission device includes: an acquisition module 81, used to acquire model building data sent by a data requesting device, and to acquire at least two homomorphically encrypted data sent by at least two data providing devices, wherein the homomorphically encrypted data is obtained by the data providing devices encrypting the data to be transmitted using a public key preset by the data requesting device; an establishment module 82, used to establish an encrypted data processing model based on the model building data; a transceiver module 83, used to send the homomorphically encrypted data and the encrypted data processing model to a third-party computing platform, and to acquire the model training results sent by the third-party computing platform, wherein the model training results are obtained by the third-party computing platform training the encrypted data processing model using the homomorphically encrypted data; and a transceiver module 84, further used to send the model training results to the data requesting device.
[0124] Furthermore, based on Embodiment 5, the model building data includes model calculation parameters and a public key; the building module is used to: build a model to be processed according to the model calculation parameters, the model to be processed being able to process plaintext data; and use the public key to encrypt the parameters of the model to be processed to obtain the encrypted data processing model, wherein the encrypted data processing model is able to process ciphertext data.
[0125] Furthermore, based on Embodiment 5, the transceiver module is used to: send homomorphically encrypted data and the encrypted data processing model to each computing node in the distributed computing cluster, so that each computing node uses the homomorphically encrypted data to perform model training operations on the encrypted data processing model and obtain model training results.
[0126] Furthermore, based on Embodiment 5, the device further includes: a fusion module, used to perform a data fusion operation on at least two homomorphic encrypted data sent by the at least two data providing devices to obtain target encrypted data; the transceiver module is used to: send the target encrypted data and the encrypted data processing model to a third-party computing platform.
[0127] Furthermore, based on Embodiment 5, the apparatus further includes: a determining module, configured to determine data features in at least two homomorphic encrypted data sent by at least two data providing devices; a fusion module, configured to perform a data fusion operation on the at least two homomorphic encrypted data according to the data features to obtain target encrypted data; and a transceiver module configured to send the target encrypted data and the encrypted data processing model to a third-party computing platform.
[0128] Figure 9This is a schematic diagram of the data transmission device provided in Embodiment Six of this disclosure, as shown below. Figure 9 As shown, the data transmission device includes: a data acquisition module 91, used to acquire homomorphic encrypted data and an encrypted data processing model sent by a third-party encryption platform, wherein the homomorphic encrypted data is obtained by encrypting the data to be transmitted using a public key preset by the data requesting device, and the encrypted data processing model is established by the third-party encryption platform using model establishment data sent by the data requesting device; a training module 92, used to perform model training operations on the encrypted data processing model using the homomorphic encrypted data to obtain model training results; and a sending module 93, used to send the model training results to the third-party encryption platform, so that the third-party encryption platform sends the model training results to the data requesting device.
[0129] Furthermore, based on Embodiment Six, the training module is used to: input the homomorphic encrypted data into the feature extraction layer in the encrypted data processing model to obtain the homomorphic ciphertext to be processed output by the feature extraction layer; and perform data summation calculation on the homomorphic ciphertext to be processed to obtain the model training result.
[0130] Furthermore, based on any of the above embodiments, the training module is used to: determine the interval identifiers that need to be summed; perform a shift operation on the homomorphic ciphertext to be processed according to the interval identifiers to obtain the ciphertext to be calculated; and perform a staggered summation operation on the homomorphic ciphertext to be processed and the ciphertext to be calculated to obtain the model training result.
[0131] Furthermore, based on any of the above embodiments, the training module is used to: move the homomorphic ciphertext to be processed in a preset direction by a preset step size to obtain the ciphertext to be calculated; perform a staggered summation operation on the homomorphic ciphertext to be processed and the ciphertext to be calculated to obtain a global calculation result, and determine the global calculation result as the model training result.
[0132] Further, based on any of the above embodiments, the training module is used to: determine a mask vector according to the interval identifier that needs to be summed, wherein the mask vector has a 1 at the position corresponding to the interval identifier and a 0 at the other positions, and the mask vector has the same length as the homomorphic ciphertext to be processed after misaligned summation; and perform a multiplication operation between the homomorphic ciphertext to be processed after misaligned summation and the mask vector to obtain the model training result.
[0133] Another embodiment of this disclosure also provides an electronic device, including: a memory and a processor;
[0134] Memory; memory for storing instructions executable by the processor;
[0135] The processor is used to invoke program instructions in the memory to execute the data transmission method as described in any of the above embodiments.
[0136] Another embodiment of this disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the data transmission method as described in any of the above embodiments.
[0137] Another embodiment of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the data transmission method as described in any of the above embodiments.
[0138] Figure 10 This is a schematic diagram of the structure of an electronic device provided in Embodiment 7 of this disclosure. The device may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0139] The device 1000 may include one or more of the following components: a processing component 1002, a memory 1004, a power supply component 1006, a multimedia component 1008, an audio component 1010, an input / output (I / O) interface 1012, a sensor component 1014, and a communication component 1016.
[0140] Processing component 1002 typically controls the overall operation of device 1000, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 1002 may include one or more processors 1020 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 1002 may include one or more modules to facilitate interaction between processing component 1002 and other components. For example, processing component 1002 may include a multimedia module to facilitate interaction between multimedia component 1008 and processing component 1002.
[0141] Memory 1004 is configured to store various types of data to support the operation of device 1000. Examples of such data include instructions for any application or method operating on device 1000, contact data, phonebook data, messages, pictures, videos, etc. Memory 1004 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0142] Power supply component 1006 provides power to various components of device 1000. Power supply component 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 1000.
[0143] The multimedia component 1008 includes a screen that provides an output interface between the device 1000 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 1008 includes a front-facing camera and / or a rear-facing camera. When the device 1000 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0144] Audio component 1010 is configured to output and / or input audio signals. For example, audio component 1010 includes a microphone (MIC) configured to receive external audio signals when device 1000 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 1004 or transmitted via communication component 1016. In some embodiments, audio component 1010 also includes a speaker for outputting audio signals.
[0145] I / O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0146] Sensor assembly 1014 includes one or more sensors for providing state assessments of various aspects of device 1000. For example, sensor assembly 1014 may detect the on / off state of device 1000, the relative positioning of components such as the display and keypad of device 1000, changes in the position of device 1000 or a component of device 1000, the presence or absence of user contact with device 1000, the orientation or acceleration / deceleration of device 1000, and temperature changes of device 1000. Sensor assembly 1014 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1014 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 1014 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0147] Communication component 1016 is configured to facilitate wired or wireless communication between device 1000 and other devices. Device 1000 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 1016 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 1016 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0148] In an exemplary embodiment, the apparatus 1000 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0149] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1004 including instructions, which can be executed by a processor 1020 of the device 1000 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0150] A non-transitory computer-readable storage medium, wherein when the instructions in the storage medium are executed by the processor of a terminal device, the terminal device is able to execute the aforementioned screen splitting method.
[0151] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0152] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A data transmission method, characterized in that, The method, applied to a third-party encryption platform, includes: The system acquires model building data sent by the data requesting device and at least two homomorphic encrypted data sent by at least two data providing devices, wherein the homomorphic encrypted data is obtained by the data providing device encrypting the data to be transmitted using a public key preset by the data requesting device. A data fusion operation is performed on at least two homomorphic encrypted data sent by at least two data providing devices to obtain target encrypted data; wherein, the data fusion includes: batch feature fusion and record feature fusion; the batch feature fusion refers to encrypting a batch of identical feature columns at a time; the record feature fusion refers to encrypting multiple data records at a time. Based on the model, an encrypted data processing model is established. The target encrypted data and the encrypted data processing model are sent to a third-party computing platform, and the model training results sent by the third-party computing platform are obtained. The model training results are obtained by the third-party computing platform after training the encrypted data using the target encrypted data. The model training results are sent to the data-requiring device.
2. The method according to claim 1, characterized in that, The model building data includes model calculation parameters and a public key; The step of establishing an encrypted data processing model based on the model includes: A model to be processed is established based on the calculated parameters of the model, and the model to be processed is capable of processing plaintext data. The parameters of the model to be processed are encrypted using the public key to obtain the encrypted data processing model, wherein the encrypted data processing model is capable of processing ciphertext data.
3. The method according to claim 1, characterized in that, The step of sending the target encrypted data and the encrypted data processing model to a third-party computing platform and obtaining the model training results sent by the third-party computing platform includes: The target encrypted data and the encrypted data processing model are sent to each computing node in the distributed computing cluster, so that each computing node uses the target encrypted data to train the encrypted data processing model and obtain the model training result.
4. A data transmission method, characterized in that, include: The method involves acquiring target encrypted data and an encrypted data processing model sent by a third-party encryption platform. The target encrypted data is obtained by fusing at least two homomorphic encrypted data sets sent by at least two data providing devices. The homomorphic encrypted data is obtained by encrypting the data to be transmitted using a public key preset by the data requesting device. The encrypted data processing model is established by the third-party encryption platform using model establishment data sent by the data requesting device. The data fusion includes batch feature fusion and record feature fusion. Batch feature fusion refers to encrypting a batch of identical feature columns in one operation; record feature fusion refers to encrypting multiple data records in one operation. The target encrypted data is used to train the encrypted data processing model to obtain the model training result. The model training results are sent to the third-party encryption platform, so that the third-party encryption platform can send the model training results to the data-requiring device.
5. The method according to claim 4, characterized in that, The step of training the encrypted data processing model using the target encrypted data includes: The target encrypted data is input into the feature extraction layer in the encrypted data processing model to obtain the homomorphic ciphertext to be processed output by the feature extraction layer. The model training result is obtained by summing the data within the homomorphic ciphertext to be processed.
6. The method according to claim 5, characterized in that, The step of summing the data within the homomorphic ciphertext to be processed includes: Determine the interval identifiers for which summation operations need to be performed; The homomorphic ciphertext to be processed is shifted according to the interval identifier to obtain the ciphertext to be calculated. The model training result is obtained by performing a misaligned summation operation on the homomorphic ciphertext to be processed and the ciphertext to be calculated.
7. The method according to claim 5, characterized in that, The step of summing the data within the homomorphic ciphertext to be processed includes: The homomorphic ciphertext to be processed is moved in a preset direction by a preset step size to obtain the ciphertext to be calculated. A misaligned summation operation is performed on the homomorphic ciphertext to be processed and the ciphertext to be computed to obtain a global computation result, which is then determined as the model training result.
8. The method according to claim 6, characterized in that, After performing the misaligned summation operation on the homomorphic ciphertext to be processed and the ciphertext to be calculated, the method further includes: A mask vector is determined based on the interval identifier that needs to be summed. In the mask vector, the vector at the position corresponding to the interval identifier is 1, and the vector at the other positions is 0. The mask vector has the same length as the homomorphic ciphertext to be processed after misaligned summation. The model training result is obtained by multiplying the homomorphic ciphertext to be processed after the misalignment summation with the mask vector.
9. A data transmission device, characterized in that, include: The acquisition module is used to acquire model building data sent by the data requesting device, and to acquire at least two homomorphic encrypted data sent by at least two data providing devices, wherein the homomorphic encrypted data is obtained by the data providing device encrypting the data to be transmitted using a public key preset by the data requesting device; The fusion module is used to perform data fusion operations on at least two homomorphic encrypted data sent by at least two data providing devices to obtain target encrypted data; wherein, the data fusion includes: batch feature fusion and record feature fusion; the batch feature fusion refers to encrypting a batch of identical feature columns at a time; the record feature fusion refers to encrypting multiple data records at a time. A module is established to build an encrypted data processing model based on the model's data. The transceiver module is used to send the target encrypted data and the encrypted data processing model to a third-party computing platform, and to obtain the model training results sent by the third-party computing platform. The model training results are obtained by the third-party computing platform after training the encrypted data using the target encrypted data. The transceiver module is also used to send the model training results to the data-requiring device.
10. A data transmission device, characterized in that, include: The data acquisition module is used to acquire target encrypted data and an encrypted data processing model sent by a third-party encryption platform. The target encrypted data is obtained by performing data fusion operations on at least two homomorphic encrypted data sent by at least two data providing devices. The homomorphic encrypted data is obtained by encrypting the data to be transmitted using a public key preset by the data requesting device. The encrypted data processing model is established by the third-party encryption platform using model establishment data sent by the data requesting device. The data fusion includes batch feature fusion and record feature fusion. Batch feature fusion refers to encrypting a batch of identical feature columns in one batch; record feature fusion refers to encrypting multiple data records in one batch. The training module is used to perform model training operations on the encrypted data processing model using the target encrypted data to obtain model training results; The sending module is used to send the model training results to the third-party encryption platform, so that the third-party encryption platform can send the model training results to the data request device.
11. An electronic device, characterized in that, include: Memory, processor; Memory; Memory used to store the processor's executable instructions; The processor is used to invoke program instructions in the memory to execute the data transmission method as described in any one of claims 1-3 or 4-8.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the data transmission method as described in any one of claims 1-3 or 4-8.
13. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the data transmission method according to any one of claims 1-3 or 4-8.
Citation Information
Patent Citations
Model generation method and device and device for model generation
CN113033717A
Model training method and device, storage medium and electronic equipment
CN113472805A