A data processing method, apparatus, system, device, and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-22
- Publication Date
- 2026-08-14
AI Technical Summary
[0005]本申请提供了一种数据处理方法,解决了相关技术中耗费高、效率低下,导致服务的响应速度变慢、服务性能恶化的问题
[0072]本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。
Smart Images

Figure CN113553602B_ABST
Abstract
Description
[0001] This application claims priority to Chinese Patent Application No. 202010338323.7, filed on April 26, 2020, entitled "Secure Calculation Method and Related Equipment", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, system, device, and computer-readable storage medium. Background Technology
[0003] With the development of information technology, service providers offering various services to users have accumulated vast amounts of data. While these data can be used to optimize their services, privacy and security issues arise. To protect user privacy, the industry has proposed a secure computation strategy. Secure computation involves users encrypting their private input and submitting it to a computation node. The computation node then performs computation on the encrypted data, maintaining all computational data in an encrypted state throughout the process. This prevents service providers from accessing the original computational data, thus avoiding privacy leaks.
[0004] However, secure computing relies on specialized encryption algorithms and ciphertext computation protocols, which are costly and inefficient. This results in slower service response times and degraded service performance. Summary of the Invention
[0005] This application provides a data processing method that solves the problems of high cost and low efficiency in related technologies, leading to slow service response speed and degraded service performance. This application also provides apparatus, systems, devices, computer-readable storage media, and computer program products corresponding to the above method.
[0006] Firstly, this application provides a data processing method. This method is applied to a data processing system that provides secure computation to users using encrypted computation functions. The data processing system includes a data providing device and a data processing device.
[0007] Specifically, the data providing device acquires first privacy data and second privacy data, encrypts the first privacy data using an encryption algorithm to obtain ciphertext of the first privacy data, and then sends the ciphertext of the first privacy data and the second privacy data to the data processing device. Correspondingly, the data processing device inputs the ciphertext of the first privacy data and the second privacy data into a ciphertext calculation function to obtain the ciphertext of the data processing result. The ciphertext calculation function corresponds to the aforementioned encryption algorithm. The data processing device sends the ciphertext of the data processing result to the data providing device, which decrypts the ciphertext of the data processing result to obtain the data processing result.
[0008] In this method, the first piece of private data is used in ciphertext for computation, while the second piece of private data is used in plaintext. This reduces the amount of ciphertext input during secure computation, lowers computational complexity, and improves computational efficiency, thus meeting business requirements. Consequently, it can improve service response speed and service performance.
[0009] In some possible implementations, the data processing device can construct a ciphertext computation function to meet the secure computation requirements of different business scenarios. Specifically, the data providing device obtains a data processing requirement, sends the requirement to the data processing device, and then the data processing device constructs the ciphertext computation function based on the requirement.
[0010] The data processing requirements include a requirement description. This requirement description at least outlines the data to be processed (referred to as input data in this embodiment) and the data to be obtained (referred to as output data in this embodiment). Therefore, the requirement description includes identifiers for the input data and the output data. The identifiers for the input / output data can be names or identifiers of the input / output data.
[0011] The data processing device can construct a plaintext calculation function based on the input and output data in the requirements description, utilizing the relationships between the data. Then, based on this plaintext calculation function and the format of the input data (including both plaintext and ciphertext formats), it can construct a corresponding ciphertext calculation function. The input of the ciphertext calculation function includes plaintext input items and ciphertext input items.
[0012] Because the data processing device can construct corresponding ciphertext calculation functions according to data processing needs, rather than providing fixed ciphertext calculation functions, it achieves both secure computation and personalized data processing.
[0013] In some possible implementations, the data providing device can specify the encryption algorithm used to encrypt the first private data, ensuring the security of the private data and the data processing results. Specifically, the data processing requirements include the identifier of the encryption algorithm, and the data processing device constructs a ciphertext calculation function corresponding to the encryption algorithm based on the data processing requirements.
[0014] In some possible implementations, the requirement description in the data processing requirements may also include data processing logic. This data processing logic specifically refers to the logic of processing input data to obtain output data. For example, data processing logic can characterize how to perform several operations on the input data, such as addition, multiplication, exponentiation, and so on, to obtain the output data. The data processing logic can be represented in different forms, such as through text or plaintext calculation functions. The data processing device can construct a plaintext calculation function based on the data processing logic represented in text form, or directly obtain the plaintext calculation function based on the data processing logic represented in plaintext calculation function form.
[0015] In some possible implementations, the ciphertext computation function includes constant terms. The ciphertext computation function can be a polynomial, where each monomial is called a term of the polynomial. The terms that are independent of the ciphertext of the first private data are the constant terms. The data processing device inputs the second private data as constant terms into the ciphertext computation function to obtain the ciphertext of the data processing result.
[0016] To facilitate understanding, a specific example will be used as an illustration below.
[0017] In this example, the original plaintext computation function is f(m1,m2,m3,m4,m5) = a0 + a1m1 + a2m2² + a3m3³ + a4m4⁴ + a5m5⁵. Here, m4 and m5 represent secondary privacy data, such as sales growth rates or relatively private medical scan images. Based on this, the plaintext computation function can also be expressed as f' = a'0 + a1m1 + a2m2² + a3m3³, where a'0 = a0 + a4m4⁴ + a5m5⁵. a'0 is the constant term of the plaintext computation function. When the plaintext computation function is mapped to the ciphertext computation function, its constant term does not require complex calculations. Secure computation only requires complex calculations on the three ciphertext inputs E(m1), E(m2), and E(m3). This reduces the amount of ciphertext input, lowers computational complexity, and improves computational efficiency.
[0018] In some possible implementations, the data processing device may have a pre-defined ciphertext calculation function to provide specific data processing services. Furthermore, the data processing device does not need to construct an additional ciphertext calculation function based on data processing requirements, thus reducing its workload.
[0019] In some possible implementations, the data providing device does not employ an encryption algorithm to encrypt the second privacy data. Thus, the first privacy data participates in the computation in ciphertext form to ensure security, while the second privacy data participates in the computation in plaintext form, reducing the amount of ciphertext input, lowering computational complexity, and improving computational efficiency.
[0020] In some possible implementations, the data processing device cannot decrypt the encrypted first privacy data. This prevents the first privacy data from being stolen or leaked by the data processing device, thus ensuring the security of the first privacy data.
[0021] In some possible implementations, the privacy level of the first privacy data is higher than that of the second privacy data. For example, the first privacy data can be absolute privacy data, and the second privacy data can be relative privacy data. Absolute privacy means that if the content is leaked, it will endanger the user's privacy and security. Relative privacy means that even if the content is leaked, as long as the data subject cannot be contacted, it will not endanger the user's privacy and security.
[0022] For ease of understanding, this application also provides some specific examples of first privacy data and second privacy data. In, for example, a financial system, first privacy data may include a company's business registration number, tax identification number, stock code, specific address, bank account number, transaction counterparty information, dividend-paying shareholder information, lending bank information, value-added tax invoices, and audit information; second privacy data may include debt ratio, loan interest rate, dividend payout ratio, geographical location, tax rate, and credit rating.
[0023] In some possible implementations, the data processing system can also provide secure computing to users via cloud services. Specifically, the data providing device can present a user interface to the user, such as a graphical user interface (GUI) or a command user interface (CUI). The data providing device receives the privacy level input by the user through this user interface, and obtains first privacy data and second privacy data from the user's input data based on the privacy level. Thus, the data providing device can encrypt the first privacy data using an encryption algorithm to obtain ciphertext of the first privacy data, and send the ciphertext of the first privacy data and the second privacy data to the data processing device for secure computing. This ensures the security of the first privacy data and reduces the ciphertext input to the ciphertext calculation function, thereby improving computational efficiency.
[0024] In some possible implementations, the data providing device sends the second privacy data to the data processing device anonymously. For example, the data providing device can use onion routing or garlic routing to send the second privacy data to the data processing device, which can reduce the risk of the association between the second privacy data and the subject being leaked and ensure the security of the second privacy data.
[0025] Furthermore, the data providing device can also anonymously send the encrypted first privacy data to the data processing device. On the one hand, the encrypted first privacy data will not be decrypted by the data processing device or any third party, and its content will not be leaked, thus ensuring security. On the other hand, the subject of the first privacy data will not be leaked. This achieves a dual protection mechanism to ensure the security of the first privacy data.
[0026] Secondly, this application provides a data processing method. This method is applied to a data processing apparatus. Specifically, the data processing apparatus receives ciphertext of first privacy data and second privacy data, wherein the ciphertext of the first privacy data is obtained by encrypting the first privacy data using an encryption algorithm. Then, the data processing apparatus inputs the ciphertext of the first privacy data and the second privacy data into a ciphertext calculation function to obtain ciphertext of the data processing result, wherein the ciphertext calculation function corresponds to the aforementioned encryption algorithm. Finally, the data processing apparatus sends the ciphertext of the data processing result to a data providing device.
[0027] In this method, the first private data is always used in encrypted form to ensure security, while the second private data is used in plaintext form. This reduces the encrypted input to the encrypted computation function, lowers computational complexity, improves computational efficiency, and enhances service performance. Furthermore, the data processing result is transmitted to the data providing device in encrypted form, and the data providing device decrypts the encrypted data processing result, ensuring the security of the data processing result.
[0028] In some possible implementations, the data processing device receives a data processing request from the data providing device and constructs a ciphertext computation function based on the request. This allows for the provision of secure computation services to users according to their specific needs.
[0029] In some possible implementations, the data processing requirements include the identification of the encryption algorithm. That is, the user can also specify the encryption algorithm used to encrypt the first private data. Correspondingly, the data processing device constructs the ciphertext calculation function corresponding to the above encryption algorithm according to the data processing requirements, which can further ensure the security of the first private data.
[0030] In some possible implementations, the ciphertext computation function includes constant terms. The ciphertext computation function can be a polynomial, where each monomial is called a term of the polynomial. The terms that are independent of the ciphertext of the first private data are the constant terms. The data processing device inputs the second private data as constant terms into the ciphertext computation function to obtain the ciphertext of the data processing result. Because the ciphertext input is reduced, the complexity of the ciphertext computation is greatly reduced, and the computational efficiency is significantly improved.
[0031] In some possible implementations, the data processing device cannot decrypt the ciphertext of the first privacy data. This prevents the ciphertext of the first privacy data from being decrypted by the data processing device, thus avoiding the leakage or theft of the first privacy data and improving the security of the first privacy data.
[0032] Thirdly, this application provides a data processing system. This data processing system provides secure computation to users using a ciphertext calculation function. The system includes a data providing device and a data processing device. The data providing device acquires first private data, encrypts the first private data using an encryption algorithm to obtain ciphertext of the first private data, and acquires second private data. It then sends the ciphertext of the first private data and the second private data to the data processing device. The data processing device inputs the ciphertext of the first private data and the second private data into the ciphertext calculation function to obtain ciphertext of the data processing result, and sends the ciphertext of the data processing result to the data providing device. The ciphertext calculation function corresponds to the encryption algorithm. The data providing device also obtains the data processing result based on the ciphertext of the data processing result.
[0033] In some possible implementations, the data providing device is further used for:
[0034] Obtain data processing requirements and send the data processing requirements to the data processing device;
[0035] The data processing device is also used for:
[0036] The ciphertext calculation function is constructed based on the data processing requirements.
[0037] In some possible implementations, the data processing requirement includes an identifier of the encryption algorithm;
[0038] The data processing device is specifically used for:
[0039] Construct the ciphertext calculation function corresponding to the encryption algorithm based on the data processing requirements.
[0040] In some possible implementations, the ciphertext computation function includes a constant term;
[0041] The data processing device is specifically used for:
[0042] The second private data is input as a constant term into the ciphertext calculation function.
[0043] In some possible implementations, the data providing device does not use the encryption algorithm to encrypt the second privacy data.
[0044] In some possible implementations, the data processing device is unable to decrypt the ciphertext of the first privacy data.
[0045] In some possible implementations, the privacy level of the first privacy data is higher than that of the second privacy data.
[0046] In some possible implementations, the data providing device is specifically used for:
[0047] Present the user interface to the user;
[0048] The privacy level input by the user is received through the user interface;
[0049] The first privacy data and the second privacy data are obtained from the user's input data according to the privacy level.
[0050] In some possible implementations, the data providing device is further used for:
[0051] The second privacy data is sent to the data processing device anonymously.
[0052] Fourthly, this application provides a data processing apparatus. The apparatus includes:
[0053] The communication module is used to receive the ciphertext of the first privacy data and the second privacy data, wherein the ciphertext of the first privacy data is obtained by encrypting the first privacy data using an encryption algorithm;
[0054] The processing module is used to input the ciphertext of the first privacy data and the second privacy data into the ciphertext calculation function to obtain the ciphertext of the data processing result, wherein the ciphertext calculation function corresponds to the encryption algorithm;
[0055] The communication module is also used to send the encrypted data processing result to the data providing device.
[0056] In some possible implementations, the data processing apparatus further includes a construction module;
[0057] The communication module is also used to receive data processing requests sent by the data providing device;
[0058] The construction module is used to construct the ciphertext calculation function according to the data processing requirements.
[0059] In some possible implementations, the data processing requirement includes an identifier of the encryption algorithm;
[0060] The building module is specifically used for:
[0061] Construct the ciphertext calculation function corresponding to the encryption algorithm based on the data processing requirements.
[0062] In some possible implementations, the ciphertext computation function includes a constant term;
[0063] The processing module is specifically used for:
[0064] The second private data is input as a constant term into the ciphertext calculation function.
[0065] In some possible implementations, the data processing device is unable to decrypt the ciphertext of the first privacy data.
[0066] Fifthly, this application provides an apparatus. The apparatus includes a processor and a memory.
[0067] The processor is configured to execute instructions stored in the memory to cause the device to perform a data processing method as described in the second aspect or any implementation thereof.
[0068] Sixthly, this application provides a computer-readable storage medium. The computer-readable storage medium includes instructions. These instructions instruct a device to perform a data processing method as described in the second aspect or any implementation thereof.
[0069] In a seventh aspect, this application provides a computer-readable storage medium. The computer-readable storage medium includes instructions. These instructions instruct a data processing system to perform a data processing method as described in the first aspect or any implementation thereof.
[0070] Eighthly, this application provides a computer program product containing instructions. When executed on a device, it causes the device to perform the data processing method described in the second aspect or any implementation thereof.
[0071] Ninthly, this application provides a computer program product containing instructions. When executed on a data processing system, it causes the data processing system to perform the data processing method described in the first aspect or any implementation thereof.
[0072] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description
[0073] To more clearly illustrate the technical methods of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly described below.
[0074] Figure 1 A system architecture diagram of a data processing method provided in an embodiment of this application;
[0075] Figure 2 A system architecture diagram of a data processing method provided in an embodiment of this application;
[0076] Figure 3 An application scenario diagram of a data processing method provided in an embodiment of this application;
[0077] Figure 4 An interactive flowchart of a data processing method provided in an embodiment of this application;
[0078] Figure 5 A schematic diagram of a data processing configuration interface provided in an embodiment of this application;
[0079] Figure 6 This is a schematic diagram of the structure of an onion data package provided in an embodiment of this application;
[0080] Figure 7 A schematic diagram of a computing network provided for an embodiment of this application;
[0081] Figure 8 A schematic diagram of a data processing system provided in an embodiment of this application;
[0082] Figure 9 This is a schematic diagram of the structure of a device provided in an embodiment of this application. Detailed Implementation
[0083] The terms "first" and "second" used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first" and "second" may explicitly or implicitly include one or more of that feature.
[0084] First, some technical terms involved in the embodiments of this application will be introduced.
[0085] Secure computation is a crucial means of protecting data security in information technology (IT) applications. Secure computation refers to performing data computation tasks while protecting data privacy. Specifically, the data provided by the data provider includes privacy-sensitive data (i.e., data carrying private information). The data provider encrypts this privacy-sensitive data using an encryption algorithm, obtaining ciphertext. The computation party then performs computations on this ciphertext using a ciphertext computation function. Throughout the computation process, the privacy-sensitive data remains in ciphertext form, thus ensuring its security.
[0086] Furthermore, the computing party can perform calculations on the ciphertext of the privacy data to obtain the ciphertext of the calculation result. In some cases, the calculation result also carries privacy information. Therefore, the computing party can return the ciphertext of the calculation result to the data provider, who can then decrypt the ciphertext to obtain the final calculation result. This completes the data calculation task while ensuring the security of the calculation result.
[0087] In this scenario, there can be one or more data providers participating in the computation. For ease of description, this application refers to the scenario where only one data provider offers data for secure computation as a single-user scenario, and the scenario where multiple data providers offer data for secure computation as a multi-user scenario, or secure multi-party computation (SMPC). SMPC is primarily used to solve the problem of privacy-preserving collaborative computation among a group of mutually distrustful data providers. That is, SMPC ensures the independence of inputs, the correctness of computation, and prevents the disclosure of input values to other data providers participating in the computation.
[0088] Whether in a single-user or multi-user scenario, secure computation relies on specialized encryption algorithms and corresponding ciphertext calculation functions. These specialized encryption algorithms include any one or more of the following: garbled circuit algorithms, homomorphic encryption algorithms, and secret sharing algorithms.
[0089] The computing party also provides a ciphertext computing function corresponding to the plaintext computing function, ensuring that the function value obtained by the ciphertext input of the privacy data to the ciphertext computing function is equal to the ciphertext function value obtained by the plaintext input of the privacy data to the plaintext computing function. See the following formula for details:
[0090] F(E(m1),E(m2),…E(m n ))=E(f(m1,m2,…m n )) (1)
[0091] Among them, m1, m2, m n Let f represent the plaintext calculation function, F represent the ciphertext calculation function corresponding to the plaintext calculation function f, and E represent the encryption algorithm, E(m1), E(m2), and E(m...). n ) represents the ciphertext of the privacy data obtained by encrypting the privacy data using the above encryption algorithm. n is a positive integer.
[0092] However, the complexity of ciphertext computation functions is related to the ciphertext input. Encrypting all privacy-related data involved in the computation maximizes the ciphertext input in secure computation, resulting in very low computational efficiency. Especially when encountering complex plaintext computation functions and employing resource-intensive secure computation techniques such as fully homomorphic encryption, the computational efficiency is almost insufficient, leading to slower service response times and degraded service performance.
[0093] In view of this, embodiments of this application provide a data processing method. This method is specifically executed by a data processing device. In this method, privacy data is divided into different privacy levels, and the data processing device employs different processing mechanisms for privacy data of different privacy levels. Specifically, for privacy data with higher privacy levels, calculations are performed directly based on the ciphertext of the privacy data; for privacy data with lower privacy levels, calculations are performed directly based on the plaintext of the privacy data. This reduces the amount of ciphertext input during secure computation, lowers computational complexity, and improves computational efficiency, thus meeting business needs. This can improve service response speed and service performance.
[0094] For data with a high privacy level, it exists in encrypted form throughout the secure computation process, ensuring security. For data with a low privacy level, it can be submitted to the data processing device anonymously. Even if the data itself is leaked, security can be guaranteed as long as the relationship between the data and the subject (data provider, data producer) remains intact. Thus, efficient secure computation is achieved while ensuring data privacy.
[0095] like Figure 1 As shown, the data processing device can be deployed in a cloud environment, specifically one or more computing devices (e.g., a central server) within that environment. Alternatively, it can be deployed in an edge environment, specifically one or more computing devices (edge computing devices) within that environment. These edge computing devices can be servers, computing boxes, etc. The cloud environment refers to a central computing device cluster owned by a cloud service provider, used to provide computing, storage, and communication resources; the edge environment refers to an edge computing device cluster geographically close to the end devices (i.e., edge-side devices), used to provide computing, storage, and communication resources.
[0096] The aforementioned data processing devices can also be deployed on end devices. End devices include physical machines such as terminals. Terminals include, but are not limited to, desktop computers, laptops, tablets, or smartphones. Data processing devices can also be deployed in virtual machines or containers on these physical machines. Considering load balancing and reliability, in some implementations, data processing devices can also be deployed in a cluster with multiple replicas.
[0097] Furthermore, such as Figure 2 As shown, a data processing device may include multiple parts (e.g., multiple functional modules). Based on this, the various parts of the data processing device can also be deployed in a distributed manner in different environments. For example, a portion of the data processing device can be deployed in three environments—cloud, edge, and end devices—or any two of these environments.
[0098] The functional modules inside the data processing device can be divided in various ways, and this application does not limit them. Figure 3 As an example of a partitioning method, such as Figure 3 As shown, the data processing device 300 includes a communication module 302 and a processing module 304. Optionally, the data processing device 300 may also include a construction module 306. The data processing device 300 is deployed in a cloud environment 200, and a communication path is established between at least one data providing device 100 and the cloud environment 200.
[0099] Data providing device on data providing equipment 100 Figure 3 (Not shown) provides source data, which refers to raw data, typically in plaintext. This data providing device can be an application such as a database, or a data processing client with a user interface. The data processing application can be a proprietary client, such as a payroll management application or an attendance management application client, through which users can input source data via a graphical user interface (GUI). Alternatively, the data processing application can be a client for a general-purpose data processing application, such as a browser. The browser can load corresponding data processing pages, such as payroll management pages or attendance management pages, allowing users to input source data. The user interface includes, but is not limited to, a GUI. For example, the user interface can also be a command user interface (CUI).
[0100] Specifically, the data providing device can send a data processing request to the data processing device. The communication module 302 of the data processing device 300 is used to receive the data processing request, and the construction module 306 of the data processing device 300 is used to construct the plaintext calculation function and the ciphertext calculation function corresponding to the data processing request, thereby meeting personalized needs. In some implementations, the data processing device 300 can provide specific plaintext calculation functions and corresponding ciphertext calculation functions to meet specific data processing needs.
[0101] When the data providing device sends a data processing request, it can either default to having the data processing device 300 provide an encryption algorithm or specify an encryption algorithm itself. This encryption algorithm is used to encrypt data to obtain corresponding ciphertext, for example, encrypting private data in the source data to obtain ciphertext of the private data.
[0102] The source data includes privacy data. The data providing device can process the privacy data according to its privacy level, and then submit the processed privacy data to the data processing device 300 for further processing. Specifically, the data providing device can encrypt the privacy data with a higher privacy level (referred to as the first privacy data in this embodiment for ease of description) using an encryption algorithm to obtain the ciphertext of the first privacy data, and then send the ciphertext of the first privacy data and the data with a lower privacy level (referred to as the second privacy data in this embodiment for ease of description) to the data processing device 300.
[0103] The processing module 304 of the data processing device 300 is used to process the ciphertext of the first privacy data and the second privacy data using a ciphertext calculation function. Specifically, the processing module 304 inputs the ciphertext of the first privacy data and the second privacy data into the ciphertext calculation function to obtain the ciphertext of the data processing result. Then, the communication module 302 of the data processing device 300 returns the ciphertext of the data processing result to the data providing device, which can decrypt the ciphertext of the data processing result to obtain the data processing result.
[0104] Specifically, when submitting the encrypted first privacy data and the second privacy data, the data providing device can also submit them anonymously. This ensures that the linkability between the privacy data and the subject is not leaked, thus protecting the security of the second privacy data. Furthermore, the security of the first privacy data is protected through this dual protection mechanism.
[0105] Figure 3 The example illustration uses a data processing device 300 deployed in a cloud environment. In other possible implementations of this application, the data processing device 300 may also be deployed in an edge environment or on an end device, or distributed across different environments. This application does not limit this to any particular implementation.
[0106] Next, the data processing method provided in the embodiments of this application will be introduced from the perspective of the interaction between the data providing device and the data processing device 300.
[0107] See Figure 4 The diagram shows the interactive flowchart of the data processing method, which includes:
[0108] S402: The data providing device sends a data processing request to the data processing device 300.
[0109] The data processing requirements include a requirement description. This requirement description at least outlines the data to be processed (referred to as input data in this embodiment) and the data to be obtained (referred to as output data in this embodiment). Therefore, the requirement description includes identifiers for the input data and the output data. The identifiers for the input / output data can be the names or identifiers of the input / output data.
[0110] Furthermore, the requirements description can also describe the data processing logic. This data processing logic specifically refers to the logic of processing input data to obtain output data. For example, the data processing logic can characterize how to perform several operations on the input data, such as addition, multiplication, exponentiation, and so on, to obtain the output data. The data processing logic can be represented in different forms, such as through text or plaintext calculation functions.
[0111] The data processing device sends the above-mentioned requirement description to the data processing device 300 so that the construction module 306 of the data processing device 300 can obtain a plaintext calculation function for processing the input data according to the above-mentioned requirement description, and construct a ciphertext calculation function based on the plaintext calculation function and the encryption algorithm for encrypting the input data.
[0112] The plaintext computation function processes the plaintext (input data) to obtain the processed data (plaintext of the processed data). The ciphertext computation function processes the ciphertext (ciphertext of the input data) to obtain the processed data (output data of the plaintext computation function) in ciphertext. This ciphertext of the processed data is equal to the result of encrypting the processed data obtained from the plaintext computation function using an encryption algorithm. This ciphertext can be decrypted to obtain the final processed data, thus enabling secure computation.
[0113] In some implementations, the requirement description may also include an identifier for the encryption algorithm, specifically a user-specified encryption algorithm. This encryption algorithm can be a publicly available algorithm, such as a symmetric encryption algorithm like Data Encryption Standard (DES) or Advanced Encryption Standard (AES), or an asymmetric encryption algorithm like Rivest Shamir Adleman (RSA) or Elliptic Curve Cryptography (ECC). When using a symmetric encryption algorithm, the data providing device and the data processing device 300 can also exchange encryption keys. Specifically, the data providing device and the data processing device 300 can exchange encryption keys using the Diffie-Hellman (DH) key exchange algorithm.
[0114] The encryption algorithm described above can also be a custom encryption algorithm. The data providing device can share the encryption algorithm with the data processing device 300, so that the data processing device 300 can obtain the custom encryption algorithm based on the identifier of the custom encryption algorithm, and construct the ciphertext calculation function corresponding to the plaintext calculation function based on the encryption algorithm.
[0115] In some implementations, the requirement description may not include the identifier of the encryption algorithm. Correspondingly, the data processing device 300 may provide a preset encryption algorithm, and the data providing device may encrypt the data according to the preset encryption algorithm of the data processing device 300.
[0116] In some implementations, the data processing device 300 may also pre-configure data processing logic. For example, the data processing device 300 may pre-store at least one plaintext calculation function and a corresponding ciphertext calculation function. In this way, the data providing device does not need to send a requirement description for constructing the ciphertext calculation function. That is, executing the data processing method of this embodiment may omit the above-described S402.
[0117] S404: The data processing device 300 constructs a ciphertext calculation function corresponding to the data processing requirements.
[0118] The data processing device 300 first obtains the plaintext calculation function based on the requirement description in the data processing requirements. Specifically, the data processing device 300 can construct the plaintext calculation function based on the input and output data in the requirement description, utilizing the relationships between the data. For example, if the input data includes this month's payable salary and tax rate, and the output data includes this month's actual salary, then the plaintext calculation function can be constructed as follows:
[0119] y=f(m1,m2)=m1-m1*m2=m1(1-m2) (2)
[0120] Where y represents the actual salary paid this month, m1 represents the salary payable this month, and m2 represents the tax rate.
[0121] When the requirement description includes data processing logic, the data processing device 300 can construct a plaintext calculation function based on the data processing logic represented in textual form, or directly obtain the plaintext calculation function based on the data processing logic represented in plaintext calculation function form.
[0122] The requirement description may also include the privacy level of the input data. The input data can be divided into first privacy data and second privacy data based on the privacy level. First privacy data refers to data with a privacy level higher than a preset level, and second privacy data refers to data with a privacy level no higher than the preset level. Since second privacy data can participate in calculations in plaintext form, the data processing device 300 can use second privacy data as a constant term in the plaintext calculation function.
[0123] Assume the original plaintext calculation function is:
[0124] y=f(m1,m2,m3,m4,m5)=a0+a1m1+a2m2 2 +a3m3 3 +a4m4 4 +a5m5 5 (3)
[0125] When m4 and m5 are secondary privacy data, the plaintext calculation function can also be expressed as:
[0126]
[0127] Where a0′ is the constant term of the simplified plaintext calculation function, and a0 is the constant term of the original plaintext calculation function.
[0128] Then, the data processing device 300 constructs the corresponding ciphertext calculation function based on the simplified plaintext calculation function. For example, the data processing device can construct the corresponding ciphertext calculation function based on the plaintext calculation function as shown in formula (4). When different encryption algorithms are used to encrypt the input data, the ciphertext calculation function constructed based on the plaintext calculation function can be different. For ease of understanding, specific examples of ciphertext calculation functions are also provided in this application embodiment, as shown below:
[0129] Y=F(E(m1),E(m2),E(m3),m4,m5) (5)
[0130] Where Y represents the ciphertext of the data processing result, and F represents the ciphertext calculation function. It should be noted that formulas (4) and (5) also satisfy the following relationship:
[0131] Y = E(y) (6)
[0132] The ciphertext calculation function includes constant terms and non-constant terms. The constant terms are those unrelated to the ciphertext of the first private data, while the non-constant terms are those related to the ciphertext of the first private data. By inputting m4 and m5 into the constant terms of the ciphertext calculation function and E(m1), E(m2), and E(m3) into the non-constant terms, secure computation can be achieved.
[0133] When the data processing device 300 is pre-configured with data processing logic, for example, when the data processing device 300 pre-stores at least one plaintext calculation function and a corresponding ciphertext calculation function, the data processing method of the present application embodiment may not need to execute the above-described S404.
[0134] S406: The data processing device 300 returns the encryption algorithm to the data providing device.
[0135] When the data providing device does not specify an encryption algorithm, such as when the data processing request does not include an identifier for the encryption algorithm, the data processing device 300 can also return an encryption algorithm to the data providing device. In some implementations, the data processing device 300 can return an identifier for the encryption algorithm, such as the name of a publicly available encryption algorithm. In this way, the data providing device can obtain the corresponding encryption algorithm based on the identifier.
[0136] When the data providing device specifies an encryption algorithm, the data processing device may not execute the above-described S406.
[0137] Furthermore, when the data processing device 300 is a data processing device that provides specific functions and meets specific needs, it may not need to execute the above-described S402 to S406. The data processing device 300 provides specific functions and meets specific needs based on specific plaintext calculation functions and ciphertext calculation functions.
[0138] S408: The data providing device uses an encryption algorithm to encrypt the first privacy data to obtain the ciphertext of the first privacy data.
[0139] Privacy data refers to data that carries private information, which is information that one does not wish others to know or that is inconvenient for others to know. In some examples, privacy data may include ID numbers, asset data, income data, tax data, or medical diagnosis data, etc.
[0140] Privacy data has corresponding privacy levels. These privacy levels characterize the degree of privacy access granted to the data. Privacy data can be categorized into primary privacy data and secondary privacy data based on these privacy levels. Primary privacy data is data with a privacy level higher than a preset level, while secondary privacy data is data with a privacy level no higher than the preset level.
[0141] When privacy data includes two privacy levels, the first privacy data is the one with the higher privacy level, and the second privacy data is the one with the lower privacy level. For example, privacy levels may include absolute privacy and relative privacy. Absolute privacy means that if the content is leaked, it will endanger the user's privacy. Relative privacy means that even if the content is leaked, as long as the data subject cannot be contacted, the user's privacy will not be endangered. Absolute privacy is a higher level than relative privacy; therefore, the first privacy data can be absolute privacy data, such as this month's salary, and the second privacy data can be relative privacy data, such as a tax rate.
[0142] The data providing device can first determine whether the data involved in the calculation is first privacy data or second privacy data, and then encrypt the first privacy data using an encryption algorithm to obtain the ciphertext of the first privacy data. In some possible implementations, the data processing device 300 can determine a reference privacy level of the data based on the encryption status of historical data submitted by the data providing device, and then provide the reference privacy level to the data providing device. In this way, the user can determine the privacy level of the data based on the reference privacy level presented by the data providing device.
[0143] See Figure 5 The data processing configuration interface shown in the image displays the names of the data to be processed, such as m1…m n Users can input the data values corresponding to each data name through this interface. The interface also displays the reference privacy level for each data provided by the data processing device 300. The reference privacy level includes two levels: absolute privacy and relative privacy. Figure 5 As shown, solid circles represent absolute privacy, and hollow circles represent relative privacy. Users can directly use the above reference privacy level as the privacy level of their data, or they can modify the above reference privacy level, such as by selecting or deselecting it, to obtain the privacy level of the data. The data providing device determines the first privacy data based on the above privacy level, and encrypts the first privacy data to obtain the ciphertext of the first privacy data, while the second privacy data remains in plaintext.
[0144] Generally, the statistical distribution of basic elements (such as letters) in plaintext follows a pattern, while the statistical distribution of basic elements in ciphertext is random. Based on this, the data processing device 300 can distinguish between plaintext and ciphertext based on the statistical distribution of basic elements in the input data.
[0145] In some implementations, the data providing device and the data processing device 300 can pre-agree on the encryption status of the input data, that is, pre-agree on which input data is plaintext and which input data is ciphertext. For example, when the data providing device sends a data processing request in S402, the data processing request can also carry an identifier indicating whether each input data is plaintext or ciphertext. In this way, the data processing device 300 can distinguish whether the input data is plaintext or ciphertext based on the identifier.
[0146] In some cases, the data provider may also add ciphertext identifiers when processing the data, so that the data processing device 300 can determine whether the input data is plaintext or ciphertext based on the ciphertext identifiers. Specifically, the ciphertext identifier can be the number of ciphertexts Q, indicating that the first Q pieces of data provided by the data provider are ciphertext, i.e., the ciphertext of the first piece of private data. The ciphertext identifier can also be a sequence of identifiers indicating whether each piece of data is ciphertext, such as 111001100011, where 1 indicates ciphertext and 0 indicates plaintext.
[0147] S410: The data providing device determines whether to submit the ciphertext of the first privacy data and the second privacy data anonymously. If yes, proceed to S412; otherwise, proceed to S416.
[0148] Anonymous submission refers to submitting a message without revealing the sender's identifier. In this embodiment, anonymous submission means submitting a message without disclosing the sender's identifier. Anonymous submission can be implemented in various ways, such as through onion routing, garlic routing, or Klein bottle routing.
[0149] In some possible implementations, users can choose whether to submit the encrypted first privacy data and the second privacy data anonymously. See also Figure 5 The data processing configuration interface shown allows users to select or deselect the anonymous submission control (e.g., ...). Figure 5 The square selection control shown is solid when selected and hollow when not selected. The data providing device determines whether to use anonymous submission based on the user's above operations.
[0150] In some embodiments, users can also choose whether to submit the encrypted first privacy data and the second privacy data anonymously. For example, a user can choose to submit the second privacy data anonymously and submit the encrypted first privacy data non-anonymously.
[0151] S412: The data providing device uses the key of the Onion router to encrypt the ciphertext of the first privacy data and the second privacy data to obtain the Onion data packet.
[0152] S414: The data providing device sends an onion data packet to the data processing device 300 via the onion router.
[0153] This application uses the example of onion routing to illustrate anonymous data submission. In an onion-routing network, messages are encrypted and packaged layer by layer into onion-like data packets, and sent through a series of network nodes called onion routers. Each onion router decrypts the outermost layer of the data packet, until the final layer is decrypted at the destination, allowing the destination to obtain the original message. Through this series of encryption layers, each network node (including the destination) can only know the location of the previous node, but cannot know the entire sending path or the address of the original sender. As long as at least one node does not disclose its routing path, the data subject can be prevented from being leaked, thus ensuring privacy and security.
[0154] The data providing device uses the key of the onion router to encrypt the ciphertext of the first private data and the second private data respectively, to obtain the first onion data packet and the second onion data packet. Figure 6 The structures of the first and second onion data packets are also shown, such as Figure 6 As shown, the first onion data packet is a data packet that is encrypted sequentially using the keys of Router C, Router B, and Router A. When the first onion data packet passes through Router C, the outermost layer is decrypted by Router C. Then, when it passes through Router B, the encryption layer encrypted using Router B's key is decrypted by Router B. When it passes through Router C, the encryption layer encrypted using Router C's key is decrypted by Router C. In this way, the encrypted first privacy data arrives at the destination, i.e., the data processing device 300.
[0155] Similarly, the second onion data packet is a data packet that encrypts the second private data sequentially using the keys of Router C, Router B, and Router A. When the second onion data packet passes through Router C, Router B, and Router A, the encryption layers encrypted using the keys of Router C, Router B, and Router A are decrypted sequentially. Thus, the second private data reaches the data processing device 300.
[0156] Figure 6 The example only illustrates a network with three Onion Routers. In some embodiments, the network may also include one, two, or more Onion Routers.
[0157] Furthermore, this application embodiment is only used as an example of anonymous submission via the onion routing method. In other possible implementations of this application embodiment, the data providing device may also adopt other methods, such as the garlic routing method, to implement anonymous submission.
[0158] S416: The data providing device sends the encrypted first privacy data and the second privacy data to the data processing device 300.
[0159] In some implementations, when the data providing device determines that it will not use an anonymous submission method, the data providing device can directly send the encrypted first privacy data and the second privacy data to the data processing device 300.
[0160] S418: The data processing device 300 uses a ciphertext calculation function to process the ciphertext of the first privacy data and the second privacy data to obtain the ciphertext of the data processing result.
[0161] Specifically, the data processing device 300 will encrypt the first privacy data, such as E(m1), ..., E(m... k ) and second privacy data such as m k+1 ...m n The input to the ciphertext calculation function yields the ciphertext of the data processing result. Since the second private data is in plaintext, the amount of ciphertext input to the ciphertext calculation function is reduced, significantly lowering computational complexity and improving computational efficiency.
[0162] Specifically, the data processing device 300 can perform ciphertext function computation by constructing a computational network using logic gates. The number of logic gates required for the data processing device 300 to construct the computational network is related to the ciphertext input. The more ciphertext inputs, the more complex the computational network becomes, requiring more logic gates. Therefore, reducing the number of ciphertext inputs can effectively reduce the number of logic gates required to construct the computational network.
[0163] like Figure 7 As shown, for m1, m2, ... m k , ...m n These n pieces of private data, the data providing device accesses m1, m2, ... m k These k absolutely private data points are encrypted using an encryption algorithm to obtain the ciphertext of the first private data, namely E(m1), E(m2), ..., E(mk). k The data providing device submits the encrypted text E(m1), E(m2), ... E(m) of the aforementioned first privacy data to the data processing device 300. k ) and second privacy data m k+1 , ...m n The data processing device 300 can process E(m1), E(m2), ..., E(m... k Constructing logic gates without targeting mk+1 , ...m n Constructing logic gates simplifies the computational network, reduces the number of logic gates, and thus reduces the amount of computation required to ensure computational accuracy and data privacy.
[0164] In this process, the data processing device 300 is unaware of the key used by the data providing device to encrypt the first private data, making it difficult to decrypt the ciphertext of the first private data and obtain the first private data. Instead, it directly inputs the ciphertext of the first private data into the ciphertext calculation function, thus ensuring the security of the first private data.
[0165] S420: The data processing device 300 returns the encrypted data processing result to the data providing device.
[0166] S422: The data providing device decrypts the ciphertext of the data processing result to obtain the data processing result.
[0167] Specifically, the data providing device can perform the reverse process of the encryption algorithm to decrypt the ciphertext of the data processing result and obtain the data processing result. This prevents the data processing result from being stolen during transmission, ensuring security.
[0168] In some implementations, when the data processing result does not carry privacy information or has a low privacy level, the data processing device 300, if it obtains the key used to encrypt the first privacy data, can also use that key to decrypt the ciphertext of the data processing result, obtain the data processing result, and then return the data processing result to the data providing device. Furthermore, the data processing device can also encrypt the data processing result according to an encryption algorithm specified by the data providing device, such as E′, so that the data providing device can decrypt it to obtain the data processing result.
[0169] In some implementations, the data providing device can also combine the encryption algorithm E provided by one end of the data processing device 300 with its own encryption algorithm E′ to obtain a new encryption algorithm E″, and then encrypt the first private data using the new encryption algorithm E″. For example, the data providing device can combine the public keys of both devices and use the new encryption algorithm E″ for encryption. In this case, either private key can only partially decrypt the data; only by performing two partial decryptions using the private keys of both the data providing device and the data processing device 300 can complete decryption be achieved.
[0170] For security reasons, the data providing device can also encrypt the ciphertext of the first privacy data and the second privacy data, and decrypt them on the data processing device 300 side to obtain the ciphertext of the first privacy data and the second privacy data. Data processing is then performed based on the ciphertext of the first privacy data and the second privacy data, which on the one hand ensures the security of data during transmission, and on the other hand improves data processing efficiency by reducing ciphertext input.
[0171] Based on the above description, this application provides a data processing method. This method employs different privacy protection mechanisms for privacy data with different privacy levels. Specifically, for first privacy data with a high privacy level, it is encrypted before being submitted to the data processing device 300; for second privacy data with a lower privacy level, it is submitted anonymously to the data processing device 300. Since the second privacy data is plaintext, the ciphertext input to the ciphertext calculation function is reduced, improving computational efficiency and thus enhancing service response efficiency and service performance. Furthermore, the consumption and cost of anonymous communication are far less than the burden that more ciphertext input brings to secure computation, thereby reducing data processing costs.
[0172] Figure 4 The illustrated embodiment primarily focuses on processing data provided by a single data provider (i.e., a single-user scenario). In some implementations, multiple data providers may supply data to the data processing device 300 for processing. The implementation method of processing data provided by multiple data providers is described below.
[0173] In some implementations, multiple data providers offer data with different dimensions. In some embodiments, the input data has n dimensions, and the input data can be represented as m1, m2, ... m k , ...m n Where m1, m2, ... m k For primary privacy data, m k+1 , ...m n This is considered secondary privacy data. At least one of the multiple data providers may provide both primary and secondary privacy data. For example, data provider 1 provides m1, m2, and m... k+1 , ...m n-1 Data provider 2 provides m3, m4, ... m k m n Of course, some data providers may only provide the first privacy data, while others may only provide the second privacy data. For example, data provider 1 provides m1, m2, ... m k Data provider 1 provides m k+1 , ...m n .
[0174] Specifically, when a data providing device sends a data processing request to the data processing device 300, the data processing device 300 constructs a ciphertext calculation function corresponding to the data processing request, and then returns an encryption algorithm to the data providing device that provided the first private data. Based on this, if multiple data providing devices provide both first private data and second private data, the data processing device 300 returns encryption algorithms to each of these data providing devices. If some of the multiple data providing devices provide first private data and some provide second private data, the data processing device 300 returns encryption algorithms to the data providing devices that provided the first private data.
[0175] The data providing device for the first private data encrypts the first private data using the aforementioned encryption algorithm to obtain ciphertext of the first data. Each data providing device determines the ciphertext of the first private data and the second private data to be submitted anonymously. Specifically, the anonymous submission of the ciphertext of the first private data and the second private data by the data providing device can be achieved by sequentially encrypting the ciphertext of the first private data using the keys of multiple onion routers to obtain a first onion data packet, and then sequentially encrypting the second private data using the keys of multiple onion routers to obtain a second onion data packet. The first onion data packet and the second onion data packet are then transmitted through the onion routers.
[0176] Each time these onion data packets pass through an onion router, the encryption layer generated using that onion router's key is decrypted by that onion router. Thus, what reaches the data processing device 300 is the ciphertext of the first privacy data and the second privacy data. The data processing device 300 inputs the ciphertext of the first privacy data and the second privacy data into a ciphertext calculation function for processing to obtain the ciphertext of the data processing result. Then, the data processing device 300 returns the ciphertext of the data processing result to the data providing device that sent the data processing request. The data providing device executes the inverse algorithm of the encryption algorithm to decrypt the ciphertext of the data processing result, obtaining the data processing result.
[0177] In other implementations, multiple data providers can also provide data of the same dimension. When a data provider sends a data processing request to the data processing device 300, the data processing device 300, after constructing a ciphertext calculation function corresponding to the data processing request, returns the corresponding encryption algorithm to multiple data providers. Each data provider uses the encryption algorithm to encrypt the first private data to obtain ciphertext of the first private data, and then submits the ciphertext of the first private data and the second private data anonymously. The data processing device 300 uses the ciphertext calculation function to process the ciphertext of the first private data and the second private data submitted by each data provider, obtaining the ciphertext of the data processing result, and returns the ciphertext of the data processing result to the data provider that sent the data processing request. The data provider decrypts the ciphertext of the data processing result to obtain the data processing result.
[0178] To facilitate understanding of the technical solutions of this application, the embodiments of this application also provide a detailed description of the above data processing methods in conjunction with some specific scenarios.
[0179] A typical application in single-user scenarios is Software-as-a-Service (SaaS). SaaS provides a new software delivery model. Specifically, the software and its related data are hosted on cloud services, allowing users to access the software directly without the need for traditional software installation. In this delivery model, users typically use a streamlined client, such as a browser, to access the cloud service and use the software online. On the one hand, renting instead of buying reduces usage costs; on the other hand, eliminating the need for downloading and installation overcomes the limitations imposed by network and hardware performance on software usage.
[0180] In SaaS scenarios, users expect to maintain their personal privacy when accessing online services. When user privacy is critical but encrypted computation is prohibitively expensive, separating relatively private data can simplify privacy protection. By using efficient and low-cost anonymous communication networks to protect relatively private data, and handling only absolutely private data with expensive secure computations, overall data processing efficiency can be improved while ensuring privacy and security, thus meeting the privacy requirements of the General Data Protection Regulation (GDPR).
[0181] Specifically, many applications can be delivered using the SaaS model. For example, financial systems, collaborative software, customer relationship management, management information systems, enterprise resource planning, invoicing systems, human resource management, content management, and help desk management can all be delivered using the SaaS model.
[0182] Taking financial systems as an example, the financial information submitted by companies is all private data, but this private data can be further subdivided based on privacy levels. A company's business registration number, tax ID, stock code, specific address, bank account number, transaction counterparty information, dividend-paying shareholder information, loan bank information, VAT invoices, and audit information are typically absolute private data and cannot be disclosed. Information such as debt ratio, loan interest rate, dividend payout ratio, geographical location, tax rate, and credit rating are typically relatively private data.
[0183] In some implementation methods, information such as total expenditure, human resources expenditure, procurement expenditure, tax expenditure, insurance expenditure, interest expenditure, daily operating expenditure, administrative penalty expenditure, total revenue, sales revenue, fixed asset benefits, tax refund, total investment, and total loan amount can also be classified as relatively private data.
[0184] When users submit data to the financial system through a browser, they can encrypt absolutely private data such as business registration number, tax ID, and stock code. Then, the encrypted business registration number, tax ID, stock code, debt ratio, loan interest rate, and dividend distribution ratio can be submitted anonymously. This can significantly reduce the amount of encrypted input in the encrypted calculation function, reduce the amount of computation required for secure calculation, and improve calculation efficiency.
[0185] A typical application in multi-user scenarios is artificial intelligence (AI) model training. Training AI models typically requires collecting data from a large number of data subjects for machine learning. For example, training an intelligent diagnostic model requires collecting a large amount of patient test data. This test data can specifically include lab reports and / or scan images. To protect patient privacy, the test data for each patient is usually encrypted, and machine learning is then performed based on the ciphertext. Apart from the data subject's identity information such as name and contact information, most of this test data is relatively private. Therefore, most of the data only needs to be anonymized to meet privacy requirements, without the need for complex ciphertext calculations.
[0186] A concrete example is an intelligent medical diagnosis system, which needs to learn from a large amount of patients' various test data, including various laboratory reports (containing various blood and urine indicators) and scanned images (X-rays, ultrasound, MRI, etc.). As long as it is not linked to the patient's identity, this medical test data itself does not infringe on user privacy and can be anonymized and input into the AI model in plaintext for it to learn from. No matter how complex the machine learning algorithm for this relatively private data is, it will not get bogged down in inefficient encrypted computation, thereby improving computational efficiency.
[0187] The above text combined Figures 1 to 7The data processing method provided in the embodiments of this application has been described in detail. The apparatus, system and device provided in the embodiments of this application will be described below with reference to the accompanying drawings.
[0188] See Figure 3 The schematic diagram of the data processing device shown shows that the device 300 includes:
[0189] Communication module 302 is used to receive ciphertext of first privacy data and second privacy data, wherein the ciphertext of the first privacy data is obtained by encrypting the first privacy data using an encryption algorithm;
[0190] Processing module 304 is used to input the ciphertext of the first privacy data and the second privacy data into a ciphertext calculation function to obtain the ciphertext of the data processing result, wherein the ciphertext calculation function corresponds to the encryption algorithm;
[0191] The communication module 302 is also used to send the encrypted data processing result to the data providing device.
[0192] In some possible implementations, the data processing apparatus further includes a construction module 306.
[0193] The communication module 302 is also used to receive data processing requests sent by the data providing device;
[0194] The construction module 306 is used to construct the ciphertext calculation function according to the data processing requirements.
[0195] In some possible implementations, the data processing requirement includes an identifier of the encryption algorithm;
[0196] The construction module 306 is specifically used for:
[0197] Construct the ciphertext calculation function corresponding to the encryption algorithm based on the data processing requirements.
[0198] In some possible implementations, the ciphertext computation function includes a constant term;
[0199] The processing module 304 is specifically used for:
[0200] The second private data is input as a constant term into the ciphertext calculation function.
[0201] In some possible implementations, the data processing device is unable to decrypt the ciphertext of the first privacy data.
[0202] The data processing apparatus 300 according to the embodiments of this application can correspondingly execute the methods described in the embodiments of this application, and the above and other operations and / or functions of each module / unit of the data processing apparatus 300 are respectively for implementing Figure 4 For the sake of brevity, the corresponding processes of each method in the illustrated embodiments will not be described in detail here.
[0203] Next, see Figure 8 The diagram shown illustrates the structure of a data processing system 800, which includes:
[0204] The data providing device 400 is used to acquire first privacy data, encrypt the first privacy data with an encryption algorithm to obtain the ciphertext of the first privacy data, acquire second privacy data, and then send the ciphertext of the first privacy data and the second privacy data to the data processing device 300.
[0205] The data processing device 300 is used to input the ciphertext of the first privacy data and the second privacy data into the ciphertext calculation function to obtain the ciphertext of the data processing result, and send the ciphertext of the data processing result to the data providing device 400. The ciphertext calculation function corresponds to the encryption algorithm.
[0206] The data providing device 400 is also used to obtain the data processing result based on the encrypted data processing result.
[0207] In some possible implementations, the data providing device 400 is further configured to:
[0208] Obtain data processing requirements and send the data processing requirements to the data processing device;
[0209] The data processing device 300 is also used for:
[0210] The ciphertext calculation function is constructed based on the data processing requirements.
[0211] In some possible implementations, the data processing requirement includes an identifier of the encryption algorithm;
[0212] The data processing device 300 is specifically used for:
[0213] Construct the ciphertext calculation function corresponding to the encryption algorithm based on the data processing requirements.
[0214] In some possible implementations, the ciphertext computation function includes a constant term;
[0215] The data processing device 300 is specifically used for:
[0216] The data processing device inputs the second privacy data as a constant term into the ciphertext calculation function.
[0217] In some possible implementations, the data providing device 400 does not use the encryption algorithm to encrypt the second privacy data.
[0218] In some possible implementations, the data processing device 300 is unable to decrypt the ciphertext of the first privacy data.
[0219] In some possible implementations, the privacy level of the first privacy data is higher than that of the second privacy data.
[0220] In some possible implementations, the data providing device 400 is specifically used for:
[0221] Present the user interface to the user;
[0222] The privacy level input by the user is received through the user interface;
[0223] The first privacy data and the second privacy data are obtained from the user's input data according to the privacy level.
[0224] In some possible implementations, the data providing device 400 is further configured to:
[0225] The second privacy data is sent to the data processing device anonymously.
[0226] The data processing system 800 according to the embodiments of this application can correspondingly execute the methods described in the embodiments of this application, and the above and other operations and / or functions of each device of the data processing system 800 are respectively for implementing Figure 4 For the sake of brevity, the corresponding processes of each method in the illustrated embodiments will not be described in detail here.
[0227] This application embodiment also provides a device 900. The device 900 can be an edge device such as a laptop or desktop computer, or a computer cluster in a cloud or edge environment. The device 900 is specifically used to implement, for example... Figure 3 The data processing device 300 in the illustrated embodiment has the following functions.
[0228] Figure 9 A structural schematic diagram of a device 900 is provided, as follows: Figure 9 As shown, device 900 includes bus 901, processor 902, communication interface 903, and memory 904. Processor 902, memory 904, and communication interface 903 communicate with each other via bus 901.
[0229] The 901 bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0230] The processor 902 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).
[0231] The communication interface 903 is used for external communication. For example, it can receive encrypted first privacy data and second privacy data, receive data processing requests sent by the data providing device 400, and send encrypted data processing results to the data providing device 400, etc.
[0232] Memory 904 may include volatile memory, such as random access memory (RAM). Memory 904 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0233] The memory 904 stores executable code, and the processor 902 executes the executable code to perform the aforementioned data processing method.
[0234] Specifically, in achieving Figure 3 In the case of the illustrated embodiment, and Figure 3 When the modules of the data processing apparatus 300 described in the embodiment are implemented by software, the execution... Figure 3 The software or program code required for the functions of the processing module 304 and the construction module 306 are stored in the memory 904. The functions of the communication module 302 are implemented through the communication interface 903.
[0235] The communication interface 903 receives the ciphertext of the first privacy data and the second privacy data, and transmits them to the processor 902 via the bus 901. The processor 902 executes the program code corresponding to each module stored in the memory 904, such as the program code corresponding to the processing module 304, to perform the step of inputting the ciphertext of the first privacy data and the second privacy data into the ciphertext calculation function to obtain the ciphertext of the data processing result.
[0236] In some possible implementations, the communication interface 903 also receives data processing requests, which are transmitted to the processor 902 via the bus 901. The processor 902 executes the program code corresponding to each module stored in the memory 904, such as the program code corresponding to the construction module 306, to perform the step of constructing the ciphertext calculation function according to the data processing requests.
[0237] In some possible implementations, the data processing requirements include an identifier for the encryption algorithm. Processor 902 executes the program code corresponding to building module 306 to perform the following steps:
[0238] Construct the ciphertext calculation function corresponding to the encryption algorithm based on the data processing requirements.
[0239] In some possible implementations, the ciphertext calculation function includes a constant term. Processor 902 executes the program code corresponding to processing module 304 to perform the following steps:
[0240] The second private data is input as a constant term into the ciphertext calculation function.
[0241] In some possible implementations, the data processing device is unable to decrypt the ciphertext of the first privacy data.
[0242] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0243] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0244] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0245] The above description is merely a specific embodiment of this application. Any variations or substitutions conceived by those skilled in the art based on the specific embodiments provided in this application should be covered within the protection scope of this application.
Claims
1. A data processing method, characterized in that, A data processing system for providing secure computation to users using encrypted computation functions, the data processing system comprising a data providing device and a data processing device, the method comprising: The data providing device acquires first privacy data and encrypts the first privacy data using an encryption algorithm to obtain the ciphertext of the first privacy data. The data providing device acquires second privacy data; The data providing device sends the encrypted version of the first privacy data and the second privacy data to the data processing device; The data processing device inputs the ciphertext of the first privacy data and the second privacy data into the ciphertext calculation function to obtain the ciphertext of the data processing result. The ciphertext calculation function corresponds to the encryption algorithm. The data processing device sends the encrypted data processing result to the data providing device; The data providing device obtains the data processing result based on the encrypted data processing result; The ciphertext calculation function includes a constant term. The data processing device inputs the ciphertext of the first privacy data and the second privacy data into the ciphertext calculation function, including: The data processing device inputs the second privacy data as a constant term into the ciphertext calculation function.
2. The method according to claim 1, characterized in that, The method further includes: The data providing device acquires the data processing request and sends the data processing request to the data processing device. The data processing device constructs the ciphertext calculation function according to the data processing requirements.
3. The method according to claim 2, characterized in that, The data processing requirements include the identifier of the encryption algorithm; The data processing device constructs the ciphertext calculation function according to the data processing requirements, including: The data processing device constructs the ciphertext calculation function corresponding to the encryption algorithm according to the data processing requirements.
4. The method according to any one of claims 1 to 3, characterized in that, The data providing device does not use the encryption algorithm to encrypt the second privacy data.
5. The method according to any one of claims 1 to 3, characterized in that, The data processing device is unable to decrypt the ciphertext of the first privacy data.
6. The method according to any one of claims 1 to 3, characterized in that, The privacy level of the first privacy data is higher than that of the second privacy data.
7. The method according to any one of claims 1 to 3, characterized in that, The ciphertext for obtaining the first privacy data and the second privacy data include: The data providing device presents a user interface to the user. The data providing device receives the privacy level input by the user through the user interface; The data providing device obtains the first privacy data and the second privacy data from the user's input data according to the privacy level.
8. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The data providing device sends the second privacy data to the data processing device anonymously.
9. A data processing method, characterized in that, Applied to a data processing apparatus, the method includes: Receive the ciphertext of the first privacy data and the second privacy data, wherein the ciphertext of the first privacy data is obtained by encrypting the first privacy data using an encryption algorithm; The ciphertext of the first privacy data and the second privacy data are input into the ciphertext calculation function to obtain the ciphertext of the data processing result. The ciphertext calculation function corresponds to the encryption algorithm. Send the encrypted data processing result to the data providing device; The ciphertext calculation function includes a constant term. The data processing device inputs the ciphertext of the first privacy data and the second privacy data into the ciphertext calculation function, including: The data processing device inputs the second privacy data as a constant term into the ciphertext calculation function.
10. The method according to claim 9, characterized in that, The method further includes: Receive data processing requests sent by the data providing device; The ciphertext calculation function is constructed based on the data processing requirements.
11. The method according to claim 10, characterized in that, The data processing requirements include the identifier of the encryption algorithm; The step of constructing the ciphertext calculation function according to the data processing requirements includes: Construct the ciphertext calculation function corresponding to the encryption algorithm based on the data processing requirements.
12. The method according to any one of claims 9 to 11, characterized in that, The data processing device is unable to decrypt the ciphertext of the first privacy data.
13. A data processing system, characterized in that, The data processing system is used to provide secure computation for users using encrypted computation functions, and the data processing system includes a data providing device and a data processing device. The data providing device is configured to acquire first privacy data, encrypt the first privacy data using an encryption algorithm to obtain ciphertext of the first privacy data, acquire second privacy data, and send the ciphertext of the first privacy data and the second privacy data to the data processing device. The data processing device is used to input the ciphertext of the first privacy data and the second privacy data into the ciphertext calculation function to obtain the ciphertext of the data processing result, and send the ciphertext of the data processing result to the data providing device. The ciphertext calculation function corresponds to the encryption algorithm. The ciphertext calculation function includes a constant term. The data processing device is specifically used to input the second privacy data as the constant term into the ciphertext calculation function. The data providing device is further configured to obtain the data processing result based on the encrypted data processing result.
14. The system according to claim 13, characterized in that, The data providing device is also used for: Obtain data processing requirements and send the data processing requirements to the data processing device; The data processing device is also used for: The ciphertext calculation function is constructed based on the data processing requirements.
15. The system according to claim 14, characterized in that, The data processing requirements include the identifier of the encryption algorithm; The data processing device is specifically used for: Construct the ciphertext calculation function corresponding to the encryption algorithm based on the data processing requirements.
16. The system according to any one of claims 13 to 15, characterized in that, The data providing device does not use the encryption algorithm to encrypt the second privacy data.
17. The system according to any one of claims 13 to 15, characterized in that, The data processing device is unable to decrypt the ciphertext of the first privacy data.
18. The system according to any one of claims 13 to 15, characterized in that, The privacy level of the first privacy data is higher than that of the second privacy data.
19. The system according to any one of claims 13 to 15, characterized in that, The data providing device is specifically used for: Present the user interface to the user; The privacy level input by the user is received through the user interface; The first privacy data and the second privacy data are obtained from the user's input data according to the privacy level.
20. The system according to any one of claims 13 to 15, characterized in that, The data providing device is also used for: The second privacy data is sent to the data processing device anonymously.
21. A data processing apparatus, characterized in that, The device includes: The communication module is used to receive the ciphertext of the first privacy data and the second privacy data, wherein the ciphertext of the first privacy data is obtained by encrypting the first privacy data using an encryption algorithm; The processing module is used to input the ciphertext of the first privacy data and the second privacy data into the ciphertext calculation function to obtain the ciphertext of the data processing result. The ciphertext calculation function corresponds to the encryption algorithm and includes a constant term. The processing module is specifically used to input the second privacy data as the constant term into the ciphertext calculation function. The communication module is also used to send the encrypted data processing result to the data providing device.
22. The apparatus according to claim 21, characterized in that, The data processing device also includes a construction module; The communication module is also used to receive data processing requests sent by the data providing device; The construction module is used to construct the ciphertext calculation function according to the data processing requirements.
23. The apparatus according to claim 22, characterized in that, The data processing requirements include the identifier of the encryption algorithm; The building module is specifically used for: Construct the ciphertext calculation function corresponding to the encryption algorithm based on the data processing requirements.
24. The apparatus according to any one of claims 21 to 23, characterized in that, The data processing device is unable to decrypt the ciphertext of the first privacy data.
25. A device, characterized in that, The device includes a processor and a memory; The processor is configured to execute instructions stored in the memory to cause the device to perform the method as described in any one of claims 9 to 12.
26. A computer-readable storage medium, characterized in that, Includes instructions that instruct the device to perform the method as described in any one of claims 9 to 12.
27. A computer-readable storage medium, characterized in that, Includes instructions that instruct the data processing system to perform the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Federated learning data encryption method and device, equipment and readable storage medium
CN110601814A