A high-precision privacy lstm prediction method and system

By employing a secure multi-party computation-based three-party privacy protection method, a privacy-preserving LSTM prediction system is constructed. This solves the problem of data privacy leakage in cross-platform joint computation, achieves high-precision LSTM model prediction, and ensures data security and computational efficiency.

CN120342611BActive Publication Date: 2026-03-03WUHAN CITMS TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510726650.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-31
Publication Date
2026-03-03
Estimated Expiration
2045-05-31

AI Technical Summary

Technical Problem

In the era of big data, how can we achieve high-precision LSTM model predictions without leaking data privacy in cross-platform joint distributed computing of machine learning models, especially when multiple stakeholders are involved, and how can we ensure data security and privacy?

Method used

A three-party privacy protection method based on secure multi-party computation is adopted. By constructing a privacy ternary multiplication protocol and a lookup table protocol through pseudo-random functions, additive secret shared values, replicated secret shared values ​​and distributed comparison protocols, the cross-platform joint distributed result prediction of LSTM model is realized, ensuring that no participant can obtain complete user data.

Benefits of technology

Without increasing computational complexity, high-precision prediction using the LSTM model is achieved, ensuring data privacy and transparency of the computation process, reducing the computational burden on all participants, and making it suitable for practical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120342611B_ABST
    Figure CN120342611B_ABST
Patent Text Reader

Abstract

The application relates to a high-precision privacy LSTM prediction method and system, which comprises the following steps: calculating the addition secret sharing value of a product through a pseudo-random function, constructing a privacy ternary multiplication protocol; constructing a mapping table of the addition secret sharing value to the replication secret sharing value through a preset segmentation function; constructing a table lookup protocol based on the mapping table and the privacy ternary multiplication protocol; constructing a power operation protocol based on the Taylor expansion of an exponential function and the privacy ternary multiplication protocol; constructing an activation function calculation protocol through the privacy table lookup protocol and the addition secret sharing value; in response to each calculation step of an LSTM input gate, a forgetting gate, an output gate and state updating, each participant calculates the prediction result of the LSTM through the privacy ternary multiplication protocol, the table lookup protocol, the power operation protocol and the activation function calculation protocol. The application ensures the safety of privacy data in the LSTM prediction process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of information security technology, and specifically relates to a privacy prediction method using a Long Short-Term Memory (LSTM) neural network model; more specifically, it relates to a high-precision privacy LSTM prediction method and system. Background Technology

[0002] Natural Language Processing (NLP) is an important field within computer science and artificial intelligence. It studies various theories and methods that enable effective communication between humans and computers using natural language. Modern NLP algorithms are based on machine learning, particularly statistical machine learning. They typically require a large set of "features" generated from the input data, with added real-valued weights to soften the decision-making process and express many different possible answers, striving to approach human-level lexical semantic transfer and narrative understanding.

[0003] Seq2Seq (Sequence to Sequence) deep learning models are a commonly used technique in natural language processing. This technology breaks through the traditional fixed-size input problem framework. Its core Long Short-Term Memory (LSTM) neural network model can effectively perform tasks such as translation, automatic text summarization, automatic question answering, and some regression predictions. It has been proven to perform well in English-French translation, English-German translation, and human-computer short question-and-answer applications. Google Translate began using the Seq2SeqModels With Attention model in production at the end of 2016, which optimizes the processing quality of long sentences.

[0004] However, while bringing convenience to people's lives, machine learning itself also presents a series of security issues, with privacy threats being a key factor restricting people's use of machine learning services. Since the availability of machine learning models is directly proportional to the amount of data available for training and prediction, commercial companies with massive amounts of mobile user data are the main beneficiaries of this practice. In the context of big data and cloud environments, the sheer volume of data sometimes exceeds the computing power of a single platform, necessitating collaborative distributed computing across platforms. In this situation involving multiple stakeholders, users worry about the leakage of their sensitive data, service providers worry about the theft of information related to their service models, and attackers may use various means to obtain data for profit.

[0005] Addressing data privacy concerns in the era of big data, this patent presents a highly efficient and privacy-preserving model prediction method and system for LSTM models. This solution employs secure multi-party computation to protect user data, meeting the privacy requirements of datasets in machine learning. Unlike computationally intensive protocols based on fully homomorphic encryption, the proposed three-party privacy-preserving prediction method and system ensures that sequence transformation can only be completed through joint computation by all three parties, preventing any single party from obtaining complete user data. Furthermore, based on lightweight secure multi-party computation components, it significantly reduces the computational burden on each participating party, demonstrating practical application value. Summary of the Invention

[0006] To achieve cross-platform joint distributed result prediction of LSTM models without compromising data privacy. A first aspect of the present invention provides a high-precision privacy-preserving LSTM prediction method, comprising: constructing a privacy ternary multiplication protocol by calculating the additive secret shared value of the product using a pseudo-random function based on random numbers generated by each participant; constructing a mapping table from the additive secret shared value to the replicated secret shared value using a preset piecewise function; constructing a lookup table protocol for the replicated secret shared value based on the mapping table and the privacy ternary multiplication protocol; determining the cached component of the secret shared value for each participant based on the Taylor expansion of the exponential function; constructing an exponentiation protocol for the replicated secret shared value using the cached component and the privacy ternary multiplication protocol; calculating the additive secret shared value based on a random derivation function and a distributed comparison protocol; constructing a calculation protocol for the replicated secret shared value of the activation function using the privacy lookup table protocol and the additive secret shared value; and, in response to each computation step of the LSTM input gate, forget gate, output gate, and state update, each participant calculates the LSTM prediction result using the privacy ternary multiplication protocol, the lookup table protocol for the replicated secret shared value, the exponentiation protocol for the replicated secret shared value, and the calculation protocol for the replicated secret shared value of the activation function.

[0007] In some embodiments of the present invention, the step of constructing a privacy ternary multiplication protocol by calculating the addition secret shared value of the product using a pseudo-random function based on the random number generated by each participant includes: each participant generating a random number; calculating two random masks for passing to the other two parties based on the random number; calculating the addition secret shared value of the product using a random derivation function based on the random masks and the replication secret shared value; and sending the addition secret shared value of the product to the corresponding participant.

[0008] In some embodiments of the present invention, the step of constructing the exponentiation protocol for the replicated secret shared value through the cached components and the privacy ternary multiplication protocol includes: determining the order of the Taylor expansion; starting from the second order of the Taylor expansion, all participants execute the privacy ternary multiplication protocol once and save the product of the replicated secret shared value; each participant calculates the expansion of the current order; sums up the calculation results of the expansions of all orders and uses the calculation results as the exponentiation value of the replicated secret shared value.

[0009] In some embodiments of the present invention, the computation protocol for constructing the replicated secret shared value of the activation function through a privacy lookup table protocol and an additive secret shared value includes: each participant calculating a random mask using a pseudo-random derivation function and generating two pairs of keys for a distributed comparison protocol using the random mask; sending the two pairs of keys to their respective participants; each participant calculating a mask fragment based on its own mask; performing the calculation of the comparison function in the distributed comparison protocol based on each participant's mask fragment and blind function; performing additive secret sharing on the calculation result of the comparison function; and each participant generating the replicated secret shared value of the activation function through a lookup table protocol.

[0010] Furthermore, the activation function includes the Sigmoid function or the tangent function.

[0011] In the above embodiments, in response to each computational step of the LSTM input gate, forget gate, output gate, and state update, each participant calculates the LSTM prediction result through a privacy triple multiplication protocol, a lookup protocol for the copied secret shared value, an exponentiation protocol for the copied secret shared value, and a computation protocol for the copied secret shared value of the activation function. This includes: each participant obtaining its own forget sequence based on its own forget gate input and weights using the computation protocol for the copied secret shared value of the first activation function; each participant obtaining its own input sequence based on its own input gate input and weights using the computation protocol for the copied secret shared value of the second activation function; each participant updating its state based on the forget gate result and retained information from the previous state using the privacy triple multiplication protocol; each participant obtaining its own output sequence based on its own output gate input and weights using the computation protocol for the copied secret shared value of the second activation function; each participant obtaining the output of the current time step based on its own output sequence using the privacy triple multiplication protocol; and iterating the above steps until a preset time step is reached based on the exponentiation protocol for the copied secret shared value, generating the final copied secret shared value sequence.

[0012] A second aspect of the present invention provides a high-precision privacy LSTM prediction system, comprising: a first construction module, configured to construct a privacy ternary multiplication protocol by calculating the additive secret shared value of the product using a pseudo-random function based on random numbers generated by each participant; a second construction module, configured to construct a mapping table from the additive secret shared value to the replicated secret shared value using a preset piecewise function; and to construct a lookup protocol for the replicated secret shared value based on the mapping table and the privacy ternary multiplication protocol; a third construction module, configured to determine the cached component of the secret shared value for each participant based on the Taylor expansion of the exponential function; and to construct a power operation protocol for the replicated secret shared value using the cached component and the privacy ternary multiplication protocol; a fourth construction module, configured to calculate the additive secret shared value using a randomized derived function and a distributed comparison protocol; and to construct a calculation protocol for the replicated secret shared value of the activation function using the privacy lookup protocol and the additive secret shared value; and a calculation module, configured to calculate the additive secret shared value using a randomized derived function and a distributed comparison protocol; and to construct a calculation protocol for the replicated secret shared value of the activation function using the privacy lookup protocol and the additive secret shared value.

[0013] A third aspect of the present invention provides an electronic device comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the high-precision privacy LSTM prediction method provided in the first aspect of the present invention.

[0014] In a fourth aspect, the present invention provides a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the high-precision privacy LSTM prediction method provided in the first aspect of the present invention.

[0015] The beneficial effects of this invention are:

[0016] First, current centralized machine learning methods are insufficient to meet the information explosion of the big data era, necessitating cross-platform collaborative computation. However, the security and privacy requirements of user data are bottlenecks hindering the implementation of collaborative learning. This invention addresses the security and privacy issues of multi-party distributed LSTM prediction tasks based on the concept of secure multi-party computation. It requires all participants to be online simultaneously during collaborative prediction while ensuring the security of private data throughout the prediction process. This invention avoids complex homomorphic encryption schemes and, based on a three-party replication and secret sharing structure, significantly improves the performance of basic operators. From both the overall system perspective and the perspective of each participant, the computational load remains within acceptable limits. Attached Figure Description

[0017] Figure 1This is a schematic diagram of the basic process of the high-precision privacy LSTM prediction method in some embodiments of the present invention;

[0018] Figure 2 This is a schematic diagram illustrating the specific process of a high-precision privacy LSTM prediction method in some embodiments of the present invention;

[0019] Figure 3 This is a schematic diagram of the structure of a high-precision privacy LSTM prediction system in some embodiments of the present invention;

[0020] Figure 4 This is a schematic diagram of the structure of an electronic device in some embodiments of the present invention. Detailed Implementation

[0021] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0022] refer to Figure 1 and Figure 2 In a first aspect of the present invention, a high-precision privacy LSTM prediction method is provided, comprising: S100. Calculating the additive secret shared value of the product using a pseudo-random function based on random numbers generated by each participant, and constructing a privacy ternary multiplication protocol; S200. Constructing a mapping table from the additive secret shared value to the replicated secret shared value using a preset piecewise function; constructing a lookup protocol for the replicated secret shared value based on the mapping table and the privacy ternary multiplication protocol; S300. Determining the cached component of the secret shared value for each participant based on the Taylor expansion of the exponential function; and constructing a lookup protocol for the replicated secret shared value using the cached component and the privacy ternary multiplication protocol. S400. Based on the randomized derivation function and distributed comparison protocol, calculate the addition secret shared value; construct the calculation protocol for the copied secret shared value of the activation function through the privacy lookup table protocol and the addition secret shared value; S500. In response to each computation step of the LSTM input gate, forget gate, output gate and state update, each participant calculates the LSTM prediction result through the privacy ternary multiplication protocol, the lookup table protocol for the copied secret shared value, the exponentiation protocol for the copied secret shared value and the calculation protocol for the copied secret shared value of the activation function.

[0023] It should be noted that in the following description of this solution, italic characters, such as... , represents the fixed-point number encoded as a ring element; bold lowercase, e.g. , represents a sequence vector. The vector represents the first The vector is a bit element, and the default vector is numbered starting from 1. Represents the first element of the vector; bold and uppercase, for example... , represents a matrix. This represents the Hadamard product of two vectors, calculated for each element of the vectors. . This means concatenating two vectors, i.e. Assuming there are 3 parties involved in the agreement, Indicates the first Regarding the secret value among the participating parties The addition secret is shared, and satisfies Each participant Holding an additive slice Furthermore, the definition Indicates the first Regarding the secret value among the participating parties The secret value is shared through replication. Then each participant hold And satisfy The two activation functions, the Sigmoid function, are defined as follows: The Tanh function is defined as follows: The exponential function is defined as follows: Pseudo-random derivation function Indicates seed-based Derive one or more domains Random numbers on the array.

[0024] This invention also uses the following basic protocol:

[0025] This represents a three-way multiplication protocol that can perform multiplication operations on the shared secrets of the three-way inputs. and Output to the three parties respectively and Make it satisfied After the agreement, each participating party only knows their own... It will not be exposed during execution. or other parties .

[0026] This represents a distributed comparison protocol that performs comparison operations on the secret values ​​input by two parties. The comparison function is defined as follows: The input domain of the hypothesis function. and output domain If it is public information, then It includes the following two algorithms:

[0027] Key generation algorithm Enter security parameters Description of comparison functions Output a pair of keys ;

[0028] Secure computation algorithm Enter participant identifier key Sum The secret sharing of the output bits .

[0029] Correctness requirement: For any comparison function ,if It is by A correctly generated key pair, then

[0030] Security requirement: Given and only one half of the key. No relevant information could be obtained. Or another party's key and calculation results Information.

[0031] Three parties A pseudo-random derivation seed is pre-set. To satisfy .

[0032] To calculate the secret value of the replicated secret share. (satisfy The product of ) Each participant All of them require the execution of relevant calculations.

[0033] Therefore, in step S100 of some embodiments of the present invention, the step of calculating the additive secret shared value of the product using a pseudo-random function based on the random number generated by each participant, and constructing a privacy ternary multiplication protocol, includes:

[0034] S101. Each participant generates a random number and calculates two random masks based on the random number to be passed to the other two parties;

[0035] Specifically, each participant Generate a random number Calculate two random masks , Each participant send Give , Give .

[0036] S102. Based on a random mask and a replicated secret shared value, calculate the addition secret shared value of the product using a random derivation function;

[0037] Specifically, each participant Using pseudo-random derivation functions The secret sharing of addition for calculating products .

[0038] S103. Send the addition secret shared value of the product to the corresponding participant.

[0039] Specifically, each participating party send Give Simultaneously receive Sent . Local save As the product result The copied secret shared value.

[0040] To calculate the secret value of the replicated secret share. (satisfy The power operation It is known that exp can be modeled using Taylor expansion, i.e.

[0041]

[0042] Therefore, each participant All require the execution of related calculations. Therefore, in step S200 of some embodiments of the present invention, the step of constructing the exponentiation protocol for replicating the secret shared value through the cached components and the privacy ternary multiplication protocol includes:

[0043] S201. Determine the order of the Taylor expansion;

[0044] Specifically, each participant Initialize a cache variable for secret sharing. ,in Set your own cached variable to , Set the cache variable to , Set the cache variable to Each participant The secret sharing of initializing an iteration variable, namely and an iterative control variable :from Up to 4,

[0045] S202. Starting from the second order of Taylor expansion, all parties execute a privacy ternary multiplication protocol once to save the product of the replicated secret shared value;

[0046] Specifically, all parties involved jointly execute the multiplication agreement. Store the calculation results as satisfy ;

[0047] S203. Each participant calculates the expansion for the current order;

[0048] Specifically, each participating party calculates locally. ;

[0049] S204. Accumulate the calculation results of the expansions of all orders, and use the calculation results as the power operation value of the copied secret shared value.

[0050] Specifically, each participating party Local save As a result The copied secret shared value.

[0051] In step S200 of some embodiments of the present invention, the following is included:

[0052] S201. Construct a mapping table from additive secret shared value to replicated secret shared value using a preset piecewise function; S202. Construct a lookup protocol for replicated secret shared value based on the mapping table and the privacy ternary multiplication protocol;

[0053] First, define a lookup table with (2 inputs, 1 output). as follows:

[0054]

[0055] When input assignment The Secret of Addition (satisfy ), and function expression Secret sharing of replication (satisfy The result of the lookup table calculation Calculation steps:

[0056] 1) All participating parties, based on the principle of replication and secret sharing, will... Re-share as a copy secret sharing format ;

[0057] 2) Each participant Piecewise results of local computation functions ;

[0058] 3) All parties involved shall jointly execute the multiplication agreement. The result was obtained. satisfy Local calculations by each participant ;

[0059] 4) For Holding the addition secret shared value That side calculate Other parties calculate The calculation result was then reshared in a copy secret sharing format. ;

[0060] 5) All parties involved shall jointly execute the multiplication agreement. The result was obtained. satisfy ;

[0061] All participating parties Local save As a search result The copied secret shared value.

[0062] To calculate the value of the replicated secret share Sigmoid function value Each participant The following calculations must be performed.

[0063] Therefore, in step S300 of some embodiments of the present invention, the calculation protocol for constructing the replication secret shared value of the activation function through the privacy lookup table protocol and the additive secret shared value includes:

[0064] S301. Each participant uses a pseudo-random derivation function to calculate a random mask and generates two pairs of keys for the distributed comparison protocol using the random mask;

[0065] S302. Send the two key pairs to the corresponding participants respectively; each participant calculates mask fragments based on its own mask; specifically, the participants... A random mask is obtained by calculating a pseudo-random derived function. And generate two pairs of DCF keys:

[0066] , , key Send to , the key Send to .

[0067] S303. Based on the mask fragmentation and blind function of each participant, perform the calculation of the comparison function in the distributed comparison protocol; specifically, in the online phase, the participants... Send mask fragments Give The first random mask Calculated from pseudo-random derived functions ;

[0068] 1) Participating parties Send second mask fragment Give The second random mask Calculated from pseudo-random derived functions ;

[0069] 2) Each participant Calculate the value of the blind function ;use Complete the DCF function calculation:

[0070] , .

[0071] S304. The calculation result of the comparison function is secretly shared through addition;

[0072] Specifically, Set your own DCF function result addition secret sharing as follows: ; Set your own DCF function result addition secret sharing as follows: ; Set your own DCF function result addition secret sharing as follows: .

[0073] S305. Each participant generates a copy secret shared value for the activation function through a lookup table protocol.

[0074] Specifically, all parties involved jointly participate in the privacy lookup table multiplication protocol. Each participant inputs and , get output , which serves as a secret shared value for copying the Sigmoid function value.

[0075] Furthermore, in order to calculate the value of the replicated secret share... Tanh function value Each participant The following calculation steps must be performed:

[0076] 1) All parties jointly participate in the privacy Sigmoid protocol. Each participant inputs , obtain the Sigmoid value .

[0077] 2) Each participant Local calculation of Tanh function results .

[0078] The purpose of LSTM (Long Short Memory Network) neural networks is to... Sequence of length Transform into Sequence of length To achieve the desired result regarding the input sequence... To protect privacy, each participating party preprocesses the sequence vector according to the replication and secret sharing rules (i.e., Then, the following operations are performed to complete the privacy sequence transformation of LSTM:

[0079] In step S400 of the above embodiment, in response to each computation step of the LSTM input gate, forget gate, output gate, and state update, each participant calculates the LSTM prediction result through a privacy ternary multiplication protocol, a lookup protocol for the copied secret shared value, a power operation protocol for the copied secret shared value, and a computation protocol for the copied secret shared value of the activation function. This includes: S401. Each participant, based on its own forget gate input and weights, obtains its own forget sequence through the computation protocol for the copied secret shared value of the first activation function; S402. Each participant, based on its own input gate input and weights, obtains its own forget sequence through the computation protocol for the copied secret shared value of the second activation function. S403. Each participant updates its state using a privacy ternary multiplication protocol based on the forget gate result and retained information from the previous state. S404. Each participant, based on the input and weights of its output gate, obtains its output sequence using a protocol for calculating the copied secret shared value of the second activation function. S405. Each participant, based on its output sequence, obtains the output for the current time step using a privacy ternary multiplication protocol. S406. Based on a protocol for exponentiation of the copied secret shared value, the above steps are iterated until a preset time step is reached, generating the final sequence of copied secret shared values.

[0080] Specifically:

[0081] Step 1. For each time step Perform steps 2-5:

[0082] Step 2. (The Forgotten Gate)

[0083] 2.a. Calculate the input to the forget gate Other participants Calculate your own forget gate input The weight of the forgetting gate and positive value This is known to all parties involved;

[0084] 2.b. All parties jointly participated in the first multi-party privacy Sigmoid protocol. Each participant inputs Obtain the forgetting sequence According to the settings, the input and output satisfy the equation ;

[0085] Step 3. (Input Gate)

[0086] 3.a. Calculate input gate input Other participants Calculate your own input gate input Among them, the weights of the input gates and positive value It is known to all the parties involved.

[0087] 3.b. All parties jointly participate in the second multi-party privacy Sigmoid protocol. Each participant inputs , to obtain the input sequence According to the settings, the input and output satisfy the equation ;

[0088] 3.c Calculate the state input of the previous time step Other participants Calculate the state input of the previous time step Similarly, weight and positive value This is known to all parties involved;

[0089] 3.d All parties jointly participate in the first multi-party privacy Tanh agreement. Each participant inputs The state-preserving sequence of the previous time step is obtained. According to the settings, the input and output satisfy the equation ;

[0090] Step 4. (Status Update)

[0091] 4.a. All participating parties Jointly participate in the privacy multiplication agreement Each participant inputs and To obtain the forgetting result of the previous state. According to the settings, the input and output satisfy the equation ;

[0092] 4.b. All participating parties Jointly participate in the second privacy multiplication protocol Each participant inputs and Obtain the retained information from the previous state. According to the settings, the input and output satisfy the equation ;

[0093] 4.c. Each participant Calculate the state update result for this time step. ;

[0094] Step 5. (Output Gate)

[0095] 5.a. Calculate the input of the output gate Other participants Calculate your own output gate input as Similarly, the weights of the input gates and positive value This is known to all parties involved;

[0096] 5.b. All parties jointly participate in the multi-party privacy Sigmoid protocol. Each participant inputs , to obtain the sequence output According to the settings, the input and output satisfy the equation ;

[0097] 5.c All parties jointly participate in the multi-party privacy tanh agreement. Each participant inputs , obtain the state output According to the settings, the input and output satisfy the equation ;

[0098] 5.d. All participating parties Jointly participate in the privacy multiplication agreement Each participant inputs and The output of this time step is obtained. According to the settings, the input and output satisfy the equation ;

[0099] All participating parties Organize the output of each time step , as the result sequence The secret shared sequence of replication.

[0100] In deep learning models, exponentiation often occurs in certain activation functions, loss functions, or regularization terms. Here are some possible scenarios where exponentiation might occur: 1. Activation Functions • ReLU (Rectified Linear Unit): While ReLU itself does not involve exponentiation, its variants such as Leaky ReLU or PReLU may involve simple multiplication or addition operations.

[0101] It is understood that this invention designs a privacy-aware prediction method and system for Long Short-Term Memory (LSTM) neural networks. This scheme utilizes a secure three-party computation approach, combined with high-precision exponentiation and distributed comparison functions to protect user data, thus meeting the privacy requirements of datasets in machine learning. Unlike computationally intensive protocols based on fully homomorphic encryption, the privacy-preserving LSTM prediction method and system proposed in this patent ensures that the prediction process requires joint computation by all three parties, preventing any single party from obtaining complete user data. Furthermore, based on lightweight copy secret sharing and distributed comparison function components, it significantly reduces the computational burden on each participating party, demonstrating practical application value.

[0102] Example 2

[0103] refer to Figure 3 In a second aspect, the present invention provides a high-precision privacy LSTM prediction system 1, comprising: a first construction module 11, configured to construct a privacy ternary multiplication protocol by calculating the additive secret shared value of the product using a pseudo-random function based on random numbers generated by each participant; a second construction module 12, configured to construct a mapping table from the additive secret shared value to the replicated secret shared value using a preset piecewise function; and to construct a lookup table protocol for the replicated secret shared value based on the mapping table and the privacy ternary multiplication protocol; a third construction module 13, configured to determine the cached component of the secret shared value for each participant based on the Taylor expansion of the exponential function; and to construct a power operation protocol for the replicated secret shared value using the cached component and the privacy ternary multiplication protocol; a fourth construction module 14, configured to calculate the additive secret shared value based on a random derivation function and a distributed comparison protocol; and to construct a calculation protocol for the replicated secret shared value of the activation function using the privacy lookup table protocol and the additive secret shared value; and a calculation module 15, configured to calculate the additive secret shared value based on a random derivation function and a distributed comparison protocol; and to construct a calculation protocol for the replicated secret shared value of the activation function using the privacy lookup table protocol and the additive secret shared value.

[0104] Furthermore, the first construction module 11 includes: a transmission unit, used to generate a random number for each participant and calculate two random masks based on the random number for transmission to the other two parties; a calculation unit, used to calculate the addition secret shared value of the product based on the random mask and the replicated secret shared value through a random derivation function; and a sending unit, used to send the addition secret shared value of the product to the corresponding participant.

[0105] Example 3

[0106] refer to Figure 4 In a third aspect, the present invention provides an electronic device comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the high-precision privacy LSTM prediction method of the first aspect of the present invention.

[0107] Electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. An input / output (I / O) interface 505 is also connected to bus 504.

[0108] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, hard disks; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 4 Each box shown can represent a device or multiple devices as needed.

[0109] Specifically, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by a processing device 501, it performs the functions defined in the methods of embodiments of this disclosure. It should be noted that the computer-readable medium described in embodiments of this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0110] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more computer programs, which, when executed by the electronic device, cause the electronic device to:

[0111] Computer program code for performing the operations of embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, C++, and Python—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0112] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0113] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A high-precision privacy-preserving LSTM prediction method, characterized by comprising: Based on the random numbers generated by each participant, a privacy-preserving ternary multiplication protocol is constructed by calculating the additive secret shared value of the product using a pseudo-random function: Each participant generates a random number and calculates two random masks to be passed to the other two parties; based on the random masks and the replicated secret shared value, the additive secret shared value of the product is calculated using a random derivation function; the additive secret shared value of the product is then sent to the corresponding participant. A mapping table from additive secret shared values ​​to replicated secret shared values ​​is constructed by using a preset piecewise function; a lookup protocol for replicated secret shared values ​​is constructed based on the mapping table and the privacy ternary multiplication protocol. Based on the Taylor expansion of the exponential function, the cache component secretly shared by each participant is determined; A power operation protocol for replicating secret shared values ​​is constructed using the cached components and the privacy ternary multiplication protocol. Based on a randomized derivation function and a distributed comparison protocol, an additive secret shared value is calculated. A protocol for calculating the replicated secret shared value of the activation function is constructed using a privacy lookup protocol and the additive secret shared value: Each participant calculates a random mask using a pseudo-randomized derivation function and generates two pairs of keys for the distributed comparison protocol using the random mask; the two pairs of keys are sent to their respective participants; each participant calculates a mask fragment based on its own mask; based on each participant's mask fragment and blind function, the comparison function in the distributed comparison protocol is calculated; the calculation result of the comparison function is then used for additive secret sharing; each participant generates the replicated secret shared value of the activation function through a lookup protocol. In response to each computational step of the LSTM input gate, forget gate, output gate, and state update, each participant computes the LSTM prediction result through a privacy ternary multiplication protocol, a lookup protocol for the copied secret shared value, a power operation protocol for the copied secret shared value, and a computation protocol for the copied secret shared value of the activation function.

2. The high-precision privacy-preserving LSTM prediction method according to claim 1, is characterized in that, The step of constructing the exponentiation protocol for replicating the secret shared value using the cached components and the privacy ternary multiplication protocol includes: Determine the order of the Taylor expansion; Starting from the second order of Taylor expansion, all parties execute a privacy ternary multiplication protocol once to save the product of the replicated secret shared value; Each participant calculates the expansion for the current order; The results of the expansions of all orders are summed, and the results are used as the power operation value of the replicated secret shared value.

3. The high-precision privacy LSTM prediction method according to claim 1 is characterized in that the activation function includes a sigmoid function or a tangent function.

4. The high-precision privacy-preserving LSTM prediction method according to claim 1, characterized in that, in response to each computation step of the LSTM input gate, forget gate, output gate, and state update, each participant calculates the LSTM prediction result through a privacy ternary multiplication protocol, a lookup protocol for the copied secret shared value, a power operation protocol for the copied secret shared value, and a computation protocol for the copied secret shared value of the activation function, including: Each participant obtains its own forgetting sequence based on its own forgetting gate input and weight, through the calculation protocol of the copy secret shared value of the first activation function; Each participant obtains its own input sequence based on the input and weight of its own input gate through the calculation protocol of the replication secret shared value of the second activation function; Each participant updates its state using a privacy ternary multiplication protocol, based on the forget gate result and retained information from the previous state. Each participant, based on the input and weight of its own output gate, obtains its own output sequence through the calculation protocol of the replication secret shared value of the second activation function; each participant, based on its own output sequence, obtains the output of the current time step through the privacy ternary multiplication protocol. Based on the exponentiation protocol of the replicated secret shared value, the above steps are iterated until a preset time step is reached to generate the final sequence of replicated secret shared values.

5. A high-precision privacy-preserving LSTM prediction system, characterized in that, include: The first construction module is used to construct a privacy ternary multiplication protocol by calculating the additive secret shared value of the product using a pseudo-random function based on the random numbers generated by each participant: Each participant generates a random number, calculates two random masks based on the random number to be passed to the other two parties; based on the random masks and the replicated secret shared value, calculates the additive secret shared value of the product using a random derivation function; and sends the additive secret shared value of the product to the corresponding participant. The second construction module is used to construct a mapping table from additive secret shared values ​​to replicated secret shared values ​​through a preset piecewise function; and to construct a lookup protocol for replicated secret shared values ​​based on the mapping table and the privacy ternary multiplication protocol. The third building block is used to determine the cache component secretly shared by each participant based on the Taylor expansion of the exponential function; A power operation protocol for replicating secret shared values ​​is constructed using the cached components and the privacy ternary multiplication protocol. The fourth construction module is used to calculate the additive secret shared value based on the random derivation function and the distributed comparison protocol; and to construct the calculation protocol for the replicated secret shared value of the activation function through the privacy lookup table protocol and the additive secret shared value: each participant calculates a random mask using a pseudo-random derivation function, and generates two pairs of keys for the distributed comparison protocol using the random mask; the two pairs of keys are sent to the corresponding participants respectively; each participant calculates a mask fragment based on its own mask; and the calculation of the comparison function in the distributed comparison protocol is executed based on each participant's mask fragment and blind function. The calculation result of the comparison function is secretly shared through addition; each participant generates a copy secret shared value of the activation function through a lookup table protocol; The computation module is used to respond to each computation step of the LSTM input gate, forget gate, output gate, and state update. Each participant computes the LSTM prediction result through the privacy ternary multiplication protocol, the lookup protocol for the copied secret shared value, the exponentiation protocol for the copied secret shared value, and the computation protocol for the copied secret shared value of the activation function.

6. An electronic device, comprising: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the high-precision privacy LSTM prediction method as described in any one of claims 1 to 4.

7. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the high-precision privacy LSTM prediction method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Input information privacy protection system and method based on secure two-party calculation

    CN114707169A

  • Bilinear mapping-based three-party privacy set intersection cardinal number calculation method and system

    CN117353912A