An asynchronous privacy computing method based on smart contracts
Through an asynchronous privacy computing method based on smart contracts, the objective function is transformed by fitting polynomials, subtasks are established and smart contracts are constructed, which achieves efficient privacy computing, solves the low efficiency problem in existing technologies, and is suitable for large-scale data privacy computing.
Patent Information
- Application Number
- CN202111255585.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-27
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2041-10-27
AI Technical Summary
Existing privacy computing solutions are inefficient, cannot support large-scale data privacy computing needs, and lack privacy computing methods suitable for larger-scale use.
An asynchronous privacy computing method based on smart contracts is adopted. The objective function is transformed by fitting polynomials, subtasks are established and smart contracts are constructed. Participants perform privacy computing in an asynchronous manner and use public key encryption and multiplication operations to protect data privacy.
It achieves efficient privacy computing with high computational efficiency, is suitable for a wide range of application scenarios, does not require participants to be online at the same time, is convenient and fast to build and execute privacy computing, and effectively protects data privacy.
Smart Images

Figure CN114036583B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to an asynchronous privacy computing method based on smart contracts. Background Art
[0002] Data is a crucial factor driving industrial production and operations. Data can coordinate the operations of market players across different industries and divisions of labor, achieving more economical and efficient production and operations. It plays a significant role in improving industrial efficiency. In the current context of increasingly detailed industrial divisions of labor, the role of data is even more prominent. As one of the five major production factors, data has the following key characteristics compared to other production factors: it can be infinitely replicated, and its value increases with exchange and sharing. This leads to a natural contradiction in the use of data: while sharing and using data creates value, it can also lead to data leakage. This not only leads to privacy breaches, but once data is leaked, the value generated by other entities using the data no longer flows back to the data holder. Therefore, due to competitive considerations and privacy protection, data elements are currently limited to within enterprises or industry alliances, resulting in a relatively narrow application scope. The industry has proposed privacy computing technologies to make data available but invisible during use, balancing data value discovery with privacy protection. However, current privacy computing suffers from low efficiency and cannot yet support large-scale data privacy computing needs. Privacy computing has become a key topic of ongoing research within the industry.
[0003] For example, Chinese patent CN112765631A, published on May 7, 2021, describes a blockchain-based multi-party secure computing method. This involves a node randomly generating multiple obfuscated circuits with identical functions but different features; the remaining nodes each run a random transmission protocol with the node to obtain one of the obfuscated circuits; the remaining nodes compare the hash value of their own obfuscated circuits with the corresponding hash value uploaded to the blockchain by the node; the remaining nodes compete for computing rights based on their credit; the node that obtains the computing right obtains all encrypted data and the corresponding obfuscated circuit and begins computing, and then uploads the computational results to the blockchain through a smart contract for public display. This technical solution can alleviate the problems of unreliable trust and low security in existing secure multi-party computing technologies, but its use of obfuscated circuits to achieve data privacy is inefficient. Summary of the Invention
[0004] This invention addresses the current lack of privacy-preserving computing solutions suitable for widespread adoption. This paper proposes an asynchronous privacy-preserving computing method based on smart contracts, which can asynchronously establish privacy-preserving computing between participants, facilitating their participation.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: an asynchronous privacy computing method based on smart contracts, including: the initiating node establishes a fitting polynomial of the objective function and establishes a subtask, wherein the subtask includes a subtask number, a term coefficient and a product term; the initiating node constructs and publishes a smart contract, wherein the smart contract includes several participant identifiers, several variable names, a subtask hash value table, a subtask intermediate value table and a multiplier table, wherein the variable name corresponds one-to-one with the participant identifier, and the behavioral variable name of the multiplier table is listed as the participant identifier; the participant who decides to participate in the privacy computing writes his or her public key into the participant identifier, obtains the right to use the corresponding variable name, downloads and verifies the subtask and verifies whether the subtask hash value exists in the subtask. Hash value table; participants query the multiplier table. If there is a non-empty value in the row corresponding to their own variable name, they decrypt it and accept it as the multiplier. Based on the received multipliers, they randomly generate several multipliers to fill the row so that the product of the values in the row is equal to the privacy number. When filling in the multiplier, they encrypt it with the public key of the participant corresponding to the column; query the column corresponding to themselves. If there is an empty value in the column, they generate a random number, encrypt the random number with the public key of the participant corresponding to the row, and then fill it in; participants use the multipliers of all variable names in their corresponding column to calculate the value of each subtask, which is the intermediate value, and submit the intermediate value to the smart contract for storage; after all participants submit the intermediate values, the smart contract multiplies the intermediate values of the subtasks with the same subtask number with the term coefficient and sums them up, which is the privacy calculation result.
[0006] Preferably, the method for establishing a fitting polynomial of the objective function includes: generating sample data according to the objective function; establishing an initial expression of the fitting polynomial, the initial expression having initial term coefficients; and using the least squares method to calculate and obtain the optimal value of the term coefficients.
[0007] Preferably, the method for generating sample data according to the objective function includes: the initiating node generates a default value range for each independent variable in the objective function, and uniformly generates sampling points within the default value range; randomly combines the sampling points of the independent variables into value groups, substitutes the value groups into the objective function, and uses the result of the objective function as a label to mark the value groups as sample data.
[0008] Preferably, the method for generating sample data according to the objective function includes: an initiating node generates a default value range for each independent variable in the objective function; generating several distribution probability functions for each independent variable; selecting a distribution probability function for each independent variable, and generating sampling points according to the distribution probability function within the default value range; randomly combining the sampling points of the independent variables into value groups, substituting the value groups into the objective function, and using the result of the objective function as a label to mark the value groups as a group of sample data, and associating the sample data groups with the distribution probability function of each independent variable; traversing the distribution probability functions of the independent variables to obtain multiple sample data groups.
[0009] Preferably, the initiating node generates a public-private key group for the smart contract. When the smart contract receives a new subtask intermediate value, the subtask intermediate value is encrypted using the public key and then stored.
[0010] Preferably, after the initiating node establishes the fitting polynomial of the objective function, it performs a safety check on the fitting polynomial, the safety check including: grouping the product terms according to the independent variables contained in each product term in the fitting polynomial; recording the number of independent variables involved in the product terms as the order of the group; if the number of product terms contained in the group is not less than the order of the group, the fitting polynomial is judged to be unsafe; extracting groups whose number of product terms is not less than the order of the group, and sorting the product terms in the group in descending order of the sum of the number of independent variables; deleting items one by one starting from the last item in the sorting until the number of product terms is less than the order of the group; optimizing the fitting polynomial with some product terms deleted again using the least squares method to obtain the optimized item coefficients.
[0011] Preferably, a confusion variable is generated, and the value of the confusion variable is from the interval [M-ω,M+ω], where M and ω are preset constants. The confusion variable is included in the initial expression of the fitting polynomial, and several values of the confusion variable are generated. The values of the confusion variable are included in a value group, and the output of the objective function is used as a label to mark the value group. The marked value group is used as sample data to train the fitting polynomial. The confusion variable is regarded as the privacy number of the initiating node. When performing privacy calculation, the initiating node writes its own public key into the participant identifier corresponding to the confusion variable, and the initiating node generates a random number as the value of the confusion variable to participate in the privacy calculation.
[0012] The substantial effect of the present invention is: using a fitting polynomial to fit the target function, the target function is converted into a more unified form, which facilitates the implementation of privacy computing. Theoretically, the polynomial can fit any function, so this method has a wide range of applications. The calculation of the fitting polynomial only involves multiplication and addition, and the operation efficiency is high. The privacy computing is established in an asynchronous manner, and participants do not need to be online at the same time, making the construction of privacy computing convenient and fast. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 Schematic diagram of the asynchronous privacy computing method in Example 1.
[0014] Figure 2 Schematic diagram of the polynomial fitting method for establishing the objective function in Example 1.
[0015] Figure 3 This is a schematic diagram of a method for generating sample data according to an objective function in Example 1.
[0016] Figure 4 This is a schematic diagram of a method for generating sample data considering distribution probability according to Example 1.
[0017] Figure 5 Schematic diagram of the safety inspection method of Example 1. DETAILED DESCRIPTION
[0018] The specific implementation of the present invention will be further described below with reference to specific embodiments and in conjunction with the accompanying drawings.
[0019] Example 1:
[0020] An asynchronous privacy computing method based on smart contracts, please see the attached Figure 1 The method includes: step A01) the initiating node establishes a fitting polynomial of the objective function and establishes a subtask, wherein the subtask includes a subtask number, a term coefficient, and a product term; step A02) the initiating node constructs and publishes a smart contract, wherein the smart contract includes a number of participant identifiers, a number of variable names, a subtask hash value table, a subtask intermediate value table, and a multiplier table. The variable names correspond to the participant identifiers one by one, and the behavioral variable name of the multiplier table is listed as the participant identifier; step A03) the participant who decides to participate in the privacy calculation writes his or her public key into the participant identifier and obtains the right to use the corresponding variable name, downloads and verifies the subtask and verifies whether the subtask hash value exists in the subtask hash value table; step A04) the participant queries the multiplier table. If the corresponding If a row containing a variable name has a non-null value, it is decrypted and accepted as a multiplier. Based on the received multipliers, several random multipliers are generated to fill the row, so that the product of the values in the row equals the privacy number. The multipliers are encrypted using the public key of the participant corresponding to the column. Step A05) Query the corresponding column. If the column contains a null value, a random number is generated, encrypted using the public key of the participant corresponding to the row, and then filled in. Step A06) The participant uses the multipliers of all variable names in the corresponding column to calculate the value of each subtask, which is the intermediate value. This intermediate value is submitted to the smart contract for storage. Step A07) After all participants have submitted their intermediate values, the smart contract multiplies the intermediate values of the subtasks with the term coefficients and sums them to form the privacy calculation result. The initiating node generates a public-private key pair for the smart contract. When the smart contract receives a new intermediate value for a subtask, it encrypts it with the public key and stores it. This ensures that the intermediate value remains confidential to the participants, further protecting data privacy and enhancing privacy security.
[0021] Please see the attached Figure 2 In this embodiment, the method for establishing a fitting polynomial of the objective function includes: step B01) generating sample data according to the objective function; step B02) establishing an initial expression of the fitting polynomial, the initial expression having initial term coefficients; step B03) using the least squares method to calculate and obtain the optimal value of the term coefficient.
[0022] Please see the attached Figure 3The method for generating sample data according to the objective function includes: step C01) the initiating node generates a default value range for each independent variable in the objective function, and uniformly generates sampling points within the default value range; step C02) randomly combines the sampling points of the independent variables into value groups, substitutes the value groups into the objective function, and uses the result of the objective function as a label to mark the value groups as sample data.
[0023] The sample determines the result of fitting the polynomial and the distribution of the error. Uniformly generating sampling points results in a relatively uniform error distribution within the value range, but this also brings about the problem of decreased accuracy within a specific interval. In practical applications, the privacy number of each participant has a unique distribution probability within the value range. If the distribution probability of the privacy number can be met, the accuracy of the fitting polynomial can be improved. Since the participants in the privacy calculation are still uncertain, this embodiment pre-generates a sample data generation method that takes distribution probability into account by giving examples of several distribution probability functions. Please refer to the attached Figure 4 The method for generating sample data based on the objective function includes: Step C11) the initiating node generates a default value range for each independent variable in the objective function; Step C12) generating several distribution probability functions for each independent variable; Step C13) selecting a distribution probability function for each independent variable and generating sampling points within the default value range according to the distribution probability function; Step C14) randomly combining the independent variable sampling points into value groups, substituting the value groups into the objective function, and labeling the value groups with the results of the objective function as a set of sample data. The sample data groups are then associated with the distribution probability function of each independent variable; Step C15) traversing the distribution probability functions of the independent variables to obtain multiple sample data groups. When performing privacy calculations, each participant selects the distribution probability function that is closest to the distribution probability of their own private number based on the publicly available distribution probability function, thereby selecting the fitting polynomial that is closest to the distribution probability of all independent variables.
[0024] After the initiating node establishes the fitting polynomial of the objective function, it performs a safety check on the fitting polynomial. Figure 5 The safety check includes: step D01) grouping the product terms according to the independent variables contained in each product term in the fitting polynomial; step D02) recording the number of independent variables involved in the product terms as the order of the group; step D03) if the number of product terms contained in the group exceeds the order of the group, then judging that the fitting polynomial is unsafe; step D04) extracting the groups whose number of product terms exceeds the order of the group, and sorting the product terms in the groups in descending order of the sum of the times of the independent variables; step D05) deleting the items one by one starting from the last item in the sorting until the number of product terms is less than the order of the group; step D06) optimizing the fitting polynomial with some product terms deleted again using the least squares method to obtain the optimized item coefficients.
[0025] Generate a confounding variable, whose value ranges from the interval [M-ω,M+ω], where M and ω are preset constants. The initial expression of the fitting polynomial includes the confounding variable. Generate several values for the confounding variable and include them in a value group. Label the value group using the output of the objective function. The labeled value group serves as sample data for training the fitting polynomial. The confounding variable is considered the private number of the initiating node. When performing a private computation, the initiating node writes its public key into the participant identifier corresponding to the confounding variable. The initiating node generates a random number as the value of the confounding variable and participates in the private computation. Using confounding variables can further improve data privacy, but it also increases computational complexity. When the network environment for private computation is secure and malicious nodes are rare, if participants require offline review or meet certain credit requirements before participating, or if the impact of leaking private numbers is small or short-term, generating confounding variables is unnecessary.
[0026] The beneficial technical effect of this embodiment is: using a fitting polynomial to fit the objective function, the objective function is converted into a more unified form, which facilitates the implementation of privacy computing. In theory, the polynomial can fit any function, so this method has a wide range of applications. The calculation of the fitting polynomial only involves multiplication and addition, and the operation efficiency is high. The privacy computing is established in an asynchronous manner, and participants do not need to be online at the same time, making the construction of privacy computing convenient and fast.
[0027] Example 2:
[0028] An asynchronous privacy-preserving computation method based on smart contracts is used to evaluate offline mobile phone consumer sentiment in a specific city. The city boasts multiple mobile phone markets and several mobile phone dealers. The participants in the privacy computation are the dealers, and the privacy number represents the dealers' quarterly sales volume. Consumer sentiment is calculated based on the offline sales of Brand A and Brand B mobile phones. Brands A and B represent high-end and low-end mobile phones, respectively. Dealers A, B, and C are the primary dealers, with Dealer A selling Brand A, Dealer B selling Brand B, and Dealer C selling both Brands A and B. The objective function is: Consumer sentiment = K1*Total Sales Volume + K2*Total Sales Volume^2 / Total Sales Volume^2 of the Same Period Last Year. Both total sales volume and sales volume refer to quarterly sales volume. K1 through K3 are weighting coefficients, with the total sales volume of the same period last year being a known constant. Distributor A writes the objective function expression as: f(x1,x2,x3,x4)=K1*(x1+x2+x3+x4)+K2*(x1+x2+x3+x4)^2 / Z^2, where x1 represents Distributor A's sales of Brand A phones, x2 represents Distributor B's sales of Brand B phones, and x3 and x4 represent Distributor C's sales of Brand A and Brand B phones, respectively. Because the results of polynomial fitting are not unique, the same objective function can have countless fitting polynomials with errors within a preset range. Therefore, in practice, if the fitting polynomial is properly fitted, the calculated error should be within an acceptable range, even though the specific product terms may vary. Furthermore, the polynomial has a unified general formula for the product terms: K*x1^i1*x2^i2*…*xn^in, where K is the term coefficient and n is the number of independent variables involved in the polynomial. i1 through in are the exponents of the independent variables in the product term, ranging from [1, m], where m is the maximum exponent. The general formula can also be written as ∏Kxj^i_j, where j∈[1, n] and i_j∈[1, m].
[0029] In this embodiment, the objective function itself is in the form of a polynomial. For convenience, this embodiment will take the form of the objective function as an example to describe the implementation method of the fitted polynomial. Dealer A builds a smart contract, which includes {{Comp1, Comp2, Comp3, Comp4}, {x1, x2, x3, x4}, {SubHash_8, SubHash_13, SubHash_14, SubHash_17, SubHash_23, SubHash_27, SubHash_31, …}, {{8|t_value1, t_value2, t_value3, t_value4}, {14|t_value1, t_value2, t_value3, t_value4}, …}, T_mult[4][4]}, where Comp1~4 are participant identifiers, x1~4 are variable names, and SubHash_8 is the subtask hash value.
[0030] Subtask 8 is {8, 2*K² / Z², x1*x²}, where 8 is the subtask number, 2*K² / Z² is the term coefficient, x1*x² is the product term, and the subtask number is a random number. The smart contract is published on the blockchain. Dealers B and C are the participants who decide to participate in the privacy-preserving computation. They do not need to connect to the blockchain immediately; instead, they can connect to the blockchain at their own pace and interact with the smart contract to implement the privacy-preserving computation. Dealers B and C download the subtask from Dealer A and verify that the subtask's hash value exists in the subtask hash value table. After verification, the privacy-preserving computation begins.
[0031] Since Dealer A built and published the smart contract, it should be the first participant to interact with the smart contract and perform privacy-preserving computations. Dealer A registers as Comp1, obtains access to variable name x1, and uploads its public key. Comp1 is then rewritten to Dealer A's public key. Dealer B and Dealer C subsequently connect to the blockchain. Dealer C registers as Comp2, obtains access to x2, and rewrites Comp2 to its own public key. Dealer C registers and rewrites Copm3 and Comp4 to its own public key, obtaining access to x3 and x4.
[0032] After Dealer C completes registration, he discovers that the participant IDs have already been assigned, allowing him to begin private computation directly. He then proceeds to step A04, where he queries the rows corresponding to x3 and x4 in the multiplier table and finds that both are empty. He then generates four x3 multipliers, denoted as x3 = x31 * x32 * x33 * x34. He encrypts x31 through x34 using the public keys of Comp1 through Comp4, respectively, and enters the multiplier table. Dealer C then generates four x4 multipliers, denoted as x4 = x41 * x42 * x43 * x44. He encrypts x41 through x44 using the public keys of Comp1 through Comp4, respectively, and enters the multiplier table. Dealer C queries his own columns and finds that the rows corresponding to x1 and x2 are both empty. He then generates two random numbers for x1, x13 and x14, and encrypts them using the public keys of Comp1 and Comp2, respectively, before entering the multiplier table. Two random numbers for x2 are generated, x23 and x24. These are encrypted using the public keys corresponding to Comp1 and Comp2, respectively, and then entered into the multiplier table. At this point, the multipliers are already entered into the Comp3 and Comp4 columns of the multiplier table corresponding to Dealer C. Therefore, the intermediate value of each subtask can be calculated using the multipliers in the Comp3 column and the Comp4 column, respectively. These intermediate values are associated with Comp3 and Comp4 and sent to the smart contract. Dealer A then connects to the blockchain and interacts with the smart contract. It queries the row of the multiplier table corresponding to x1 and finds that two multipliers have already been entered. It decrypts the multipliers using Comp1's private key. Dealer A then generates multipliers x11 and x12, such that x1 = x11*x12*x13*x14. These x11 and x12 are encrypted using the public keys of Comp1 and Comp2, respectively, and then entered into the multiplier table. Dealer A queries the column corresponding to Comp1 and finds a null value in the row corresponding to x2. It then generates a random number, x21, as the multiplier of x2. It encrypts this number with Comp2's public key and enters the multiplier table. Dealer A can then use x11, x21, x31, and x41 to calculate the intermediate value of each subtask. For example, the intermediate value of subtask {8, 2*K2 / Z^2, x1*x2} is calculated as: T8_Comp1 = x11*x21. {8, T8_Comp1} is then sent to the smart contract. Since the smart contract only knows the subtask number and not the product term, it is unaware that T8_Comp1 is the multiplication of x1 and x2. After multiplying all the intermediate values of subtask 8, the smart contract cannot match the result to the product term, thus protecting the values of x1 and x2 from being leaked. To further ensure the security of private data, the blockchain assigns public and private keys to smart contracts. Smart contracts encrypt and store intermediate values using the public key. When multiplying the intermediate values of subtasks, they decrypt the values using the private key. The public and private keys of smart contracts are publicly available on the blockchain intranet but remain confidential to all participants.This requires that the participants themselves not be nodes on the blockchain. This requirement is easily met in consortium chains, but more complex in public chains. Therefore, this embodiment is suitable for implementation on consortium chains. In this embodiment, connecting to the blockchain means that the participant establishes a communication connection with the blockchain's miners and requests information stored in the smart contract from the miners. As long as the waiting time required by the consensus mechanism is met, each miner possesses all data on the blockchain. Here, the miners are considered heavy-node miners. The smart contract operation mechanism has been described in this embodiment. Therefore, when Dealer A constructs and publishes the smart contract, it also includes the permitted read and write instructions in the smart contract. The participant sends the content to be read to the miner, who reads it, and sends the content to be written to the miner, who writes it into the smart contract. This means that participants cannot directly connect to the blockchain's intranet and instead rely on the miners to interact with the smart contract.
[0033] Finally, Dealer B, who connects to the blockchain, reads the multiplier table and finds that the row corresponding to x2 has only one null value. Therefore, it generates x22, such that x22 satisfies x2 = x21 * x22 * x23 * x24. At the same time, it queries its own column and finds all non-null values. Therefore, it can directly use the multipliers in the multiplier table to calculate the intermediate value of the subtask.
[0034] After all the intermediate values of all subtasks are written into the smart contract, the smart contract multiplies the intermediate values of each subtask together and then multiplies the result by the term coefficient. For example, the subtask {8, 2*K2 / Z^2, x1*x2} has four intermediate values: T8_Comp1=x11*x21, T8_Comp2=x12*x22, T8_Comp3=x13*x23, and T8_Comp4=x14*x24. Multiplying all these intermediate values together yields Temp8=x11*x21*x12*x22*x13*x23*x14*x24=x1*x2. Then, multiplying Temp8 by the term coefficient 2*K2 / Z^2 yields the value of the corresponding product term in the fitting polynomial. After all the product terms are calculated, summing them together yields the value of the fitting polynomial, which is the fitting result of the objective function and is considered the result of the privacy calculation.
[0035] The embodiment described above is only a preferred solution of the present invention and does not limit the present invention in any form. Other variations and modifications are possible without exceeding the technical solution described in the claims.
Claims
1. An asynchronous privacy computing method based on smart contracts, characterized in that: include: The initiating node establishes a fitting polynomial of the objective function and establishes a subtask, wherein the subtask includes a subtask number, a term coefficient, and a product term; The initiating node builds and publishes a smart contract, which includes several participant identifiers, several variable names, a subtask hash value table, a subtask intermediate value table, and a multiplier table. The variable names correspond one-to-one with the participant identifiers, and the behavioral variable names in the multiplier table are listed as the participant identifiers. Participants who decide to participate in privacy computing write their public keys into the participant ID, obtain the right to use the corresponding variable name, download and verify whether the subtask hash value exists in the subtask hash value table; The participant queries the multiplier table. If there is a non-empty value in the row corresponding to their variable name, they decrypt and accept the non-empty value as the multiplier. Based on the accepted multiplier, they randomly generate several multipliers to fill the row so that the product of the values in the row equals the privacy number. When filling in the multiplier, they encrypt it with the public key of the participant corresponding to the column. Query the corresponding column. If there is a null value in the column, generate a random number, encrypt the random number using the public key of the participant corresponding to the row, and then fill it in. Participants use the multiplier of all variable names in their corresponding column to calculate the value of each subtask, which is the intermediate value. The intermediate value is submitted to the smart contract and stored in the subtask intermediate value table; After all participants submit their intermediate values, the smart contract multiplies the intermediate values of the subtasks with the same subtask number by the term coefficient and sums them up, which is the privacy calculation result.
2. The asynchronous privacy computing method based on smart contracts according to claim 1, characterized in that: Methods for establishing the fitting polynomial of the objective function include: Generate sample data according to the objective function; Establishing an initial expression of the fitting polynomial, the initial expression has initial term coefficients; The least squares method is used to calculate the optimal value of the term coefficient.
3. The asynchronous privacy computing method based on smart contracts according to claim 2, characterized in that: Methods for generating sample data based on the objective function include: The initiating node generates a default value range for each independent variable in the objective function and evenly generates sampling points within the default value range; The sampling points of the independent variables are randomly combined into value groups, and the value groups are substituted into the objective function. The result of the objective function is used as a label to mark the value groups as sample data.
4. The asynchronous privacy computing method based on smart contracts according to claim 2, characterized in that: Methods for generating sample data based on the objective function include: The initiating node generates a default value range for each independent variable in the objective function; Generate several distribution probability functions for each independent variable; A distribution probability function is selected for each independent variable, and sampling points are generated according to the distribution probability function within the default value range; Randomly combine the sampling points of the independent variables into value groups, substitute the value groups into the objective function, use the result of the objective function as a label to mark the value groups as a set of sample data, and associate the sample data group with the distribution probability function of each independent variable; Traverse the distribution probability function of the independent variable to obtain multiple sample data groups.
5. The asynchronous privacy computing method based on smart contracts according to any one of claims 1 to 4, characterized in that: The initiating node generates a public-private key group for the smart contract. When the smart contract receives a new subtask intermediate value, it encrypts the subtask intermediate value using the public key and stores it.
6. The asynchronous privacy computing method based on smart contracts according to any one of claims 1 to 4, characterized in that: After the initiating node establishes the fitting polynomial of the objective function, it performs a security check on the fitting polynomial. The security check includes: Group the product terms according to the independent variables contained in each product term in the fitted polynomial; The number of independent variables involved in the product term is recorded as the order of the group; If the number of product terms contained in the group exceeds the order of the group, the fitted polynomial is judged to be unsafe; Extract the groups whose number of product terms exceeds the order of the group, and sort the product terms in the group in descending order of order; Delete items one by one starting from the last item until the number of product items is less than the order of the group; The fitting polynomial with some product terms deleted is optimized again using the least squares method to obtain the optimized term coefficients.
7. The asynchronous privacy computing method based on smart contracts according to any one of claims 2 to 4, characterized in that: Generate a confounding variable, where the value of the confounding variable is in the interval [M-ω,M+ω], where M and ω are both preset constants. The confounding variable is included in the initial expression of the fitting polynomial. Generate several values of the confounding variable, incorporate the values of the confounding variable into a value group, label the value group using the output of the objective function as a label, and use the labeled value group as sample data to train the fitting polynomial. The confounding variable is regarded as the privacy number of the initiating node. When performing privacy calculation, the initiating node writes its own public key into the participant identifier corresponding to the confounding variable. The initiating node generates a random number as the value of the confounding variable to participate in the privacy calculation.
Citation Information
Patent Citations
Multi-party security computing method based on block chain
CN112765631A
Privacy-protecting intelligent contract model and implementation method thereof
CN113393238A
Data transaction platform for protecting data privacy
CN113538152A