Privacy algorithm construction method, device, electronic device and readable storage medium

By dividing the complex nonlinear functions used in safe multi-party calculations into multiple numerical intervals and building target polynomials, the problems of large calculation amount and low efficiency are solved, and the calculation amount and efficiency are improved.

CN115081020BActive Publication Date: 2025-02-11HUAKONG TSINGJIAO INFORMATION SCI BEIJING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210745438.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2025-02-11
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

In the safe multi-party computing process, the use of complex nonlinear functions leads to problems such as large calculation volume and low calculation efficiency.

Method used

Replace the original function for privacy calculations by dividing the original smooth nonlinear function into multiple numerical intervals and building the target polynomial within each interval.

Benefits of technology

The calculation amount in the privacy calculation process is reduced, the calculation efficiency is improved, and the order of the polynomial is adaptively adjusted, which meets the requirements of privacy calculations for data length.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115081020B_ABST
    Figure CN115081020B_ABST
Patent Text Reader

Abstract

The present application provides a privacy algorithm construction method, device, electronic device and readable storage medium, wherein the method includes: dividing the current numerical interval of the original function into M numerical intervals; the original function is a smooth nonlinear function used for privacy computing; for a target numerical interval, determining the target order of the target numerical interval according to a first value and a second value in the target numerical interval, the first value being the maximum absolute value in the target numerical interval, the second value being the minimum absolute value, and the target numerical interval being any numerical interval among the M numerical intervals; constructing a target polynomial of the target numerical interval according to the original function, the highest order of the target polynomial being no greater than the target order; fusing all currently obtained polynomial sets to obtain a target function, the target function being used to replace the original function for privacy computing, and the input parameters of the target function including confidential data for privacy computing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of decentralized computing technology, and more specifically, to a privacy algorithm construction method, device, electronic device, and readable storage medium. Background Art

[0002] Secure Multi-Party Computation is mainly aimed at realizing the secure calculation of an agreed function without a trusted third party. In order to ensure the security of data of all parties, the process of secure multi-party computing usually adopts privacy computing to realize the processing of multi-party data. Therefore, in the process of secure multi-party computing, if the agreed function used is a relatively complex function, the amount of calculation is large and the calculation efficiency is often unacceptable. Summary of the invention

[0003] The purpose of this application is to provide a privacy algorithm construction method, device, electronic device and computer-readable storage medium, which can improve the problems of large computational complexity and low computational efficiency of privacy computing in the secure multi-party computing process, so as to improve the computational efficiency of privacy computing.

[0004] In a first aspect, the present invention provides a privacy algorithm construction method, comprising:

[0005] Divide the current numerical interval of the original function into M numerical intervals; the original function is a smooth nonlinear function used for privacy computing. When the numerical interval is divided for the first time, the current numerical interval is the value range of the original function, and M is a positive integer greater than 1;

[0006] For a target numerical interval, determining a target order of the target numerical interval according to a first value and a second value in the target numerical interval, wherein the first value is a maximum absolute value in the target numerical interval, the second value is a minimum absolute value, and the target numerical interval is any one of the M numerical intervals;

[0007] According to the primitive function, construct a target polynomial of the target numerical interval, wherein the highest order of the target polynomial is not greater than the target order;

[0008] All currently obtained polynomial sets are fused to obtain a target function, which is used to replace the original function for privacy computing.

[0009] In an optional implementation manner, determining a target order of the target numerical interval according to the first value and the second value in the target numerical interval includes:

[0010] If the first value is not less than a first preset value, then according to a first rule, a first target order is calculated using fixed-point number configuration parameters;

[0011] If the target numerical value interval does not include a zero point, then according to a second rule, a second target order is calculated using the fixed-point number configuration parameters;

[0012] A minimum value is selected from the first target order and the second target order as a target order.

[0013] In an optional implementation, the first target order is calculated using the fixed-point configuration parameters according to the first rule by the following formula:

[0014]

[0015] Among them, k O represents the first target order, n and f represent fixed-point configuration parameters, represents the first value;

[0016] According to the second rule, the second target order is calculated using the fixed-point number configuration parameters by the following formula:

[0017]

[0018] Among them, k U represents the second target order, Indicates the second value.

[0019] Through the above implementation, a target order without overflow or underflow in a target numerical range can be determined. Further, the determined polynomial can better meet the requirements of secure multi-party computing and improve the accuracy and precision of secure multi-party computing.

[0020] In an optional implementation manner, determining the target order of the target numerical interval according to the first value and the second value in the target numerical interval further includes:

[0021] If the first value is less than or equal to a first preset value, determining the first target order as a first specified value;

[0022] If the target value interval includes a zero point, the second target order is determined as a second specified value.

[0023] In an optional implementation manner, constructing a target polynomial of the target numerical interval according to the primitive function includes:

[0024] Performing an interpolation algorithm on a plurality of points of the primitive function in the target numerical interval to determine an initial polynomial of the target numerical interval;

[0025] The coefficients of each item in the initial polynomial are adjusted to fixed-point numbers to obtain a target polynomial.

[0026] In an optional implementation, performing an interpolation algorithm on a plurality of points of the primitive function in the target numerical interval to determine an initial polynomial of the target numerical interval includes:

[0027] If the length of the target numerical interval is greater than a first threshold, an initial polynomial is determined using a Chebyshev interpolation method according to a point of the first numerical value determined in the target numerical interval, and the initial polynomial is a polynomial of a target order;

[0028] If the length of the target numerical interval is less than the first threshold, the update order is determined according to the first numerical value; based on the point where the first numerical value is determined in the target numerical interval, the initial polynomial of the update order is determined using the Lagrange interpolation method.

[0029] In the above implementation, different interpolation methods are used in different situations, so that the determined target polynomial can better represent the original function. Therefore, it is possible to reduce the amount of calculation while maintaining the calculation accuracy.

[0030] In an optional implementation manner, adjusting coefficients of each term in the initial polynomial to fixed-point numbers to obtain a target polynomial includes:

[0031] If the first coefficient in the initial polynomial is greater than the fixed-point upper limit value, update the first coefficient to the fixed-point upper limit value, the first coefficient being any coefficient in the initial polynomial;

[0032] If the second coefficient in the initial polynomial is less than the fixed-point lower limit value, update the second coefficient to a specified value, where the second coefficient is any coefficient in the initial polynomial;

[0033] If the number of significant digits of the value in the third coefficient of the initial polynomial is greater than the fixed-point precision length, the value after the decimal point fixed-point precision length in the third coefficient is set to zero to obtain an updated third coefficient, and the third coefficient is any coefficient in the initial polynomial.

[0034] Through the above-mentioned coefficient adjustment method, the coefficients of the determined polynomial can be made closer to the coefficients of the originally determined polynomial, and the target polynomial can also better characterize the original function, so as to maintain a certain calculation accuracy while reducing the amount of calculation.

[0035] In a second aspect, the present invention provides a privacy algorithm construction device, comprising:

[0036] An interval division module, used to divide the current numerical interval of the original function into M numerical intervals; the original function is a smooth nonlinear function used for privacy computing, when the numerical interval is divided for the first time, the current numerical interval is the value range of the original function, and M is a positive integer greater than 1;

[0037] an order determination module, for determining, for a target numerical interval, a target order of the target numerical interval according to a first value and a second value in the target numerical interval, wherein the first value is a maximum absolute value in the target numerical interval, the second value is a minimum absolute value, and the target numerical interval is any one of the M numerical intervals;

[0038] A polynomial construction module, used to construct a target polynomial of the target numerical interval according to the primitive function, wherein the highest order of the target polynomial is not greater than the target order;

[0039] The function acquisition module is used to fuse all the currently obtained polynomial sets to obtain the target function, and the target function is used to replace the original function for privacy computing. The input parameters of the target function include confidential data for privacy computing.

[0040] In a third aspect, the present invention provides an electronic device, comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable instructions are executed by the processor to perform the steps of the method described in any of the aforementioned embodiments.

[0041] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in any of the aforementioned embodiments are executed.

[0042] The beneficial effects of the embodiments of the present application include at least: by replacing the original smooth nonlinear function used for privacy computing with a function composed of polynomials with relatively low computational complexity, the computational complexity in the privacy computing process can be reduced, thereby improving the efficiency of privacy computing. Furthermore, when constructing a polynomial, the order of the polynomial can be adaptively adjusted based on the length of the numerical interval corresponding to the constructed polynomial, so that the determined polynomial can better meet the privacy computing requirements for the length of the calculated data. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 A schematic diagram of the operating environment of the secure multi-party computing system provided in an embodiment of the present application;

[0045] Figure 2 A block diagram of an electronic device provided in an embodiment of the present application;

[0046] Figure 3 A flowchart of a privacy algorithm construction method provided in an embodiment of the present application;

[0047] Figure 4 An optional flow chart of step 230 of the privacy algorithm construction method provided in an embodiment of the present application;

[0048] Figure 5 A schematic diagram of the functional modules of the privacy algorithm construction device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application.

[0050] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0051] Secure Multi-Party Computation (SMC) is mainly aimed at realizing the secure calculation of an agreed function without a trusted third party. SMC is the cryptographic basis for many applications such as electronic elections, threshold signatures, and electronic auctions.

[0052] The inventor of this application has found that in order to protect the security of data in the platforms of all parties during secure multi-party computing, the calculation is performed based on the secret data provided by the platforms of all parties. This will make the calculation of nonlinear functions very difficult during secure multi-party computing and require huge R&D costs. Generally speaking, the secure computing service provider will provide some basic nonlinear functions, such as e x , For other more complex nonlinear functions, they are expanded into basic operations. For example, the ciphertext variable x is calculated The calculation method is: first calculate the ciphertext y = e -x , and then calculate the ciphertext result This solution requires the continuous calculation of two basic nonlinear functions: e exponentiation and division. This calculation method has at least the following problems: 1) High cost: Since the basic nonlinear function requires large computing resources, the computational cost of other nonlinear functions is basically equivalent to the serial execution of each basic nonlinear function. The cost is proportional to the complexity of the expression, which ultimately leads to a very large amount of calculation and the computational efficiency is often unacceptable; 2) Low precision: In the scenario of secure multi-party computing, fixed-point numbers are generally used to represent real numbers, that is, an n-bit integer is used. Multiply by a certain resolution factor 2 -f To represent any real number v, The precision limit of each fixed-point number is 2 -f , which is much smaller than the floating point number commonly used in plain text. When performing operations, there is a certain error in each step of the calculation. When calculating nonlinear functions, the error will accumulate layer by layer with the calculation steps, resulting in a large difference between the final calculation result and the true value.

[0053] Therefore, the inventor of the present application has proposed a method to use polynomials to represent complex nonlinear functions. When solving a polynomial that minimizes the maximum approximation error in a closed interval, the representation range and representation accuracy of the numerical values ​​are usually very high, and are generally implemented using double-precision floating-point numbers. However, in the environment of secure multi-party computing, fixed-point numbers are usually used to represent real numbers, and there may be some limitations on the representation range and representation accuracy. Constructing a k-order fixed-point polynomial that minimizes the maximum error in a closed interval [a, b] is equivalent to an NP-complete integer programming problem, and there is no solution algorithm in polynomial time. In order to better meet the needs of fixed-point polynomials in a secure multi-party computing environment, based on the above research, the present application provides a privacy algorithm construction method, which converts the nonlinear function used for secure multi-party computing into a piecewise polynomial to reduce the computational complexity, improve the computational efficiency, and also improve the efficiency of polynomial construction. The following is described through some embodiments.

[0054] To facilitate understanding of this embodiment, the operating environment for executing the privacy computing method disclosed in the embodiment of this application is first introduced.

[0055] The privacy computing method may be used in a secure multi-party computing system 10, which may include a multi-party electronic device 110. Figure 1As shown, the electronic device 110 may be a network server, a database server, etc.; it may also be a personal computer (PC), a tablet computer, a smart phone, a personal digital assistant (PDA), etc.

[0056] Any electronic device 110 in the secure multi-party computing system 10 can process data through privacy computing without obtaining plaintext data from other electronic devices 110.

[0057] Each electronic device 110 may store an objective function for privacy computing. The objective function may be constructed by any electronic device 110 , or may be constructed by an electronic device that can communicate with each electronic device 110 in the secure multi-party computing system 10 .

[0058] like Figure 2 , which is a block diagram of an electronic device. The electronic device 110 may include a memory 111 and a processor 113. A person skilled in the art may understand that Figure 2 The structure shown is only for illustration and does not limit the structure of the electronic device 110. For example, the electronic device 110 may also include Figure 2 More or fewer components as shown, or with Figure 2 Different configurations shown.

[0059] The memory 111 and the processor 113 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The processor 113 is used to execute the executable module stored in the memory.

[0060] The memory 111 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory 111 is used to store programs, and the processor 113 executes the program after receiving the execution instruction. The method executed by the electronic device 110 defined by the process disclosed in any embodiment of the present application can be applied to the processor 113, or implemented by the processor 113.

[0061] The processor 113 may be an integrated circuit chip with signal processing capability. The processor 113 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0062] The electronic device 110 in this embodiment can be used to execute each step in each method provided in the embodiments of the present application. The implementation process of the privacy algorithm construction method is described in detail below through several embodiments.

[0063] See also Figure 3 , is a flowchart of the privacy algorithm construction method provided in the embodiment of the present application. Figure 3 The specific process shown is described in detail.

[0064] Step 210, dividing the current numerical interval of the original function into M numerical intervals.

[0065] The primitive function is a smooth nonlinear function used for privacy computing. For example, the primitive function can be an exponential function, a logarithmic function, a square root function, or a combination of various complex functions.

[0066] When the numerical interval is divided for the first time, the current numerical interval is the value range of the original function. When the step 210 is performed for the second time or more, the current numerical interval is a subset interval of the value range of the original function, and the subset interval is the numerical interval that needs to be further divided.

[0067] The above M is a positive integer greater than 1. Exemplarily, the value of M may be 2, 3, etc. The number of value intervals divided each time may be determined according to the requirements.

[0068] Optionally, the current numerical interval may be equally divided into M numerical intervals, or the current numerical interval may be unequally divided into M numerical intervals. Specifically, whether to equally divide the numerical interval may be determined according to actual usage scenarios.

[0069] Step 220, for the target numerical interval, determine the target order of the target numerical interval according to the first value and the second value in the target numerical interval.

[0070] The first value is the maximum absolute value in the target numerical interval, the second value is the minimum absolute value, and the target numerical interval is any one of the M numerical intervals.

[0071] The target order is used to limit the maximum order of the constructed polynomial.

[0072] When the target numerical interval includes the zero point, the second value is zero, and the first value is the absolute value of the endpoint with the larger absolute value. When the target numerical interval does not include the zero point, the first value is the absolute value of one of the endpoints, and the second value is the absolute value of the other endpoint.

[0073] Step 230: construct a target polynomial for the target numerical interval based on the primitive function.

[0074] In this embodiment, the order of the target polynomial constructed in step 230 may not be greater than the target order.

[0075] The target order is For example, the highest order of the target polynomial is

[0076] Steps 210 to 230 may be repeatedly performed to continuously divide the numerical interval so that the determined polynomial can be closer to the original function.

[0077] Exemplarily, the obtained target polynomial can be compared with the original function to determine the first error between the target polynomial and the original function. If the first error between the target polynomial and the original function is less than an error threshold, the target polynomial can be retained; if the first error between the target polynomial and the original function is not less than the error threshold, the target polynomial can be abandoned, and the numerical interval corresponding to the target polynomial can be re-divided through steps 210 to 230 to construct a new polynomial.

[0078] The above error threshold can be set as needed. For example, the error threshold can be equal to 0.1, 0.2, 0.05, 0.08, etc.

[0079] Exemplarily, the calculation method of the first error between the target polynomial and the original function can be obtained based on the distance calculation between the target polynomial and the original function. For example, the average value of the distance between the numerical interval corresponding to the target polynomial and the original function can be determined as the first error; or the maximum value of the distance between the numerical interval corresponding to the target polynomial and the original function can be determined as the first error.

[0080] Step 240: fuse all currently obtained polynomial sets to obtain the target function.

[0081] The objective function is used to replace the original function for privacy computing, and the input parameters of the objective function include confidential data for privacy computing.

[0082] The objective function may be stored in multi-party devices of secure multi-party computing. When in use, any device receives secret data from other devices, and the objective function may calculate the secret data.

[0083] In one implementation, the currently obtained polynomials may be merged and connected to obtain the target function.

[0084] Exemplarily, all current polynomials may be directly concatenated into the target function. Each polynomial in the currently obtained polynomial set may be concatenated into a polynomial function whose value range is the same as that of the original function.

[0085] In another embodiment, in order to reduce the number of polynomials obtained, or the complexity of the final objective function, all current polynomials can also be merged and fused. Based on this, step 240 can include: constructing a new polynomial corresponding to a new numerical interval formed by the i-th numerical interval and the i+1-th numerical interval; comparing the original function with the new polynomial to determine the second error between the new polynomial and the original function; judging whether the second error is less than a set threshold; if the second error is less than the set threshold, replacing the i-th polynomial and the i+1-th polynomial with the new polynomial to update the currently obtained polynomial set; if the second error is not less than the set threshold, or after updating the currently obtained polynomial set, updating the value of i.

[0086] If the current value of i is less than the number of polynomials in the currently obtained polynomial set minus one, then i+1 is added and the above steps are executed again until the value of i is equal to the number of polynomials in the currently obtained polynomial set minus one.

[0087] Among them, the value range of the i-th polynomial in the current polynomial set is the i-th numerical interval, the value range of the i+1-th polynomial in the current polynomial set is the i+1-th numerical interval, and the value of i is greater than or equal to 1 and less than or equal to the number of polynomials in the current polynomial set.

[0088] The method for calculating the second error may be the same as the method for calculating the first error, and the method for calculating the second error will not be described in detail herein.

[0089] The final polynomial set is used as the objective function.

[0090] Through the above steps, the determined objective function can be made to have a smaller amount of calculation than the original function, and the number of polynomials in the objective function can also be relatively smaller.

[0091] In the above steps, replacing the original function used for privacy computing with a function composed of polynomials with relatively low computational complexity can reduce the computational complexity in the privacy computing process and improve the efficiency of privacy computing. Furthermore, when constructing a polynomial, the order of the polynomial can be adaptively adjusted based on the length of the numerical interval corresponding to the constructed polynomial, so that the determined polynomial can better meet the privacy computing requirements for the length of the calculated data.

[0092] In some embodiments, the target order of the target numerical interval can be determined in the following manner. The target order indicates that the highest order of the polynomial constructed in the target numerical interval is not greater than the target order. Step 220 can be implemented as follows: if the first value is not less than the first preset value, then according to the first rule, the first target order is calculated using the fixed-point number configuration parameter; if the target numerical interval does not include a zero point, then according to the second rule, the second target order is calculated using the fixed-point number configuration parameter; and the minimum value is selected from the first target order and the second target order as the target order.

[0093] Since the secure multi-party computation process is performed on fixed-point numbers, if the order of the polynomial is too large, overflow or underflow may occur when the values ​​in the numerical interval are substituted into the polynomial for calculation.

[0094] Among them, overflow refers to Exceeds the maximum representable value of a fixed-point number; underflow indicates The result calculated by the highest-order polynomial is smaller than the smallest representable value of the fixed-point number.

[0095] Among them, n and f represent the fixed-point configuration parameters, n represents the integer length of the fixed-point number, and f represents the precision length of the fixed-point number. represents the target order. A real number can be represented by an integer and a resolution coefficient. Among them, the integer It is an n-bit integer, and the resolution factor is 2 -f .

[0096] Exemplarily, a number that can overflow is a number greater than 1, and therefore, the first preset value may be 1. When the first value is greater than 1, a first target order that can prevent the first value from overflowing may be calculated.

[0097] Exemplarily, the number that can underflow is a number less than 1. If the target numerical value interval does not include a zero point, a second target order that will not underflow can be calculated based on the second value.

[0098] Exemplarily, according to the first rule, the first target order is calculated using the fixed-point configuration parameters by the following formula:

[0099]

[0100] Among them, k O represents the first target order, n and f represent fixed-point configuration parameters, Indicates the first value.

[0101] Exemplarily, according to the second rule, the second target order is calculated using the fixed-point number configuration parameter by the following formula:

[0102]

[0103] Among them, k U represents the second target order, Indicates the second value.

[0104] If the first value is less than or equal to the first preset value, overflow will not occur. Theoretically, the first target order can be set arbitrarily. However, in order to avoid the polynomial being too complicated, a value can be arbitrarily selected in the preset order interval. Therefore, if the first value is less than or equal to the first preset value, the first target order is determined as the first specified value.

[0105] Exemplarily, the first designated value may be any value from 3 to 10, for example, the first designated value may be 3, 5, 8, 10, etc.

[0106] If the target numerical interval includes zero, the numbers in the target numerical interval can be arbitrarily small, resulting in a polynomial of any order may cause underflow, so the second target order can be set to a smaller value. Therefore, if the target numerical interval includes zero, the second target order is determined to be the second specified value.

[0107] For example, the second designated value may be 3, 4, etc.

[0108] Through the above process, a target order that will not overflow or underflow can be determined, so that the determined polynomial can be used by secure multi-party computing, and the obtained calculation result can be represented by the fixed-point configuration parameters preconfigured by the secure multi-party computing.

[0109] The algorithm used in secure multi-party computing needs to meet the fixed-point configuration parameter restrictions set by secure multi-party computing. Therefore, when determining the polynomial, the coefficients of the polynomial can be adjusted to fixed-point numbers. Based on this requirement, such as Figure 4 As shown, step 230 may include: step 231 and step 232.

[0110] Step 231, performing an interpolation algorithm on multiple points of the original function in the target numerical interval to determine an initial polynomial of the target numerical interval.

[0111] Optionally, multiple points with equal distances can be selected in the target numerical interval. Of course, multiple points with unequal distances can also be selected in the target numerical interval.

[0112] Step 232, adjusting the coefficients of each item in the initial polynomial to fixed-point numbers to obtain a target polynomial.

[0113] Exemplarily, each coefficient in the initial polynomial may be adjusted to the nearest fixed-point number.

[0114] In one embodiment, step 231 can be implemented as follows: if the length of the target numerical interval is greater than a first threshold, based on the point of the first numerical value determined in the target numerical interval, an initial polynomial is determined using the Chebyshev interpolation method, and the initial polynomial is a polynomial of the target order; if the length of the target numerical interval is less than the first threshold, an update order is determined based on the first numerical value; based on the point of the first numerical value determined in the target numerical interval, an initial polynomial of the update order is determined using the Lagrange interpolation method.

[0115] The first threshold may be determined according to the target order and the length of the target value interval. Exemplarily, the first threshold may be expressed as:

[0116] For example, taking the target value interval [a, b] as an example, the maximum number of samples in the value interval is That is, the target value interval can select at most points.

[0117] For example, the target value interval can select up to N points, where if This means that the points selected in the target numerical interval can fit the highest order as the target order. If the original function is a polynomial, the Chebyshev interpolation method can be used to interpolate the initial polynomial for multiple points in the target numerical interval [a, b].

[0118] if This means that the points selected in the target value interval may not be able to fit the highest order to the target order. If the polynomial is , the target order can be updated, Then, the Lagrange interpolation method is used to construct (N-1)-order polynomials for all representable points of the original function in the target numerical interval.

[0119] In one embodiment, step 232 may be implemented as follows:

[0120] If the first coefficient in the initial polynomial is greater than the fixed-point upper limit value, the first coefficient is updated to the fixed-point upper limit value, and the first coefficient is any coefficient in the initial polynomial;

[0121] If the second coefficient in the initial polynomial is less than the fixed-point lower limit value, the second coefficient is updated to a specified value, and the second coefficient is any coefficient in the initial polynomial;

[0122] If the number of significant digits in the third coefficient of the initial polynomial is greater than the fixed-point precision length, the value after the decimal point fixed-point precision length in the third coefficient is set to zero to obtain an updated third coefficient, which is any coefficient in the initial polynomial.

[0123] The number of significant digits in the third coefficient may represent all digits after the decimal point of the third coefficient. Taking the above fixed-point number precision length as f as an example, if the number of decimal digits of the third coefficient exceeds f, the decimal digits after the decimal point of the third coefficient are set to zero.

[0124] Take the pre-configured fixed-point number configuration parameters as: n and f as an example; the fixed-point upper limit value can be expressed as: 2 n-f-1 If a coefficient of the polynomial is already greater than the fixed-point upper limit value and cannot be represented in secure multi-party computation, the coefficient can be represented by the fixed-point upper limit value closest to the coefficient.

[0125] The fixed point lower limit can be expressed as: 2 -f ; If a coefficient of the polynomial is less than the fixed-point lower limit and cannot be represented in secure multi-party computing, the coefficient can be represented by the specified value closest to the coefficient.

[0126] The specified numerical value may be zero, which is the smallest numerical value in absolute value.

[0127] If a coefficient in the polynomial is between the fixed-point upper limit and the fixed-point lower limit, but its precision is high and exceeds the number of digits that can be expressed by the fixed-point number, for example, the number of decimal places of the coefficient exceeds the fixed-point number precision length f, then the decimal places of the coefficient that exceed the fixed-point number precision length f can be set to zero.

[0128] Exemplarily, the round function may be used, round(x,f), where x represents a coefficient that exceeds the number of bits that can be expressed by a fixed-point number.

[0129] In the method provided in the embodiment of the present application, a fixed-point polynomial can be constructed, and a k-order fixed-point polynomial that approximates the original function F(x) that is smooth and continuous in the fixed interval [a, b] can be constructed. The method provided in the embodiment of the present application takes into account different situations of the fixed interval [a, b]. First, the optimal approximation initial polynomial is constructed in the continuous space, and then the initial polynomial is converted into a fixed-point polynomial in the fixed-point space. At the same time, the representation range of the fixed-point number is taken into account, and the maximum feasible order of the polynomial is strictly controlled. Avoids the overflow or underflow problems common in fixed-point numbers.

[0130] The implementation process of the privacy algorithm construction method of the present application is described below through an embodiment:

[0131] Exemplarily, the above steps 210 to 240 may be performed by a first-party device in a secure multi-party computing system to construct an objective function for privacy computing.

[0132] After determining the target function, the first electronic device sends the target function to other electronic devices in the secure multi-party computing system for use by the other electronic devices.

[0133] During use, multiple electronic devices can receive confidential data transmitted by other electronic devices; after obtaining the confidential data of other parties, the multiple electronic devices can use the stored objective function to calculate their own local data and the confidential data of other parties.

[0134] After the objective function obtains the calculation result, the calculation result can be returned to the other electronic devices of the secure multi-party computing system.

[0135] In some implementations, each electronic device in the secure multi-party computing system can respectively use the steps provided by the above-mentioned privacy algorithm construction method to construct polynomials for a portion of the function used for privacy computing to obtain the function required for the partial privacy computing. Then, each electronic device can send the constructed target function to the designated electronic device, and the designated electronic device can combine the target functions constructed by the electronic devices of each party into the privacy function required for the secure multi-party computing system.

[0136] Based on the same application concept, the embodiment of the present application also provides a privacy algorithm construction device corresponding to the privacy algorithm construction method. Since the principle of solving the problem by the device in the embodiment of the present application is similar to that of the aforementioned privacy algorithm construction method embodiment, the implementation of the device in this embodiment can refer to the description in the embodiment of the above method, and the repeated parts will not be repeated.

[0137] See also Figure 5 , is a functional module diagram of the privacy algorithm construction device provided in the embodiment of the present application. Each module in the privacy algorithm construction device in this embodiment is used to execute each step in the above method embodiment. The privacy algorithm construction device includes: an interval division module 310, an order determination module 320, a polynomial construction module 330 and a function acquisition module 340; the contents of each module are as follows:

[0138] An interval division module 310 is used to divide the current numerical interval of the original function into M numerical intervals; the original function is a smooth nonlinear function used for privacy computing, and when the numerical interval is divided for the first time, the current numerical interval is the value range of the original function, and M is a positive integer greater than 1;

[0139] An order determination module 320 is used to determine, for a target numerical interval, a target order of the target numerical interval according to a first value and a second value in the target numerical interval, wherein the first value is a maximum absolute value in the target numerical interval, the second value is a minimum absolute value, and the target numerical interval is any one of the M numerical intervals;

[0140] A polynomial construction module 330 is used to construct a target polynomial of the target numerical interval according to the original function, wherein the highest order of the target polynomial is not greater than the target order;

[0141] The function acquisition module 340 is used to fuse all the currently obtained polynomial sets to obtain the target function, which is used to replace the original function for privacy computing. The input parameters of the target function include confidential data for privacy computing.

[0142] In a possible implementation manner, the order determination module 320 is configured to:

[0143] If the first value is not less than the first preset value, then according to the first rule, the first target order is calculated using the fixed-point number configuration parameters;

[0144] If the target value interval does not include the zero point, then according to the second rule, the second target order is calculated using the fixed-point number configuration parameters;

[0145] A minimum value is selected from the first target step and the second target step as the target step.

[0146] In a possible implementation, according to the first rule, the first target order is calculated using fixed-point configuration parameters by the following formula:

[0147]

[0148] Among them, k O represents the first target order, n and f represent fixed-point configuration parameters, represents the first value;

[0149] According to the second rule, the second target order is calculated by using the fixed-point number configuration parameters through the following formula:

[0150]

[0151] Among them, k U represents the second target order, Indicates the second value.

[0152] In a possible implementation manner, the order determination module 320 is further configured to:

[0153] If the first value is less than or equal to the first preset value, determining the first target level as the first specified value;

[0154] If the target value interval includes a zero point, the second target order is determined as a second specified value.

[0155] In a possible implementation, the polynomial construction module 330 includes an initial construction unit and an adjustment unit:

[0156] An initial construction unit, used for performing an interpolation algorithm on a plurality of points of the original function in the target numerical interval to determine an initial polynomial of the target numerical interval;

[0157] The adjustment unit is used to adjust each coefficient in the initial polynomial to a fixed-point number to obtain a target polynomial.

[0158] In a possible implementation manner, the initial construction unit is used to:

[0159] If the length of the target numerical interval is greater than the first threshold, an initial polynomial is determined using the Chebyshev interpolation method according to the point of the first numerical value determined in the target numerical interval, and the initial polynomial is a polynomial of the target order;

[0160] If the length of the target numerical interval is less than the first threshold, the update order is determined according to the first numerical value; based on the point where the first numerical value is determined in the target numerical interval, an initial polynomial of the update order is determined using the Lagrange interpolation method.

[0161] In a possible implementation manner, the adjustment unit is used to:

[0162] If the first coefficient in the initial polynomial is greater than the fixed-point upper limit value, the first coefficient is updated to the fixed-point upper limit value, and the first coefficient is any coefficient in the initial polynomial;

[0163] If the second coefficient in the initial polynomial is less than the fixed-point lower limit value, the second coefficient is updated to a specified value, and the second coefficient is any coefficient in the initial polynomial;

[0164] If the number of significant digits in the third coefficient of the initial polynomial is greater than the fixed-point precision length, the value after the decimal point fixed-point precision length in the third coefficient is set to zero to obtain an updated third coefficient, which is any coefficient in the initial polynomial.

[0165] In addition, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the privacy algorithm construction method described in the above method embodiment are executed.

[0166] The computer program product of the privacy algorithm construction method provided in the embodiment of the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the steps of the privacy algorithm construction method described in the above method embodiment. Please refer to the above method embodiment for details, which will not be repeated here.

[0167] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0168] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0169] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk. It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variation thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or apparatus. In the absence of more restrictions, the elements defined by the sentence "includes..." do not exclude the presence of other identical elements in the process, method, article or apparatus that includes the elements.

[0170] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0171] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A privacy algorithm construction method, characterized in that: include: Divide the current numerical interval of the original function into M numerical intervals; The original function is a smooth nonlinear function used for privacy computing. When the numerical interval is divided for the first time, the current numerical interval is the value range of the original function, and M is a positive integer greater than 1; For a target numerical interval, determining a target order of the target numerical interval according to a first value and a second value in the target numerical interval, wherein the first value is a maximum absolute value in the target numerical interval, the second value is a minimum absolute value, and the target numerical interval is any one of the M numerical intervals; Performing an interpolation algorithm on a plurality of points of the primitive function in the target numerical interval to determine an initial polynomial of the target numerical interval; Adjusting each coefficient in the initial polynomial to a fixed-point number to obtain a target polynomial, wherein the highest order of the target polynomial is not greater than the target order; All currently obtained polynomial sets are merged to obtain a target function, where the target function is used to replace the original function for privacy computing, and the input parameters of the target function include secret data for privacy computing.

2. The method according to claim 1, characterized in that Determining a target order of the target numerical interval according to the first value and the second value in the target numerical interval includes: If the first value is not less than a first preset value, then according to a first rule, a first target order is calculated using fixed-point number configuration parameters; If the target numerical value interval does not include a zero point, then according to a second rule, a second target order is calculated using the fixed-point number configuration parameters; A minimum value is selected from the first target order and the second target order as a target order.

3. The method according to claim 2, characterized in that According to the first rule, the first target order is calculated using fixed-point configuration parameters by the following formula: Among them, k O represents the first target order, n and f represent fixed-point configuration parameters, represents the first value; According to the second rule, the second target order is calculated using the fixed-point number configuration parameters by the following formula: Among them, k U represents the second target order, Indicates the second value.

4. The method according to claim 2, characterized in that: The step of determining a target order of the target numerical interval according to the first value and the second value in the target numerical interval further includes: If the first value is less than or equal to a first preset value, determining the first target order as a first specified value; If the target value interval includes a zero point, the second target order is determined as a second specified value.

5. The method according to claim 1, characterized in that: The interpolation algorithm is performed on a plurality of points of the primitive function in the target numerical interval to determine an initial polynomial of the target numerical interval, including: If the length of the target numerical interval is greater than a first threshold, an initial polynomial is determined using a Chebyshev interpolation method according to a point of the first numerical value determined in the target numerical interval, and the initial polynomial is a polynomial of a target order; If the length of the target numerical interval is less than the first threshold, the update order is determined according to the first numerical value; based on the point of the first numerical value determined in the target numerical interval, the initial polynomial of the update order is determined using the Lagrange interpolation method.

6. The method according to claim 1, characterized in that The step of adjusting each coefficient in the initial polynomial to a fixed-point number to obtain a target polynomial includes: If the first coefficient in the initial polynomial is greater than the fixed-point upper limit value, update the first coefficient to the fixed-point upper limit value, the first coefficient being any coefficient in the initial polynomial; If the second coefficient in the initial polynomial is less than the fixed-point lower limit value, update the second coefficient to a specified value, where the second coefficient is any coefficient in the initial polynomial; If the number of significant digits of the value in the third coefficient of the initial polynomial is greater than the fixed-point precision length, the value after the decimal point fixed-point precision length in the third coefficient is set to zero to obtain an updated third coefficient, and the third coefficient is any coefficient in the initial polynomial.

7. A privacy algorithm construction device, characterized in that: include: An interval division module, used for dividing the current numerical interval of the original function into M numerical intervals; The original function is a smooth nonlinear function used for privacy computing. When the numerical interval is divided for the first time, the current numerical interval is the value range of the original function, and M is a positive integer greater than 1; an order determination module, for determining, for a target numerical interval, a target order of the target numerical interval according to a first value and a second value in the target numerical interval, wherein the first value is a maximum absolute value in the target numerical interval, the second value is a minimum absolute value, and the target numerical interval is any one of the M numerical intervals; A polynomial construction module, used for performing an interpolation algorithm on a plurality of points of the original function in the target numerical interval to determine an initial polynomial of the target numerical interval; Adjusting each coefficient in the initial polynomial to a fixed-point number to obtain a target polynomial, wherein the highest order of the target polynomial is not greater than the target order; The function acquisition module is used to fuse all the currently obtained polynomial sets to obtain the target function, and the target function is used to replace the original function for privacy computing. The input parameters of the target function include confidential data for privacy computing.

8. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable instructions are executed by the processor to perform the steps of any method according to claim 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the methods described in claims 1 to 6 are executed.

Citation Information

Patent Citations

  • Privacy calculation method and device, electronic equipment and readable storage medium

    CN115062342A

  • Privacy algorithm construction method and device, electronic equipment and readable storage medium

    CN115081021A