A business processing method, device, storage medium and electronic device
By estimating and adjusting the value range of dense state business data, the problems of overflow and insufficient valid bits in dense state operations are solved, and the accuracy and accuracy of the operation results are improved.
Patent Information
- Application Number
- CN202211738531.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2042-12-30
AI Technical Summary
During the dense state operation, the intermediate operation results may cause overflow or insufficient valid bits, resulting in errors in the operation results. How to improve the accuracy and accuracy of the operation results during business processing.
By receiving the data processing request, it estimates the value range of the data processing result, determines whether it overflows, and adjusts the dense business data according to the estimated value range to perform business processing to avoid overflow and improve accuracy.
It effectively improves the accuracy and accuracy of operation results during business processing and avoids errors caused by overflow and insufficient valid bits.
Smart Images

Figure CN116095174B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, storage medium and electronic device for business processing. Background Art
[0002] With the development of the Internet and the birth of the concept of cloud computing, as well as people's increasing needs in ciphertext search, electronic voting, mobile code and multi-party computing, the secret computing technology can be used to first encrypt multiple business data, and then calculate the encrypted business data to obtain the encrypted computing results. Then, the encrypted computing data is decrypted to obtain the computing results. The computing results are the same as the computing results of the business data in plain text. As a result, the computing party cannot know the content of the business data, improve the security of information, and protect the privacy of users.
[0003] Currently, during the calculation process, no party knows the size of these intermediate calculation results. If these intermediate calculation results overflow or have insufficient valid bits, some digits in the intermediate calculation results will be lost, thus making the calculation results erroneous.
[0004] Therefore, how to improve the accuracy and correctness of calculation results in the business processing process is a problem that needs to be solved urgently. Summary of the invention
[0005] The present specification provides a business processing method, device, storage medium and electronic device to improve the accuracy and correctness of calculation results in the business processing process.
[0006] This manual adopts the following technical solutions:
[0007] This specification provides a business processing method, including:
[0008] Receive a data processing request sent by a business party, wherein the data processing request carries confidential business data, a data volume corresponding to the confidential business data, and a value range corresponding to the confidential business data;
[0009] Estimate the value range of the data processing result obtained after data processing the secret business data, wherein, according to the data volume corresponding to the secret business data and the value range corresponding to the secret business data, generate test data, the test data is plain text data, and the data volume corresponding to the test data matches the data volume corresponding to the secret business data; perform data processing on the test data to obtain the value range of the data processing result of the test data, and estimate the value range of the data processing result obtained after data processing the secret business data;
[0010] According to the estimated value range, determining whether a data processing result obtained after processing the confidential business data will have data overflow;
[0011] If so, the confidential business data is adjusted according to the estimated value range to obtain adjusted confidential business data, and business processing is performed according to the adjusted confidential business data.
[0012] Optionally, the secret business data is floating point data or integer data, and is composed of a secret mantissa and a plaintext exponent, and the secret mantissa is a variable ciphertext in a multi-party secure computing technology or a variable ciphertext in a homomorphic encryption technology.
[0013] Optionally, adjusting the confidential service data according to the estimated value range to obtain adjusted confidential service data specifically includes:
[0014] Determine the number of bits required to shift the secret mantissa of the secret business data according to the estimated number of significant digits of the maximum value in the value range, the arithmetic expression for data processing of the secret business data, and the maximum number of significant digits of the secret mantissa of the secret business data;
[0015] Shifting the secret mantissa of the secret business data according to the number of bits required to be shifted, to obtain the shifted secret mantissa of the secret business data, and adjusting the plaintext exponent of the secret business data according to the number of bits required to be shifted, to obtain the adjusted plaintext exponent of the secret business data;
[0016] The adjusted secret state business data is obtained according to the shifted secret state mantissa of the secret state business data and the adjusted plaintext exponent of the secret state business data.
[0017] Optionally, determining the number of bits required to shift the secret mantissa of the secret business data according to the estimated number of effective digits of the maximum value in the value range, an arithmetic expression for data processing of the secret business data, and the maximum effective digits of the secret mantissa of the secret business data specifically includes:
[0018] Determine a target number of significant digits according to the estimated number of significant digits of the maximum value in the value range, wherein the target number of significant digits is the number of significant digits of the dense mantissa of the maximum value in the estimated value range;
[0019] If the arithmetic expression is a multiplication expression, and the target number of effective digits is greater than the set number of digits of the secret mantissa of the secret business data, the number of effective digits of the secret mantissa of the secret business data is adjusted to the set number of digits, and the set number of digits is a set ratio of the maximum number of effective digits of the secret mantissa of the secret business data;
[0020] The number of bits required to shift the secret mantissa of the secret business data is determined according to the difference between the target number of effective bits and the set number of bits of the secret mantissa of the secret business data.
[0021] Optionally, the method further comprises:
[0022] If the arithmetic expression is an additive expression and the plaintext exponent corresponding to the first addend is greater than the plaintext exponent corresponding to the second addend, the number of bits required to shift the secret mantissa corresponding to the first addend is determined based on the difference between the plaintext exponent corresponding to the first addend and the plaintext exponent corresponding to the second addend, and the first addend and the second addend are the secret business data.
[0023] Optionally, the method further comprises:
[0024] If the arithmetic expression is an additive expression and the plaintext exponent corresponding to the first addend is smaller than the plaintext exponent corresponding to the second addend, the number of bits required to shift the secret mantissa corresponding to the second addend is determined based on the difference between the plaintext exponent corresponding to the first addend and the plaintext exponent corresponding to the second addend, and the first addend and the second addend are the secret business data.
[0025] Optionally, the method further comprises:
[0026] If the estimated value range is larger than the set value range, the secret service data is precision converted to obtain converted secret service data, the data precision of the converted secret service data being larger than the data precision of the secret service data;
[0027] Performing data processing on the converted secret service data by a preset data processing method for processing the converted secret service data, and determining a data processing result of the converted secret service data;
[0028] The data processing result of the converted confidential business data is accurately restored to obtain the restored data processing result for business processing.
[0029] This specification provides a service processing device, including:
[0030] A receiving module, configured to receive a data processing request sent by a business party, wherein the data processing request carries confidential business data, a data volume corresponding to the confidential business data, and a value range corresponding to the confidential business data;
[0031] An estimation module is used to estimate the value range of the data processing result obtained after the secret business data is processed, wherein test data is generated according to the data volume corresponding to the secret business data and the value range corresponding to the secret business data, the test data is plain text data, and the data volume corresponding to the test data matches the data volume corresponding to the secret business data; the test data is processed to obtain the value range of the data processing result of the test data, and the value range of the data processing result obtained after the secret business data is processed is estimated;
[0032] A judgment module, used for judging whether a data processing result obtained after processing the confidential business data will have data overflow according to the estimated value range;
[0033] The adjustment module is used to adjust the confidential business data according to the estimated value range to obtain adjusted confidential business data, and perform business processing according to the adjusted confidential business data.
[0034] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned business processing method is implemented.
[0035] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned business processing method when executing the program.
[0036] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0037] In the business processing method provided in this specification, first, a data processing request sent by a business party is received, and the data processing request carries confidential business data, the amount of data corresponding to the confidential business data, and the value range corresponding to the confidential business data. Secondly, the value range of the data processing result obtained after data processing the confidential business data is estimated. Then, based on the estimated value range, it is determined whether the data processing result obtained after processing the confidential business data will have data overflow. Finally, if so, the confidential business data is adjusted according to the estimated value range to obtain the adjusted confidential business data, and business processing is performed based on the adjusted confidential business data.
[0038] It can be seen from the above method that the method can estimate the value range of the data processing result obtained after processing the secret business data. Then, according to the estimated value range, it is judged whether the data processing result obtained after processing the secret business data will overflow. Finally, if so, according to the estimated value range, the secret business data is adjusted to obtain the adjusted secret business data, and the business processing is performed according to the adjusted secret business data. Thereby improving the accuracy and correctness of the calculation results in the business processing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The exemplary embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification.
[0040] In the figure:
[0041] Figure 1 A flowchart of a method for business processing provided in an embodiment of this specification;
[0042] Figure 2 A schematic diagram of a flow chart of a secret operation provided in an embodiment of this specification;
[0043] Figure 3 A schematic diagram of the structure of a device for business processing provided in an embodiment of this specification;
[0044] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0046] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0047] Figure 1 The following is a flowchart of a method for business processing in this specification, which specifically includes the following steps:
[0048] S100: receiving a data processing request sent by a service provider, wherein the data processing request carries confidential service data, a data volume corresponding to the confidential service data, and a value range corresponding to the confidential service data.
[0049] In the embodiments of this specification, the execution subject of the business processing method may refer to electronic devices such as servers, desktop computers, etc. For ease of description, the business processing method provided in this specification is described below with the server as the execution subject.
[0050] In practical applications, a dense computing technology only supports integer operations and shift operations, and can indirectly implement fixed-point operations through shift operations. However, due to the small range of fixed-point numbers, during the operation process, neither party knows the size of these intermediate operation results. If these intermediate operation results overflow or have insufficient valid bits, some numbers in the intermediate operation results will be lost, thus making the operation results wrong.
[0051] Another secret operation technology is to represent a floating point type secret business data by a secret mantissa and a secret exponent. However, the operation method of this secret business data is relatively complicated, and the amount of operation is large and the operation time consumed is long. Based on this, the server can form the secret business data by the secret mantissa and the plaintext exponent, so as to reduce the amount of operation and the operation time during the operation.
[0052] In the embodiment of the present specification, the server may receive a data processing request sent by a service provider, wherein the data processing request mentioned here carries confidential service data, which may be floating point data or integer data.
[0053] Furthermore, the data processing request carries confidential business data of floating-point type. The confidential business data mentioned here consists of a confidential mantissa and a plaintext exponent. The confidential mantissa mentioned here can be a variable ciphertext in multi-party secure computing technology or a variable ciphertext in homomorphic encryption technology. In other words, the business party can convert the business data into floating-point business data in advance, and then encrypt the mantissa in the floating-point business data through multi-party secure computing technology or homomorphic encryption technology to obtain a confidential mantissa. The confidential mantissa and the plaintext exponent are then combined into confidential business data and sent to the server.
[0054] The floating-point type mentioned here can refer to an integer or fixed-point number (i.e., mantissa) multiplied by an integer power of a base (usually 2 in computers). The specific representation is as follows:
[0055] a=m×b e
[0056] In the above formula, a can be used to represent the floating point type of confidential business data. m can be used to represent the mantissa in the floating point type of confidential business data. b can be used to represent the base of the number system. e can be used to represent the exponent in the floating point type of confidential business data.
[0057] The secret computing technology mentioned here may refer to the business party generating a key pair: a public key and a private key, where the public key is used for encryption and the private key is used for decryption. The business party uses the public key to encrypt each data to obtain each secret business data. The service party uses the computing function to compute each secret business data to obtain the secret business data after the computation (the encrypted computing result). The business party uses the private key to decrypt the secret business data after the computation to obtain the computing result. The computing result is the same as the computing result of computing each data in plain text.
[0058] Of course, the confidential business data may also be a fixed-point number, that is, confidential business data of a floating-point type with a plaintext exponent of 0.
[0059] S102: estimating a value range of a data processing result obtained after processing the confidential business data.
[0060] S104: judging whether a data processing result obtained after processing the confidential business data will have data overflow according to the estimated value range.
[0061] In practical applications, during the calculation of the secret business data composed of the secret mantissa and the secret exponent, it is necessary to first evaluate the multiple required to adjust the secret business data, which is 2. t , t is an integer. Then, the secret mantissa and secret exponent in the secret service data are adjusted to obtain (secret mantissa * 2 t , secret index-t). Since the above operation process has a large amount of operation and a long operation time. Based on this, the server can first estimate the value range of the data processing result obtained after processing the secret business data, and then adjust the secret mantissa and plaintext index of the secret business data to be processed according to the estimated value range to obtain the adjusted secret business data.
[0062] In the embodiment of the present specification, the server may estimate the value range of the data processing result obtained after processing the confidential business data. The value range mentioned here may refer to the range between the maximum value and the minimum value of the data processing result.
[0063] Secondly, the server can determine whether the data processing result obtained after processing the confidential business data will overflow according to the estimated value range. For example, if the estimated value range of the data processing result obtained after processing the confidential business data is greater than the preset value range, it is determined that the data overflows.
[0064] Specifically, the data processing request also carries the data volume corresponding to the confidential business data and the value range corresponding to the confidential business data. The data volume mentioned here may refer to the number of confidential business data.
[0065] The server may estimate the value range of the data processing result obtained after processing the confidential business data according to the arithmetic expression for processing the confidential business data, the data volume of the confidential business data, and the value range of the confidential business data.
[0066] Among them, the server can estimate the value range of the data processing result obtained after processing the confidential business data through a predetermined value range formula, according to the arithmetic expression of data processing on the confidential business data, the data volume of the confidential business data and the value range of the confidential business data.
[0067] For example, if the arithmetic expression for processing the secret business data is an addition expression, the predetermined range formula is (the amount of secret business data x the minimum value in the range of the secret business data, the amount of secret business data x the maximum value in the range of the secret business data), if the amount of secret business data is 10,000, the minimum value in the range of the secret business data is 1, and the maximum value is 2, then it is estimated that the minimum value in the range of the data processing result obtained after the secret business data is processed is 10,000, and the maximum value is 20,000. Of course, this specification does not limit the range formula.
[0068] In the embodiment of the present specification, the server may generate plain text test data, perform data processing on the test data, and obtain a value range of a data processing result obtained after the test data is processed.
[0069] Specifically, the server may generate test data according to the data volume corresponding to the confidential business data and the value range corresponding to the confidential business data. The test data mentioned here is plain text data, and the data volume corresponding to the test data matches the data volume corresponding to the confidential business data. The data volume corresponding to the test data may be the same as the data volume corresponding to the confidential business data. The data volume corresponding to the test data may also be at the same order of magnitude as the data volume corresponding to the confidential business data.
[0070] Secondly, the server can perform data processing on the test data to obtain a value range of the data processing results of the test data, and estimate the value range of the data processing results obtained after performing data processing on the confidential business data.
[0071] The server may perform data processing on the test data several times, determine the value ranges of several data processing results obtained after data processing on the secret business data, and calculate the average value range according to the value ranges of several data processing results obtained after data processing on the secret business data. Then, the average value range is used as the value range of the data processing result obtained after data processing on the secret business data.
[0072] It should be noted that the test data is plain text data of floating point type. The server can obtain the distribution of real data sent by the business party and generate test data based on the distribution of the real data to improve the accuracy of the value range of the data processing results obtained after data processing of the confidential business data.
[0073] S106: If yes, the confidential business data is adjusted according to the estimated value range to obtain adjusted confidential business data, and business processing is performed according to the adjusted confidential business data.
[0074] In the embodiment of the present specification, if so, the server can adjust the confidential business data to be processed according to the value range, obtain the adjusted confidential business data, and perform business processing according to the adjusted confidential business data.
[0075] Specifically, the server may determine the number of bits required to shift the secret mantissa of the secret business data based on the number of valid digits of the maximum value in the value range, the arithmetic expression for data processing of the secret business data, and the maximum number of valid digits of the secret mantissa of the secret business data.
[0076] Secondly, the server can shift the confidential mantissa of the confidential business data according to the number of bits required to shift the confidential mantissa of the confidential business data to obtain the shifted confidential mantissa of the confidential business data, and adjust the plaintext exponent of the confidential business data according to the number of bits required to shift the confidential mantissa of the confidential business data to obtain the adjusted plaintext exponent of the confidential business data.
[0077] Finally, the server may obtain the adjusted confidential business data according to the shifted confidential mantissa of the confidential business data and the adjusted plaintext exponent of the confidential business data.
[0078] In practical applications, data processing of confidential business data can be divided into multiplication and addition operations, and data overflow may occur during the multiplication process. Therefore, the server needs to adjust the effective digits of the confidential mantissa of the confidential business data during the multiplication process to at least half of the maximum effective digits to avoid data overflow during the multiplication process.
[0079] In an embodiment of the present specification, the server may determine the target effective digits based on the effective digits of the maximum value in the value domain, wherein the target effective digits are the effective digits of the secret mantissa of the maximum value in the value domain. If the arithmetic expression is a multiplication expression, and the target effective digits are greater than the set digits of the secret mantissa of the secret business data, the effective digits of the secret mantissa of the secret business data are adjusted to the set digits. The set digits mentioned here are the set ratio of the maximum effective digits of the secret mantissa of the secret business data. The set ratio can be one-half, and of course it can also be determined according to business needs.
[0080] Then, the server can determine the number of bits required to shift the secret mantissa of the secret service data according to the difference between the target effective number of bits and the set number of bits of the secret mantissa of the secret service data. The specific formula is as follows.
[0081]
[0082] In the above formula, t can be used to represent the number of bits required to shift the secret mantissa of secret business data. max(x) can be used to represent the maximum value in the value range. log(max(x)) can be used to represent the target number of significant digits, that is, the number of significant digits of the maximum value in the value range. T can be used to represent the maximum number of significant digits corresponding to the secret mantissa, that is, the maximum number of physical storage bits of the server in one operation. The set number of digits that can be used to represent the secret mantissa of secret business data.
[0083] Further, the server may shift the secret mantissa of the secret business data according to the number of bits required to be shifted, to obtain the shifted secret mantissa of the secret business data, and adjust the plaintext exponent of the secret business data according to the number of bits required to be shifted, to obtain the adjusted plaintext exponent of the secret business data. The specific formula is as follows.
[0084] (X>>(tA), A+(tA))=(X>>(tA), t)
[0085] In the above formula, X can be used to represent the secret mantissa of the secret business data. >> can be used to represent the right shift in the shift operation. t can be used to represent the number of bits required to shift the secret mantissa of the secret business data. A can be used to represent the plaintext exponent of the secret business data. It can be seen that when X is right shifted by (tA), A is added to (tA) to obtain the adjusted secret business data.
[0086] In actual applications, the exponents of two floating-point data must be the same in order to perform addition operations. Therefore, the server needs to first change the exponents of the two floating-point data to the same exponent.
[0087] In an embodiment of the present specification, if the arithmetic expression is an additive expression and the plaintext exponent corresponding to the first addend is greater than the plaintext exponent corresponding to the second addend, the server can determine the number of bits required to shift the secret mantissa corresponding to the first addend based on the difference between the plaintext exponent corresponding to the first addend and the plaintext exponent corresponding to the second addend, and the first addend and the second addend are secret business data.
[0088] The server may shift the encrypted mantissa corresponding to the first addend according to the number of bits required to shift the encrypted mantissa corresponding to the first addend to obtain the shifted first addend, and determine the data processing result based on the shifted first addend and the second addend.
[0089] If the arithmetic expression is an additive expression and the plaintext exponent corresponding to the first addend is smaller than the plaintext exponent corresponding to the second addend, the server can determine the number of bits required to shift the encrypted mantissa corresponding to the second addend based on the difference between the plaintext exponent corresponding to the first addend and the plaintext exponent corresponding to the second addend.
[0090] The server may shift the encrypted mantissa corresponding to the second addend according to the number of bits required to shift the encrypted mantissa corresponding to the second addend to obtain the shifted second addend, and determine the data processing result based on the first addend and the shifted second addend.
[0091] In practical applications, if the difference between the maximum and minimum values of the value range of the data processing result obtained after processing the confidential business data is greater than or close to half of the maximum number of valid digits, the data processing result may face the situation of insufficient valid digits. The server can use higher data precision to represent the confidential business data.
[0092] In an embodiment of the present specification, if the value range is greater than the set value range, the server may perform precision conversion on the secret business data to obtain converted secret business data. The data precision of the converted secret business data is greater than the data precision of the secret business data. The precision mentioned here may refer to int (integer type), float (single-precision floating point type), double (double-precision floating point type), char (character type), etc. For example, the single-precision floating point type of the secret business data is converted to a double-precision floating point type to obtain the converted secret business data of the double-precision floating point type.
[0093] The low-precision data can be calculated faster and in a shorter time than the high-precision data during the calculation process. Therefore, the server only performs precision conversion when the data processing result may face insufficient effective bits.
[0094] Secondly, the server may perform data processing on the converted confidential business data corresponding to the data processing step by using a preset data processing method for processing the converted confidential business data, and determine a data processing result of the converted confidential business data.
[0095] Since the conversion of the data type of the secret business data is also a secret protocol, which requires computing resources, the server can restore the precision of the data processing result of the converted secret business data after obtaining the data processing result corresponding to the data processing step to obtain low-precision data.
[0096] Specifically, the server may accurately restore the data processing result of the converted confidential business data corresponding to the data processing step, obtain the restored data processing result, and perform business processing.
[0097] In the embodiments of this specification, in some cases where security requirements are not very strict, the effective digits of the business data can be restored during the operation to perform more accurate effective digit control. However, this method will lead to information leakage and can only be used on some business data that does not involve information security. Alternatively, the server can restore the integer part of the shifted data. By leaking less information, more accurate effective digit control can be performed.
[0098] In the embodiments of the present specification, the server can estimate the value range corresponding to each data processing step in the data processing process, and adjust the confidential mantissa and plaintext exponent of the confidential business data to be processed corresponding to the data processing step according to the value range corresponding to the data processing step, to obtain the adjusted confidential business data corresponding to the data processing step. Then, the adjusted confidential business data corresponding to the data processing step is used as the confidential business data corresponding to the next data processing step, and so on, to obtain the final data processing result and perform business processing. Specifically, Figure 2 shown.
[0099] Figure 2 A schematic diagram of a flow chart of a secret operation provided in an embodiment of this specification.
[0100] exist Figure 2 In the process, the server receives confidential business data sent by the business party.
[0101] Secondly, the server can estimate the value range corresponding to the Nth data processing step in the data processing process.
[0102] According to the estimated value range corresponding to the Nth data processing step in the data processing process, the confidential mantissa and plaintext exponent of the confidential business data to be processed corresponding to the Nth data processing step are adjusted to obtain the adjusted confidential business data corresponding to the Nth data processing step.
[0103] Then, the server can use the adjusted secret business data corresponding to the Nth data processing step as the secret business data corresponding to the N+1th data processing step, estimate the value range corresponding to the N+1th data processing step, and adjust the secret mantissa and plaintext exponent of the secret business data to be processed corresponding to the N+1th data processing step to determine the data processing result corresponding to the N+1th data processing step. And so on, the final data processing result is obtained, and the business processing is carried out.
[0104] It can be seen from the above method that the method can estimate the value range of the data processing result obtained after processing the secret business data. Then, according to the estimated value range, it is judged whether the data processing result obtained after processing the secret business data will overflow. Finally, if so, according to the estimated value range, the secret business data is adjusted to obtain the adjusted secret business data, and the business processing is performed according to the adjusted secret business data. Thereby improving the accuracy and correctness of the calculation results in the business processing process.
[0105] The above is a method for business processing provided in an embodiment of this specification. Based on the same idea, this specification also provides corresponding devices, storage media and electronic devices.
[0106] Figure 3 A schematic diagram of a structure of a device for business processing provided in an embodiment of this specification, the device comprising:
[0107] The receiving module 300 is used to receive a data processing request sent by a business party, wherein the data processing request carries confidential business data, a data volume corresponding to the confidential business data, and a value range corresponding to the confidential business data;
[0108] The estimation module 302 is used to estimate the value range of the data processing result obtained after the secret business data is processed, wherein test data is generated according to the data volume corresponding to the secret business data and the value range corresponding to the secret business data, the test data is plain text data, and the data volume corresponding to the test data matches the data volume corresponding to the secret business data; the test data is processed to obtain the value range of the data processing result of the test data, and the value range of the data processing result obtained after the secret business data is processed is estimated;
[0109] A judgment module 304 is used to judge whether a data processing result obtained after processing the confidential business data will have data overflow according to the estimated value range;
[0110] The adjustment module 306 is used to adjust the confidential business data according to the estimated value range to obtain adjusted confidential business data, and perform business processing according to the adjusted confidential business data.
[0111] Optionally, the secret business data is floating point data or integer data, and is composed of a secret mantissa and a plaintext exponent, and the secret mantissa is a variable ciphertext in a multi-party secure computing technology or a variable ciphertext in a homomorphic encryption technology.
[0112] Optionally, the adjustment module 306 is specifically used to determine the number of bits required to shift the confidential mantissa of the confidential business data according to the estimated number of significant digits of the maximum value in the value range, the arithmetic expression for data processing of the confidential business data, and the maximum number of significant digits of the confidential mantissa of the confidential business data, shift the confidential mantissa of the confidential business data according to the number of bits required to shift the confidential mantissa of the confidential business data to obtain the shifted confidential mantissa of the confidential business data, and adjust the plaintext exponent of the confidential business data according to the number of bits required to shift the confidential mantissa of the confidential business data to obtain the adjusted plaintext exponent of the confidential business data, and obtain the adjusted confidential business data according to the shifted confidential mantissa of the confidential business data and the adjusted plaintext exponent of the confidential business data.
[0113] Optionally, the adjustment module 306 is specifically used to determine a target number of significant digits based on the estimated number of significant digits of the maximum value in the value range, wherein the target number of significant digits is the number of significant digits of the secret mantissa of the maximum value in the estimated value range; if the arithmetic expression is a multiplication expression, and the target number of significant digits is greater than the set number of significant digits of the secret mantissa of the secret business data, then the number of significant digits of the secret mantissa of the secret business data is adjusted to the set number of digits, wherein the set number of digits is a set ratio of the maximum number of significant digits of the secret mantissa of the secret business data; and the number of digits required to shift the secret mantissa of the secret business data is determined based on the difference between the target number of significant digits and the set number of digits of the secret mantissa of the secret business data.
[0114] Optionally, the adjustment module 306 is further specifically used to determine the number of bits required to shift the secret mantissa corresponding to the first addend based on the difference between the plaintext exponent corresponding to the first addend and the plaintext exponent corresponding to the second addend if the arithmetic expression is an addition expression and the plaintext exponent corresponding to the first addend is greater than the plaintext exponent corresponding to the second addend, and the first addend and the second addend are the secret business data.
[0115] Optionally, the adjustment module 306 is further specifically used to determine the number of bits required to shift the secret mantissa corresponding to the second addend based on the difference between the plaintext exponent corresponding to the first addend and the plaintext exponent corresponding to the second addend if the arithmetic expression is an addition expression and the plaintext exponent corresponding to the first addend is smaller than the plaintext exponent corresponding to the second addend, and the first addend and the second addend are the secret business data.
[0116] Optionally, the adjustment module 306 is also specifically used to, if the estimated value range is larger than the set value range, perform precision conversion on the confidential business data to obtain converted confidential business data, the data precision of the converted confidential business data is greater than the data precision of the confidential business data, perform data processing on the converted confidential business data through a preset data processing method for processing the converted confidential business data, determine the data processing result of the converted confidential business data, perform precision restoration on the data processing result of the converted confidential business data, obtain the restored data processing result, and perform business processing.
[0117] This specification also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, it can be used to perform the above Figure 1 Provides business processing methods.
[0118] The embodiments of this specification also provide Figure 4 The structural diagram of the electronic device shown in FIG. Figure 4 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Provides business processing methods.
[0119] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0120] It should be noted that all actions of acquiring signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.
[0121] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0122] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0123] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0124] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0125] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0126] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0127] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0129] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0130] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0131] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0132] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0133] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0134] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0135] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0136] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A business processing method, comprising: Receive a data processing request sent by a business party, wherein the data processing request carries confidential business data, a data volume corresponding to the confidential business data, and a value range corresponding to the confidential business data; Estimate the value range of the data processing result obtained after data processing the secret business data, wherein, according to the data volume corresponding to the secret business data and the value range corresponding to the secret business data, generate test data, the test data is plain text data, and the data volume corresponding to the test data matches the data volume corresponding to the secret business data; perform data processing on the test data to obtain the value range of the data processing result of the test data, and estimate the value range of the data processing result obtained after data processing the secret business data; According to the estimated value range, determining whether a data processing result obtained after processing the confidential business data will have data overflow; If so, the confidential business data is adjusted according to the estimated value range to obtain adjusted confidential business data, and business processing is performed according to the adjusted confidential business data.
2. According to the method as claimed in claim 1, the confidential business data is floating point data or integer data, and the confidential business data is composed of a confidential mantissa and a plaintext exponent, and the confidential mantissa is a variable ciphertext in multi-party secure computing technology or a variable ciphertext in homomorphic encryption technology.
3. The method according to claim 2, wherein the confidential business data is adjusted according to the estimated value range to obtain the adjusted confidential business data, specifically comprising: Determine the number of bits required to shift the secret mantissa of the secret business data according to the estimated number of significant digits of the maximum value in the value range, the arithmetic expression for data processing of the secret business data, and the maximum number of significant digits of the secret mantissa of the secret business data; Shifting the secret mantissa of the secret business data according to the number of bits required to be shifted, to obtain the shifted secret mantissa of the secret business data, and adjusting the plaintext exponent of the secret business data according to the number of bits required to be shifted, to obtain the adjusted plaintext exponent of the secret business data; The adjusted secret state business data is obtained according to the shifted secret state mantissa of the secret state business data and the adjusted plaintext exponent of the secret state business data.
4. The method according to claim 3, determining the number of bits required to shift the secret mantissa of the secret business data according to the estimated number of effective digits of the maximum value in the value range, the arithmetic expression for data processing of the secret business data, and the maximum effective digits of the secret mantissa of the secret business data, specifically comprising: Determine a target number of significant digits according to the estimated number of significant digits of the maximum value in the value range, wherein the target number of significant digits is the number of significant digits of the dense mantissa of the maximum value in the estimated value range; If the arithmetic expression is a multiplication expression, and the target number of effective digits is greater than the set number of digits of the secret mantissa of the secret business data, the number of effective digits of the secret mantissa of the secret business data is adjusted to the set number of digits, and the set number of digits is a set ratio of the maximum number of effective digits of the secret mantissa of the secret business data; The number of bits required to shift the secret mantissa of the secret business data is determined according to the difference between the target number of effective bits and the set number of bits of the secret mantissa of the secret business data.
5. The method of claim 3, further comprising: If the arithmetic expression is an additive expression and the plaintext exponent corresponding to the first addend is greater than the plaintext exponent corresponding to the second addend, the number of bits required to shift the secret mantissa corresponding to the first addend is determined based on the difference between the plaintext exponent corresponding to the first addend and the plaintext exponent corresponding to the second addend, and the first addend and the second addend are the secret business data.
6. The method of claim 3, further comprising: If the arithmetic expression is an additive expression and the plaintext exponent corresponding to the first addend is smaller than the plaintext exponent corresponding to the second addend, the number of bits required to shift the secret mantissa corresponding to the second addend is determined based on the difference between the plaintext exponent corresponding to the first addend and the plaintext exponent corresponding to the second addend, and the first addend and the second addend are the secret business data.
7. The method of claim 1, further comprising: If the estimated value range is larger than the set value range, the secret service data is precision converted to obtain converted secret service data, the data precision of the converted secret service data being larger than the data precision of the secret service data; Performing data processing on the converted secret service data by a preset data processing method for processing the converted secret service data, and determining a data processing result of the converted secret service data; The data processing result of the converted confidential business data is accurately restored to obtain the restored data processing result for business processing.
8. A business processing device, comprising: A receiving module, configured to receive a data processing request sent by a business party, wherein the data processing request carries confidential business data, a data volume corresponding to the confidential business data, and a value range corresponding to the confidential business data; An estimation module is used to estimate the value range of the data processing result obtained after the secret business data is processed, wherein test data is generated according to the data volume corresponding to the secret business data and the value range corresponding to the secret business data, the test data is plain text data, and the data volume corresponding to the test data matches the data volume corresponding to the secret business data; the test data is processed to obtain the value range of the data processing result of the test data, and the value range of the data processing result obtained after the secret business data is processed is estimated; A judgment module, used for judging whether a data processing result obtained after processing the confidential business data will have data overflow according to the estimated value range; The adjustment module is used to adjust the confidential business data according to the estimated value range to obtain adjusted confidential business data, and perform business processing according to the adjusted confidential business data.
9. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the program.
Citation Information
Patent Citations
Information processing method supporting overflow detection and big integer operation, and application
CN109361510A
Time series index construction method and device based on big data and computer equipment
CN111694839A
Data processing method and device, computer equipment and storage medium
CN114448597A
Data processing method and device, equipment, storage medium and program product
CN114647857A
Method and system for transformation of logical data objects for storage
US20090307250A1
