Decision tree product recommendation method based on two-party security calculation
Through the decision tree product recommendation method based on two-party security calculations, using secret sharing and conditional inadvertent transmission protocols, the problems of large communication overhead and rounds in the existing technology are solved, and efficient and secure product recommendation is achieved.
Patent Information
- Application Number
- CN202510897647.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-07-01
AI Technical Summary
The existing privacy protection decision tree evaluation method has a large overhead in communication overhead and communication rounds, and it is difficult to achieve efficient security calculations in both scenarios.
The decision tree product recommendation method based on two-party security calculations is adopted, and through secret sharing and inadvertent transmission protocols, the communication overhead is reduced and the constant round of communication is realized to ensure that data and model privacy is not leaked.
It realizes efficient product recommendation without revealing user personal information and model information, reduces communication overhead and number of communication rounds, and improves decision tree evaluation performance.
Smart Images

Figure CN120409632A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of decision trees, and particularly relates to a decision tree product recommendation method based on two-party secure computation. Background Art
[0002] With the rapid development of big data and artificial intelligence technologies, decision trees, as an efficient and intuitive classification model, are widely used in recommendation systems in various fields such as healthcare and finance. In these applications, user personal information often involves sensitive information (such as user preferences, budgets, etc.), and the model itself usually requires a large amount of computing resources and data for training, with high economic value. Therefore, how to evaluate decision trees while ensuring data privacy and model privacy has become an important challenge.
[0003] Privacy-preserving decision tree evaluation uses related technologies such as secure multi-party computation and homomorphic encryption on the basis of traditional decision trees to protect the data of data holders and the models of model holders. In the secure multi-party computation scenario, it is allowed for data holders and model holders to jointly calculate the final classification result using the decision tree model according to the input feature data without leaking the data and the model. In current privacy-preserving decision tree evaluation, the main problem is how to reduce communication overhead and the number of communication rounds and improve the evaluation performance of decision trees.
[0004] "J. P. K. Ma, R. K. H. Tai, Y. Zhao, S. S. Chow, “Let's strideblindfolded in a forest: Sublinear multi-client decision trees evaluation” NDSS.2021" proposes a new protocol or framework that allows users to outsource classification tasks to a third party while protecting data and model privacy. Combining lightweight encryption technologies (such as partial homomorphic encryption) or secure multi-party computation (SMPC), the computing process is optimized to reduce overhead. The performance overhead of this solution is relatively large.
[0005] "M. Barni, P. Failla, V. Kolesnikov, R. Lazzeretti, A.-R. Sadeghi, and T. Schneider, “Secure evaluation of private linear branching programs with medical applications,” in Proc. Eur. Symp. Res. Comput. Secur., 2009, pp. 424–439." proposed a secure evaluation scheme for private linear branching programs (LBP), mainly aiming at the privacy protection requirements in the medical field. Using Yao's garbled circuit protocol, the logic of LBP is transformed into a Boolean circuit to achieve secure computation between two parties (the model party and the data party). Additive secret sharing is performed on the matrix parameters and user input data of LBP and distributed to multiple parties, combined with partial homomorphic encryption (such as Paillier) to support linear operations in the encrypted state. This scheme has a large performance overhead, low computational efficiency for large-scale LBP, and does not achieve UC security.
[0006] "R. K. H. Tai, J. P. K. Ma, Y. Zhao, and S. S. M. Chow, “Privacy-preserving decision trees evaluation via linear functions,” in Proc. Eur. Symp. Res. Comput. Secur., 2017, pp. 494–512." proposed a privacy-preserving decision tree evaluation protocol based on linear functions, linearly representing the decision tree, and encoding each path from the root to the leaf as a linear function. Using the Paillier homomorphic encryption scheme to support linear operations in the encrypted state. This protocol does not achieve UC security, and the number of paths in the decision tree grows exponentially with the depth, resulting in the server needing to pre-compute and store the linear parameters of all paths, which is not applicable to large-scale trees.
[0007] "Ji, K., Zhang, B., Lu, T., Li, L., & Ren, K. (2023). UC SecurePrivate Branching Program and Decision Tree Evaluation. IEEE Transactions onDependable and Secure Computing, 20, 2836-2848." uses the distributed point function and the distributed interval containment function to implement a privacy protection protocol for the evaluation of constant-round and linear-round branching programs and decision trees under UC security. This protocol requires three parties to participate in the calculation and is difficult to implement in a two-party scenario, while the two-party scenario is relatively common in practical applications. Summary of the Invention
[0008] Aiming at the problems existing in the prior art, the purpose of the embodiments of this application is to provide a decision tree product recommendation method based on two-party secure computing.
[0009] According to the first aspect of the embodiments of this application, a decision tree product recommendation method based on two-party secure computing is provided, which is applied to a data holder or a model holder. The data holder holds the eigenvalue including user personal information, and the model holder holds the decision tree for product recommendation. The method includes:
[0010] S1: Obtain the secret sharing of the decision tree root node index and the lookup table. Among them, the data holder and the model holder respectively obtain the eigenvalue lookup table and the node information lookup table;
[0011] S2: Based on the secret sharing of the currently held node index and the lookup table, obtain the secret sharing of the node information of the corresponding node on the decision tree through the selection protocol, so as to obtain the secret sharing of the corresponding eigenvalue index, and obtain the secret sharing of the corresponding eigenvalue through the lookup table;
[0012] S3: Compare the eigenvalue and the threshold through the conditional oblivious transfer protocol, so as to select the secret sharing of the left subtree node index or the secret sharing of the right subtree node index;
[0013] S4: Based on the secret sharing of the selected node index, obtain the secret sharing of the node information of the corresponding node on the decision tree through the selection protocol, so as to obtain the secret sharing of the corresponding classification value. Update the secret sharing of the product recommendation result based on the secret sharing of the classification value, and return to step S2 to traverse the decision tree until a predetermined number of nodes are traversed to obtain the product recommendation result.
[0014] Further, the index of each node in the decision tree includes the eigenvalue index, the left subtree node index, the right subtree node index, the threshold, and the secret sharing of the classification value.
[0015] Further, the data holder and the model holder respectively hold an eigenvalue lookup table and a node information lookup table. The eigenvalue lookup table is used to look up the corresponding eigenvalue through the secret sharing of the eigenvalue index, and the node information lookup table is used to look up the secret sharing of the corresponding node information through the secret sharing of the node index. The secret sharing of the node information includes the secret sharing of the eigenvalue index, the left subtree node index, the right subtree node index, the threshold, and the classification value.
[0016] Further, step S2 includes:
[0017] Displacing the lookup table held by itself through the vector oblivious transfer evaluation protocol, so that both the data holder and the model holder obtain the secret sharing of the displaced lookup table;
[0018] Based on the secret sharing of the currently held node index and the secret sharing of the displaced node information lookup table, obtaining the secret sharing of the node information of the corresponding node on the decision tree;
[0019] Obtaining the secret sharing of the eigenvalue index in the secret sharing of the node information, and obtaining the secret sharing of the corresponding eigenvalue through the secret sharing of the displaced eigenvalue lookup table.
[0020] Further, displacing the lookup table held by itself through the vector oblivious transfer evaluation protocol, so that both the data holder and the model holder obtain the secret sharing of the displaced lookup table, specifically:
[0021] The data holder randomly selects a first random displacement value, displaces the eigenvalue lookup table held by itself based on the first random displacement value to obtain a first displaced eigenvalue lookup table; based on the vector oblivious transfer evaluation protocol and the first displaced eigenvalue lookup table, both the data holder and the model holder obtain the secret sharing of the second displaced eigenvalue lookup table, and the model holder also obtains the second random displacement value. The second displaced eigenvalue lookup table is obtained by XOR displacement based on the first random displacement value and the second random displacement value.
[0022] The model holder randomly selects a third random displacement value, and displaces the node information lookup table it holds based on the third random displacement value to obtain a first displaced node information lookup table; based on the vector oblivious displacement evaluation protocol and the first displaced node information lookup table, both the data holder and the model holder obtain a secret sharing of the second displaced node information lookup table, and the data holder also obtains a fourth random displacement value. The second displaced node information lookup table is obtained by XOR displacement based on the third random displacement value and the fourth random displacement value.
[0023] Further, for the secret sharing of the eigenvalue and the threshold, a conditional oblivious transfer protocol is used for comparison to select the left subtree node index or the right subtree node index, including:
[0024] Using a secure comparison protocol, compare the secret sharing of the eigenvalue and the threshold to obtain a comparison result;
[0025] Based on the comparison result, calculate the index through secret sharing addition and multiplication to select the left subtree node index or the right subtree node index.
[0026] Further, using a secure comparison protocol, compare the secret sharing of the eigenvalue and the threshold to obtain a comparison result, including:
[0027] Perform bitwise XOR and boolean-to-arithmetic operations on the secret sharing of the eigenvalue and the threshold to obtain a first arithmetic list;
[0028] Convert the first arithmetic list to a second arithmetic list, where the second arithmetic list satisfies: containing a unique zero value at the first non-zero bit of the first arithmetic list;
[0029] The data holder randomly selects 0 or 1 and generates an index list, and uses the oblivious subsequence zero value check protocol to check whether there is a zero value in the second arithmetic list, so that the model holder receives the zero value detection result. Based on the 0 or 1 randomly generated by the data holder and the zero value detection result held by the model holder, obtain the comparison result.
[0030] According to the second aspect of the embodiments of the present application, a computer program product is provided, including computer programs / instructions, and when the computer programs / instructions are executed by a processor, the method described in the first aspect is implemented.
[0031] According to the third aspect of the embodiments of the present application, an electronic device is provided, including:
[0032] One or more processors;
[0033] A memory for storing one or more programs;
[0034] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in the first aspect.
[0035] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
[0036] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:
[0037] It can be seen from the above embodiments that the present application adopts a privacy protection method based on two-party secure computing to avoid the leakage of user personal information and decision tree model information that may be caused when the data holder and the model holder use the product recommendation decision tree model to make predictions (i.e., product recommendations) during the product recommendation process, so that the model holder and the data holder can safely complete the product recommendation decision based on the model and user personal data held respectively without leaking any information about the user's personal information and the model; in addition, by selecting the protocol and the conditional oblivious transfer protocol, the online communication overhead is reduced, and the number of communication rounds is a constant round, which greatly improves the evaluation performance of the decision tree.
[0038] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] Figure 1 The present invention is a flowchart showing a decision tree product recommendation method based on two-party secure computation according to an exemplary embodiment.
[0041] Figure 2 is a schematic diagram of filling a decision tree according to an exemplary embodiment.
[0042] Figure 3 The present invention is a block diagram showing a device for recommending products using a decision tree based on two-party secure computation according to an exemplary embodiment.
[0043] Figure 4 The figure is a schematic diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0044] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application.
[0045] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "said", and "the" used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0046] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to a determination".
[0047] The present application provides a decision tree prediction method based on two-party secure computing, which adopts privacy protection means based on two-party secure computing, overcomes the data information leakage and model information leakage that may occur when the data holder and the model holder use the decision tree for prediction in traditional decision trees, enables the model holder and the data holder to securely calculate the classification result of the decision tree based on data samples without disclosing any information about the data samples and the model, and this method can be applied to medical decision-making, personal information authentication, product recommendation, financial product risk prediction, etc. The following will be described in detail in combination with product recommendation.
[0048] The present application provides a decision tree product recommendation method based on two-party secure computing, as Figure 1 shown, this method includes the following content:
[0049] Step S1: The data holder and the model holder respectively obtain the secret sharing of the decision tree root node index. The data holder creates a feature value lookup table of the decision tree, and the model holder creates a node information lookup table of the decision tree;
[0050] Specifically, the data holder holds eigenvalue, which is a feature vector containing user's personal information (such as preferences, budget, etc.) in this embodiment. The decision tree held by the model holder is a pre-trained decision tree model, which is a pre-trained decision tree model for product recommendation in this embodiment. The classification values of each leaf node of the decision tree represent a product respectively. Then the output prediction result y represents a certain product finally recommended by the model for the user, that is, the product recommendation result.
[0051] It should be noted that this application does not limit the product type. The product can be common products on the shopping platform (such as daily necessities, food, etc.), or financial products, insurance products, medical products, digital products, etc.
[0052] In the specific implementation, as Figure 2 shown, in order not to disclose the structure information of the decision tree, a virtual node is set in the decision tree. All leaf nodes point to this virtual node, and the virtual node points to itself. For the non-leaf nodes in this decision tree, a virtual classification value 0 is assigned to them, so that the final output y of the decision tree is not affected by the classification values of the non-leaf nodes. Therefore, the final value of y is equal to the classification value of the leaf node, which is the final classification value.
[0053] Data holder and model holder First, it is necessary to initialize the root node index and respectively obtain the secret sharing of the root node of the decision tree. The secret sharing of each node index (including the root node index) of the decision tree includes the eigenvalue index , the left subtree node index , the right subtree node index , the threshold , and the secret sharing of the classification value . Subsequently, based on the secret sharing of the root node index, it can be determined whether to go to the left subtree or the right subtree by comparing the eigenvalue and the threshold at the root node, and the secret sharing of the left subtree node index or the right subtree node index can be obtained according to the comparison result.
[0054] Then, the data holder creates a feature value lookup table of the decision tree , and the model holder creates a node information lookup table of the decision tree ;
[0055] The feature value lookup table is used to look up the eigenvalue through the secret sharing of the eigenvalue index ;
[0056] The node information lookup table Secret sharing for finding node information by node index secret sharing , secret sharing of node information Includes eigenvalue index [ , left subtree node index , right subtree node index , threshold[ , classification value[ .
[0057] Step S2: Based on the currently held secret sharing of the node index and the lookup table, the secret sharing of the node information of the corresponding node on the decision tree is obtained through the selection protocol, thereby obtaining the secret sharing of the corresponding eigenvalue index, and the secret sharing of the corresponding eigenvalue is obtained through the lookup table;
[0058] Specifically, to protect data privacy and model privacy, Can't let Get the index of the corresponding eigenvalue , Can't let Get the node index nidx. Therefore, it is necessary to use the Vector ObliviousShift Evaluation (VOSE) protocol to look up the table. 、 Perform the shift operation and both parties obtain the lookup table 、 Secret sharing after shifting. Based on the current and Secret sharing of node index held , using the shifted lookup table Secret sharing, secret sharing of obtaining node information, secret sharing based on the eigenvalue index , using the shifted lookup table Secret sharing of the corresponding eigenvalue is obtained .
[0059] The VOSE protocol is used for displacement, so that both the data holder and the model holder can obtain the secret sharing of the lookup table after displacement. Specifically:
[0060] Holds the lookup table , randomly select a first random displacement value , the lookup table based on The lookup table obtained after shifting Enter the protocol, through which Will receive , Received and a second random displacement value , satisfying , , where is equal to the lookup table shifted to the right by bits. Therefore can be obtained by publicly querying to obtain the original corresponding eigenvalue without leaking the corresponding information of the original lookup table and the information of the index value.
[0061] Similarly holding the lookup table , randomly select a third random displacement value , and shift the lookup table based on to obtain the shifted lookup table input the protocol through which will receive and a fourth random displacement value , received , satisfying , , where is equal to the lookup table shifted to the right by bits. Therefore the original node index value corresponding node information can be obtained by publicly querying the node index value [nidx’] without leaking the corresponding information of the original lookup table and the information of the index value.
[0062] Through the VOSE protocol, the online communication overhead can be reduced to O(n), and the number of communication rounds is 2 rounds, which is a constant number of rounds, reducing the communication overhead and the number of communication rounds of the privacy-preserving decision tree evaluation and improving the performance of the privacy-preserving decision tree evaluation.
[0063] Step S3: Secret sharing of the eigenvalue and the threshold, and comparison is performed through the Conditional Oblivious Transfer (COT) protocol to select the secret sharing of the left subtree node index or the secret sharing of the right subtree node index;
[0064] To protect the model privacy and not leak the connection information of the decision tree nodes, the next node needs to be secretly selected according to the comparison result of the eigenvalue and the threshold. After inputting the eigenvalue and the threshold, the COT protocol will first call the secure comparison protocol to compare the eigenvalue and the threshold , output the comparison result . After receiving the comparison result, the participating parties calculate the index through secret sharing addition and multiplication . That is, when the comparison result is 1, the eigenvalue is less than the threshold, and the left subtree node index is selected. When the comparison result is 0, the eigenvalue is greater than or equal to the threshold, and the right subtree node index is selected.
[0065] The secure comparison protocol compares the eigenvalues bit by bit through XOR operations starting from the most significant bit and the threshold , and its formal representation is , where is and the first different bit in the binary representation. When , , when , . It should be noted that when = , there is no different bit. Therefore, to ensure the existence of the first difference bit, 0 is appended to the end of , and 1 is appended to the end of . That is, when = , (if it is necessary to calculate , then 1 is appended to the end of , and 0 is appended to the end of ). First, perform the XOR operation on the eigenvalue and the threshold . The XOR of the eigenvalue and the threshold can be regarded as a Boolean secret sharing. Then, through the bitwise operation B2A (Boolean to Arithmetic), the Boolean secret sharing of each bit of the eigenvalue and the threshold is converted into an arithmetic secret sharing to obtain , and the conversion satisfies = , receives receives , where is 's th bit.
[0066] After being converted into an arithmetic secret sharing, use the conversion to convert and into and , let randomly select , to generate the index list. Invoke the Oblivious Short-listed Zero Check (OZC) protocol, input the index list, and receive the zero value detection result . Set Set , and satisfy: .
[0067] The transformation proposed in 《Tianpei Lu, Bingsheng Zhang, Lichun Li, and Kui Ren. Aegis: Alightning fast privacy-preserving machine learning platform against maliciousadversaries. Cryptology ePrint Archive, Paper 2023 / 1890, 2023》 converts the arithmetic list to the arithmetic list , where is a finite field with characteristic p, is the list length, satisfies: at position it contains a unique zero value, and corresponds to the first non-zero bit of the binary list . Through the transformation the binary comparison problem (finding the first different bit in the binary representations of two integers) can be securely transformed into a zero value detection problem in the arithmetic domain.
[0068] The OZC protocol is used to check whether a certain subsequence of a shared list has 0. The protocol allows to select an index list with dimension to indicate the indices of the elements of the subsequence to be checked, and input a shared list. The OZC protocol will check whether there is a 0 value in the subsequence of the shared list and send the check result to , indicating the existence of a 0 value, otherwise there is no 0 value.
[0069] In this step, by converting the Boolean sharing into arithmetic sharing, the online communication overhead is reduced from being dependent on the computational security parameter O(n ) to O(n log n), and the number of communication rounds is 3 rounds, which is a constant number of rounds.
[0070] S4: Based on the secret sharing of the selected node indices, obtain the secret sharing of the node information of the corresponding node on the decision tree through the selection protocol, so as to obtain the secret sharing of the corresponding classification value. Update the secret sharing of the product recommendation result based on the secret sharing of the classification value, and return to step S2 to traverse the decision tree until a predetermined number of nodes are traversed to obtain the product recommendation result;
[0071] Specifically, "obtain the secret sharing of the node information of the corresponding node on the decision tree through the selection protocol, so as to obtain the secret sharing of the corresponding classification value" is the same as in step S2 and will not be elaborated here. After obtaining the secret sharing [s] of the classification value, update the secret sharing of the product recommendation result .
[0072] This method starts traversing from the root node of the decision tree, and the processes of steps S2 - S4 are executed when traversing each node. During the traversal process, once reaching the virtual node, this termination node will be inadvertently repeatedly visited until the number of traversed nodes reaches the predetermined number depth. This ensures that the evaluation path length is constantly depth, where depth is the depth of the decision tree.
[0073] After the traversal is completed, the data holder and the model holder respectively obtain the secret sharing and of the product recommendation result, and disclose them to each other, so that both parties can hold and , and then calculate to obtain the final product recommendation result y.
[0074] Since the classification values s of non - leaf nodes are all set to 0, the value of the prediction result y is not affected by the classification values of non - leaf nodes. Therefore, the value of y finally equals the classification value of the leaf node, and thus the final product recommendation result of the model can be obtained, that is, the product corresponding to the leaf node finally traversed.
[0075] Corresponding to the foregoing embodiment of the decision tree product recommendation method based on two - party secure computation, this application also provides an embodiment of a decision tree product recommendation device based on two - party secure computation.
[0076] Figure 3 is a block diagram of a decision tree product recommendation device based on two - party secure computation shown according to an exemplary embodiment. Refer toFigure 3 , applied to the data holder or the model holder. The data holder holds the eigenvalue including user personal information, and the model holder holds the decision tree for product recommendation. This device may include:
[0077] An index secret sharing acquisition module 21, configured to obtain the secret sharing of the decision tree root node index and the lookup table. Among them, the data holder and the model holder respectively obtain the eigenvalue lookup table and the node information lookup table;
[0078] An eigenvalue secret sharing acquisition module 22, configured to obtain the secret sharing of the node information of the corresponding node on the decision tree through a selection protocol based on the current held secret sharing of the node index and the lookup table, so as to obtain the secret sharing of the corresponding eigenvalue index, and obtain the secret sharing of the corresponding eigenvalue through the lookup table;
[0079] An index selection module 23, configured to compare the eigenvalue and the threshold through a conditional oblivious transfer protocol, so as to select the secret sharing of the left subtree node index or the secret sharing of the right subtree node index;
[0080] A traversal module 24, configured to obtain the secret sharing of the node information of the corresponding node on the decision tree through a selection protocol based on the selected secret sharing of the node index, so as to obtain the secret sharing of the corresponding classification value, update the secret sharing of the product recommendation result based on the secret sharing of the classification value, return to step S2 to traverse the decision tree until a predetermined number of nodes are traversed, and obtain the product recommendation result.
[0081] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0082] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial descriptions of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this application. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0083] Correspondingly, the present application also provides a computer program product, including a computer program / instructions, which when executed by a processor, implement the decision tree product recommendation method based on two-party secure computing as described above.
[0084] Correspondingly, the present application further provides an electronic device, including: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the decision tree product recommendation method based on two-party secure computing as described above. As Figure 4 shown, it is a hardware structure diagram of a device with any data processing capability where the decision tree product recommendation device provided by an embodiment of the present invention is located. In addition to Figure 4 the processors, memory, and network interfaces shown, any device with data processing capability where the device in the embodiment is located usually may further include other hardware according to the actual functions of the device with any data processing capability, which will not be elaborated here.
[0085] Correspondingly, the present application further provides a computer-readable storage medium, on which computer instructions are stored. When the instructions are executed by a processor, the decision tree product recommendation method based on two-party secure computing as described above is implemented. The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the foregoing embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device, such as a plug-in hard disk, a Smart Media Card (SMC), an SD card, a Flash Card, etc. equipped on the device. Further, the computer-readable storage medium may also include both an internal storage unit of any device with data processing capability and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store the data that has been output or will be output.
[0086] Those skilled in the art will readily think of other implementation schemes of the present application after considering the specification and practicing the content disclosed herein. The present application aims to cover any variations, uses, or adaptive changes of the present application, and these variations, uses, or adaptive changes follow the general principles of the present application and include common general knowledge or conventional technical means in the technical field not disclosed in the present application.
Claims
1. A decision tree product recommendation method based on two-party secure computing, characterized in that, Applied to the data holder or the model holder, where the data holder holds the eigenvalue including user personal information, and the model holder holds the decision tree for product recommendation. The method includes: S1: Obtain the secret sharing of the root node index of the decision tree and the lookup table. Among them, the data holder and the model holder respectively obtain the eigenvalue lookup table and the node information lookup table; S2: Based on the secret sharing of the currently held node index and the lookup table, obtain the secret sharing of the node information of the corresponding node on the decision tree through the selection protocol, so as to obtain the secret sharing of the corresponding eigenvalue index, and obtain the secret sharing of the corresponding eigenvalue through the lookup table; S3: Compare the eigenvalue and the threshold through the conditional oblivious transfer protocol, so as to select the secret sharing of the left subtree node index or the secret sharing of the right subtree node index; S4: Based on the secret sharing of the selected node index, obtain the secret sharing of the node information of the corresponding node on the decision tree through the selection protocol, so as to obtain the secret sharing of the corresponding classification value. Update the secret sharing of the product recommendation result based on the secret sharing of the classification value, and return to step S2 to traverse the decision tree until a predetermined number of nodes are traversed to obtain the product recommendation result.
2. The method according to claim 1, characterized in that, The index of each node in the decision tree includes the secret sharing of the eigenvalue index, the left subtree node index, the right subtree node index, the threshold, and the classification value.
3. The method according to claim 1, characterized in that The data holder and the model holder respectively hold the eigenvalue lookup table and the node information lookup table. The eigenvalue lookup table is used to look up the corresponding eigenvalue through the secret sharing of the eigenvalue index. The node information lookup table is used to look up the secret sharing of the corresponding node information through the secret sharing of the node index. The secret sharing of the node information includes the secret sharing of the eigenvalue index, the left subtree node index, the right subtree node index, the threshold, and the classification value.
4. The method according to claim 1, characterized in that Step S2 includes: Displace the lookup table held by itself through the vector oblivious displacement evaluation protocol, so that both the data holder and the model holder obtain the secret sharing of the displaced lookup table; Based on the secret sharing of the currently held node index and the secret sharing of the displaced node information lookup table, obtain the secret sharing of the node information of the corresponding node on the decision tree; Obtain the secret sharing of the eigenvalue index in the secret sharing of the node information, and obtain the secret sharing of the corresponding eigenvalue through the secret sharing of the displaced eigenvalue lookup table.
5. The method according to claim 4, wherein Displace the lookup table held by itself through the vector oblivious displacement evaluation protocol, so that both the data holder and the model holder obtain the secret sharing of the displaced lookup table. Specifically: The data holder randomly selects a first random displacement value, and displaces the eigenvalue lookup table held by itself based on the first random displacement value to obtain the first displaced eigenvalue lookup table; Based on the vector oblivious displacement evaluation protocol and the first displaced eigenvalue lookup table, both the data holder and the model holder obtain the secret sharing of the second displaced eigenvalue lookup table. The model holder also obtains the second random displacement value. The second displaced eigenvalue lookup table is obtained by the exclusive-or displacement based on the first random displacement value and the second random displacement value. The model holder randomly selects a third random displacement value, and displaces the node information lookup table it holds based on the third random displacement value to obtain a first displaced node information lookup table; Based on the vector oblivious displacement evaluation protocol and the first displaced node information lookup table, both the data holder and the model holder obtain a secret sharing of the second displaced node information lookup table, and the data holder also obtains a fourth random displacement value. The second displaced node information lookup table is obtained by XOR displacement based on the third random displacement value and the fourth random displacement value.
6. The method according to claim 1, characterized in that, The secret sharing of the eigenvalue and the threshold is compared through a conditional oblivious transfer protocol to select a left subtree node index or a right subtree node index, including: Using a secure comparison protocol, compare the secret sharing of the eigenvalue and the threshold to obtain a comparison result; Based on the comparison result, calculate the index through secret sharing addition and multiplication to select a left subtree node index or a right subtree node index.
7. The method according to claim 6, wherein Using a secure comparison protocol, compare the secret sharing of the eigenvalue and the threshold to obtain a comparison result, including: Perform a bitwise XOR and boolean-to-arithmetic operation on the secret sharing of the eigenvalue and the threshold to obtain a first arithmetic list; Convert the first arithmetic list into a second arithmetic list, where the second arithmetic list satisfies: it contains a unique zero value at the first non-zero bit of the first arithmetic list; The data holder randomly selects 0 or 1 and generates an index list, and uses the oblivious subsequence zero value check protocol to check whether there is a zero value in the second arithmetic list, so that the model holder receives the zero value detection result. Based on the 0 or 1 randomly generated by the data holder and the zero value detection result held by the model holder, obtain the comparison result.
8. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by a processor, the method described in any one of claims 1-7 is implemented.
9. An electronic device, characterized in that, Including: One or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of claims 1-7.
10. A computer-readable storage medium having computer instructions stored thereon, characterized in that, When the instructions are executed by a processor, the steps of the method described in any one of claims 1-7 are implemented.
Citation Information
Patent Citations
Data quality analysis and management system
CA2788356A1
Federal decision tree model construction method, device and equipment based on batch homomorphic encryption
CN118427892A
Comparison function-oriented function secret sharing construction method
CN119483918A
Privacy protection method based on decision tree model training
CN119760775A
Decision tree security reasoning method and framework based on efficient element selection protocol
CN120110654A