A decision tree product recommendation method based on two-party secure computation

Through secret sharing and conditional oblivious transfer protocols based on two-party secure computation, the problems of high communication overhead and large number of rounds in decision tree evaluation in existing technologies are solved, and safe and efficient product recommendations are achieved.

CN120409632BActive Publication Date: 2025-10-03ZHEJIANG UNIV +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510897647.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-10-03
Estimated Expiration
2045-07-01

AI Technical Summary

Technical Problem

Existing technologies have problems with high communication overhead and a large number of communication rounds in privacy-preserving decision tree evaluation, especially in two-party secure computing scenarios, making it difficult to efficiently evaluate decision trees.

Method used

A two-party secure computation method is adopted to achieve privacy protection of decision trees through secret sharing and conditional oblivious transfer protocol, reduce communication overhead and control the number of communication rounds to a constant. This includes secret sharing of eigenvalues ​​and thresholds, selection of node indexes and update of classification values.

Benefits of technology

It achieves secure product recommendation without leaking user personal information and decision tree model information, reduces communication overhead and improves decision tree evaluation performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409632B_ABST
    Figure CN120409632B_ABST
Patent Text Reader

Abstract

The present invention discloses a decision tree product recommendation method based on two-party secure computing, which can be applied to data holders or model holders. The method includes: obtaining a secret sharing of the decision tree root node index and a lookup table; obtaining a secret sharing of the node information of the corresponding node on the decision tree through a selection protocol, thereby obtaining a secret sharing of the corresponding eigenvalue index, and obtaining a secret sharing of the corresponding eigenvalue through a lookup table; comparing the eigenvalue and the threshold through a conditional oblivious transfer protocol, thereby selecting a left subtree node index or a right subtree node index; based on the secret sharing of the selected node index, obtaining a secret sharing of the node information of the corresponding node on the decision tree through a selection protocol, thereby obtaining a secret sharing of the corresponding classification value, updating the secret sharing of the product recommendation result based on the secret sharing of the classification value, traversing the decision tree until a predetermined number of nodes are traversed to obtain the final product recommendation result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of decision trees, and in particular relates to a decision tree product recommendation method based on two-party secure computing. Background Art

[0002] With the rapid development of big data and artificial intelligence technologies, decision trees, as efficient and intuitive classification models, have been 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 preferences and budgets), and the models themselves typically require extensive computing resources and data to train, posing a high economic value. Therefore, evaluating decision trees while ensuring both data and model privacy has become a significant challenge.

[0003] Privacy-preserving decision tree evaluation leverages technologies such as secure multi-party computation and shared encryption on top of traditional decision trees to protect the data of data holders and the models of model holders. In secure multi-party computation, data holders and model holders can jointly compute the final classification result using a decision tree model based on input feature data without leaking their data or models. Current challenges in privacy-preserving decision tree evaluation include reducing communication overhead and the number of communication rounds to improve decision tree evaluation performance.

[0004] JPK Ma, RKH Tai, Y. Zhao, and SS Chow, "Let's strideblindfolded in a forest: Sublinear multi-client decision trees evaluation," NDSS.2021, proposes a novel protocol or framework that allows users to outsource classification tasks to a third party while protecting data and model privacy. This protocol, combined with lightweight cryptographic techniques such as partially homomorphic encryption or secure multi-party computation (SMPC), optimizes the computational process to reduce overhead. However, this approach has a relatively high performance overhead.

[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., proposes a privacy-preserving linear branching program (LBP) security evaluation scheme specifically for privacy protection in the medical field. Using Yao's obfuscated circuit protocol, the LBP logic is converted into Boolean circuits, enabling secure computation between two parties (the model and the data). LBP matrix parameters and user input data are secret-shared additively and distributed among multiple parties. Partial homomorphic encryption (e.g., Paillier) is combined to support linear operations in an encrypted state. However, this scheme suffers from significant performance overhead, resulting in low computational efficiency for large-scale LBPs and lacks UC security.

[0006] RKH Tai, JPK Ma, Y. Zhao, and SSM Chow, “Privacy-preserving decision trees evaluation via linear functions,” in Proc. Eur. Symp. Res. Comput. Secur., 2017, pp. 494–512., propose a privacy-preserving decision tree evaluation protocol based on linear functions. This protocol linearizes the decision tree, encoding each root-to-leaf path as a linear function. Paillier homomorphic encryption is used to support linear operations in an encrypted state. This protocol does not achieve UC security, and the number of paths in the decision tree grows exponentially with depth, requiring the server to precompute and store the linear parameters of all paths, making it unsuitable for large-scale trees.

[0007] Ji, K., Zhang, B., Lu, T., Li, L., & Ren, K. (2023). UC Secure Private Branching Program and Decision Tree Evaluation. IEEE Transactions on Dependable and Secure Computing, 20, 2836-2848. This paper implements a privacy-preserving protocol for constant-round and linear-round branching program and decision tree evaluation under UC security using distributed point functions and distributed interval containment functions. This protocol requires three parties to participate in the computation, making it difficult to implement in a two-party scenario, which is more common in real-world applications. Summary of the Invention

[0008] In response to the problems existing in the prior art, the purpose of the embodiments of the present application is to provide a decision tree product recommendation method based on two-party secure computing.

[0009] According to a first aspect of an embodiment of the present application, a decision tree product recommendation method based on two-party secure computation is provided, which is applied to a data holder or a model holder, wherein the data holder holds feature values ​​including user personal information, and the model holder holds a decision tree for product recommendation. The method includes:

[0010] S1: Obtain secret sharing and a lookup table of the decision tree root node index, wherein the data holder and the model holder obtain the feature value lookup table and the node information lookup table respectively;

[0011] 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;

[0012] S3: Compare the characteristic value and the threshold through the conditional oblivious transfer protocol, thereby selecting 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, 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 classification value, and based on the secret sharing of the classification value, the secret sharing of the product recommendation result is updated, and the decision tree is traversed back to step S2 until a predetermined number of nodes are traversed to obtain the product recommendation result.

[0014] Furthermore, the index of each node in the decision tree includes a secret sharing of a feature value index, a left subtree node index, a right subtree node index, a threshold, and a classification value.

[0015] Furthermore, the data holder and the model holder respectively hold a feature value lookup table and a node information lookup table, the feature value lookup table is used to look up the corresponding feature value through secret sharing of the feature value index, and the node information lookup table is used to look up the secret sharing of the corresponding node information through secret sharing of the node index, and the secret sharing of the node information includes the secret sharing of the feature value index, the left subtree node index, the right subtree node index, the threshold and the classification value.

[0016] Furthermore, step S2 includes:

[0017] The lookup table held by itself is shifted through the vector oblivious shift evaluation protocol, so that both the data holder and the model holder can obtain the secret sharing of the shifted lookup table;

[0018] Based on the secret sharing of the currently held node index and the secret sharing of the shifted node information lookup table, the secret sharing of the node information of the corresponding node on the decision tree is obtained;

[0019] The secret sharing of the eigenvalue index in the secret sharing of the node information is obtained, and the secret sharing of the corresponding eigenvalue is obtained through the secret sharing of the shifted eigenvalue lookup table.

[0020] Furthermore, the vector inadvertent displacement assessment protocol is used to shift the lookup table held by itself, so that both the data holder and the model holder can obtain the secret sharing of the shifted lookup table. Specifically:

[0021] The data holder randomly selects a first random displacement value and shifts its own eigenvalue lookup table based on the first random displacement value to obtain a first shifted eigenvalue lookup table. Based on the vector oblivious displacement assessment protocol and the first shifted eigenvalue lookup table, the data holder and the model holder both obtain a secret share of the second shifted eigenvalue lookup table. The model holder also obtains a second random displacement value. The second shifted eigenvalue lookup table is obtained based on the XOR shift of the first random displacement value and the second random displacement value.

[0022] The model holder randomly selects a third random displacement value, and shifts the node information lookup table held by itself based on the third random displacement value to obtain a first shifted node information lookup table; based on the vector oblivious displacement assessment protocol and the first shifted node information lookup table, the data holder and the model holder both obtain a secret sharing of the second shifted node information lookup table, and the data holder also obtains a fourth random displacement value, where the second shifted node information lookup table is obtained based on the exclusive-OR shift of the third random displacement value and the fourth random displacement value.

[0023] Furthermore, the secret sharing of the characteristic value and the threshold is compared through a conditional oblivious transfer protocol, thereby selecting a left subtree node index or a right subtree node index, including:

[0024] Using a secure comparison protocol, the characteristic value and the secret sharing of the threshold are compared to obtain a comparison result;

[0025] Based on the comparison result, an index is calculated by secret sharing addition and multiplication, thereby selecting a left subtree node index or a right subtree node index.

[0026] Furthermore, the secret sharing of the characteristic value and the threshold is compared using a secure comparison protocol to obtain a comparison result, including:

[0027] Performing a bitwise exclusive OR and Boolean conversion arithmetic operation on the secret shared value of the characteristic value and the threshold to obtain a first arithmetic list;

[0028] Converting the first arithmetic list into a second arithmetic list, wherein the second arithmetic list satisfies: a first non-zero position in the first arithmetic list contains a unique zero value;

[0029] The data holder randomly selects 0 or 1 and generates an index list, and uses the oblivious subsequence zero value to check whether there is a zero value in the second arithmetic list of the protocol, so that the model holder receives the zero value detection result, and obtains a comparison result based on the 0 or 1 randomly generated by the data holder and the zero value detection result held by the model holder.

[0030] According to a second aspect of an embodiment of the present application, a computer program product is provided, comprising a computer program / instruction, which implements the method described in the first aspect when executed by a processor.

[0031] According to a third aspect of the embodiments of the present application, there is provided an electronic device, 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 for prediction (i.e., product recommendation) 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 are described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different drawings represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with this application.

[0045] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are 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 information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0047] The present application provides a decision tree prediction method based on two-party secure computing, which adopts a privacy protection method based on two-party secure computing to overcome the data information leakage and model information leakage that may occur in traditional decision trees when the data holder and the model holder use the decision tree for prediction, so that the model holder and the data holder can safely calculate the classification results of the decision tree based on the data sample without leaking any information about the data sample and the model. The method can be applied to medical decision-making, personal information authentication, product recommendation, financial product risk prediction, etc., and is described in detail below in conjunction with product recommendation.

[0048] This application provides a decision tree product recommendation method based on two-party secure computation, such as Figure 1 As shown, the method includes the following contents:

[0049] Step S1: Data holder and model holders The secret sharing of the decision tree root node index is obtained separately. The data holder creates a decision tree feature value lookup table, and the model holder creates a decision tree node information lookup table.

[0050] Specifically, the data holder holds the feature value, which in this embodiment is a feature vector containing user personal information (such as preferences, budget, etc.). The decision tree held by the model holder is a pre-trained decision tree model, which in this embodiment is a pre-trained decision tree model for product recommendation. The classification value of each leaf node of the decision tree represents a product, and the output prediction result y represents a product that the model ultimately recommends to the user, that is, the product recommendation result.

[0051] It should be noted that this application does not limit the product type. The products can be common products on shopping platforms (such as daily necessities, food, etc.), or financial products, insurance products, medical products, digital products, etc.

[0052] In specific implementation, Figure 2 As shown, to prevent the structural information of the decision tree from being leaked, a virtual node is set in the decision tree. All leaf nodes point to this virtual node, and the virtual node points to itself. Non-leaf nodes in the decision tree are assigned a virtual classification value of 0. This ensures that the final output y of the decision tree is not affected by the classification values ​​of 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 holders First, you need to initialize the root node index and obtain the secret sharing of the decision tree root node respectively. The secret sharing of each node index of the decision tree (including the root node index) contains the eigenvalue index , left subtree node index , right subtree node index , threshold[ , classification value The secret sharing of the root node index can be used to determine whether the next step is the left subtree or the right subtree by comparing the characteristic value at the root node with the threshold. The secret sharing of the left subtree node index or the right subtree node index is obtained based on the comparison result.

[0054] Then, the data holder Creating a lookup table of feature values ​​for a decision tree , model holder Create a node information lookup table for the decision tree ;

[0055] The eigenvalue lookup table For secret sharing indexed by eigenvalues Finding Eigenvalues ;

[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 , receive and a second random displacement value ,satisfy , ,in Equal to lookup table Shifted to the right Therefore Can be made public Query To obtain the original The corresponding eigenvalues ​​are obtained without leaking the corresponding information and index value information of the original lookup table.

[0061] Similarly, Holds the lookup table , randomly select a third random displacement value , the lookup table based on Lookup table obtained after shifting Enter the protocol, through which Will receive and a fourth random displacement value , receive ,satisfy , ,in Equal to lookup table Shifted to the right Therefore You can query it by public node index value [nidx'] To obtain the node information corresponding to the original node index value without leaking the corresponding information and index value information of the original lookup table.

[0062] Through the VOSE protocol, the online communication overhead can be reduced to O(n), and the number of communication rounds is 2, which is a constant round. This reduces the communication overhead and number of communication rounds of privacy-preserving decision tree evaluation and improves the performance of privacy-preserving decision tree evaluation.

[0063] Step S3: comparing the secret sharing of the characteristic value and the threshold through the Conditional Oblivious Transfer (COT) protocol, thereby selecting the secret sharing of the left subtree node index or the secret sharing of the right subtree node index;

[0064] In order to protect the privacy of the model and not leak the connection information of the decision tree nodes, it is necessary to secretly select the next node based on the comparison results of the eigenvalue and the threshold. After entering the eigenvalue and threshold, the COT protocol will first call the security comparison protocol to compare the eigenvalue. ] and threshold , output comparison results After receiving the comparison result, the participants calculate the index by 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 characteristic values ​​bit by bit starting from the most significant bit using an XOR operation. and threshold [ , which is formally expressed as ,in for ]and The first different bit in the binary representation, when hour,[ ,when hour,[ . It is important to note that [ = ], there is no different bit, so in order to ensure that the first different bit exists, Append 0 to the end of Add 1 to the end of = hour, (If you need to calculate , then in Append 1 to the end of 0 is appended to the end). First, the eigenvalue and threshold [ Perform XOR operation and convert the eigenvalue [ and threshold [ The XOR of can be regarded as a Boolean secret sharing, and then the eigenvalue is converted to and threshold The Boolean secret sharing of each bit is converted into arithmetic secret sharing and we get , conversion satisfies = , receive receive ,in[ for[ No. bits.

[0066] After converting to arithmetic secret sharing, use the conversion Will and Convert to and ,make Randomly pick , to generate The index list of . Call the Oblivious Short-listed Zero Check (OZC) protocol, Enter the index list, Received zero value detection result . set up set up , and satisfy: .

[0067] Conversion proposed by "Tianpei Lu, Bingsheng Zhang, Lichun Li, and Kui Ren. Aegis: Alightning fast privacy-preserving machine learning platform against malicious adversaries. Cryptology ePrint Archive, Paper 2023 / 1890, 2023" Arithmetic list Convert to arithmetic list ,in is a finite field of characteristic p, is the length of the list, Satisfaction: In position contains unique zero values, and Corresponding binary list By converting The binary comparison problem (finding the first bit that differs between the binary representations of two integers) can be safely transformed into the zero detection problem over an arithmetic domain.

[0068] The OZC protocol is used to check whether a subsequence of a shared list contains 0. The protocol allows Select a dimension A list of indices indicating the indices of the subsequence elements that you want to check. and Input a shared list, the OZC protocol will check whether there is a 0 value in the subsequence of the shared list and check the result Send to , Indicates that there is a value of 0. There is no 0 value.

[0069] In this step, the online communication overhead is reduced from relying on computing security parameters by converting Boolean sharing into arithmetic sharing. O(n ) is reduced to O(n log n), and the number of communication rounds is 3, which is a constant round.

[0070] 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, thereby obtaining 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, "obtaining the secret sharing of the node information of the corresponding node on the decision tree through the selection protocol, thereby obtaining the secret sharing of the corresponding classification value" is the same as step S2 and will not be repeated here. After obtaining the secret sharing of the classification value [s], the secret sharing of the product recommendation result is updated .

[0072] This method begins traversing the decision tree from its root node, executing steps S2-S4 for each node. Once a virtual node is reached during traversal, the final node is inadvertently revisited until the number of traversed nodes reaches a predetermined depth. This ensures that the evaluation path length remains constant at depth, where depth is the depth of the decision tree.

[0073] After the traversal is completed, the data holder With the model owner The secret sharing of product recommendation results was obtained and and disclose it to the other party, so that both parties can hold and , and then calculate 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 predicted result y is not affected by the classification values ​​of non-leaf nodes. Therefore, the final value of y is equal to the classification value of the leaf node, so 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 aforementioned embodiment of the decision tree product recommendation method based on two-party secure computation, the present application also provides an embodiment of a decision tree product recommendation device based on two-party secure computation.

[0076] Figure 3 This is a block diagram of a decision tree product recommendation device based on two-party secure computing according to an exemplary embodiment. Figure 3 , applied to a data holder or a model holder, wherein the data holder holds feature values ​​including user personal information, and the model holder holds a decision tree for product recommendation, the device may include:

[0077] An index secret sharing acquisition module 21 is used to obtain a secret sharing and a lookup table of the decision tree root node index, wherein the data holder and the model holder obtain a feature value lookup table and a node information lookup table respectively;

[0078] The eigenvalue secret sharing acquisition module 22 is 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 currently held secret sharing of the node index and the lookup table, thereby obtaining the secret sharing of the corresponding eigenvalue index and obtaining the secret sharing of the corresponding eigenvalue through the lookup table;

[0079] An index selection module 23 is configured to compare the characteristic value and the threshold value through a conditional oblivious transfer protocol, thereby selecting a secret sharing of the left subtree node index or a secret sharing of the right subtree node index;

[0080] The traversal module 24 is used to obtain the secret sharing of the node information of the corresponding node on the decision tree through the selection protocol based on the secret sharing of the selected node index, thereby obtaining the secret sharing of the corresponding classification value, and 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.

[0081] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of 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 be referred to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0083] Accordingly, the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the above-mentioned decision tree product recommendation method based on two-party secure computing.

[0084] Accordingly, the present application also provides an electronic device, comprising: 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 above-mentioned decision tree product recommendation method based on two-party secure computing. Figure 4 As shown in the figure, a hardware structure diagram of a device with data processing capability where a decision tree product recommendation device based on two-party secure computing is provided in an embodiment of the present invention, except Figure 4 In addition to the processor, memory, and network interface shown, any device with data processing capabilities in which the apparatus in the embodiment is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.

[0085] Correspondingly, the present application also provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the decision tree product recommendation method based on two-party secure computing as described above. The computer-readable storage medium may be an internal storage unit of any device with data processing capabilities described in any of the aforementioned embodiments, such as a hard disk or memory. The computer-readable storage medium may also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), an SD card, a flash card (Flash Card), etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capabilities. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and may also be used to temporarily store data that has been output or is to be output.

[0086] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the contents disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art that are not disclosed in this application.

Claims

1. A decision tree product recommendation method based on two-party secure computing, characterized in that: Applied to a data holder or a model holder, the data holder holds feature values ​​including user personal information, and the model holder holds a decision tree for product recommendation, the method includes: S1: Obtain secret sharing and a lookup table of the decision tree root node index, wherein the data holder and the model holder obtain the feature value lookup table and the node information lookup table respectively; 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; S3: Compare the characteristic value and the threshold through the conditional oblivious transfer protocol, thereby selecting 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, thereby obtaining 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; Wherein, step S2 includes: The lookup table held by itself is shifted through the vector oblivious shift evaluation protocol, so that both the data holder and the model holder can obtain the secret sharing of the shifted lookup table; Based on the secret sharing of the currently held node index and the secret sharing of the shifted node information lookup table, the secret sharing of the node information of the corresponding node on the decision tree is obtained; The secret sharing of the eigenvalue index in the secret sharing of the node information is obtained, and the secret sharing of the corresponding eigenvalue is obtained through the secret sharing of the shifted eigenvalue lookup table.

2. The method according to claim 1, characterized in that The index of each node in the decision tree includes the secret sharing of feature value index, left subtree node index, right subtree node index, threshold value, and classification value.

3. The method according to claim 1, characterized in that The data holder and the model holder respectively hold a feature value lookup table and a node information lookup table, wherein the feature value lookup table is used to look up the corresponding feature value through secret sharing of the feature value index, and the node information lookup table is used to look up the secret sharing of the corresponding node information through secret sharing of the node index, and the secret sharing of the node information includes the secret sharing of the feature value index, the left subtree node index, the right subtree node index, the threshold and the classification value.

4. The method according to claim 1, wherein The vector oblivious displacement evaluation protocol is used to shift the lookup table held by itself, so that both the data holder and the model holder can obtain the secret sharing of the shifted lookup table. Specifically: The data holder randomly selects a first random displacement value, and shifts the eigenvalue lookup table held by the data holder based on the first random displacement value to obtain a first shifted eigenvalue lookup table; Based on the vector inadvertent displacement assessment protocol and the first displacement eigenvalue lookup table, the data holder and the model holder both obtain a secret share of the second displacement eigenvalue lookup table. The model holder also obtains a second random displacement value, where the second displacement eigenvalue lookup table is obtained based on an exclusive-OR displacement of the first random displacement value and the second random displacement value. The model holder randomly selects a third random displacement value, and shifts the node information lookup table held by the model holder based on the third random displacement value to obtain a first shifted node information lookup table; Based on the vector inadvertent displacement assessment protocol and the first displacement node information lookup table, the data holder and the model holder both obtain the secret sharing of the second displacement node information lookup table. The data holder also obtains a fourth random displacement value. The second displacement node information lookup table is obtained based on the exclusive-OR displacement of the third random displacement value and the fourth random displacement value.

5. The method according to claim 1, wherein The secret sharing of the characteristic value and the threshold is compared through a conditional oblivious transfer protocol, thereby selecting a left subtree node index or a right subtree node index, including: Using a secure comparison protocol, the characteristic value and the secret sharing of the threshold are compared to obtain a comparison result; Based on the comparison result, an index is calculated by secret sharing addition and multiplication, thereby selecting a left subtree node index or a right subtree node index.

6. The method according to claim 5, characterized in that The characteristic value and the secret sharing of the threshold are compared using a secure comparison protocol to obtain a comparison result, including: Performing a bitwise exclusive OR and Boolean conversion arithmetic operation on the secret shared value of the characteristic value and the threshold to obtain a first arithmetic list; Converting the first arithmetic list into a second arithmetic list, wherein the second arithmetic list satisfies: a first non-zero position in the first arithmetic list contains a unique zero value; The data holder randomly selects 0 or 1 and generates an index list, and uses the oblivious subsequence zero value check protocol to detect whether there is a zero value in the second arithmetic list, so that the model holder receives the zero value detection result, and obtains a comparison result based on the 0 or 1 randomly generated by the data holder and the zero value detection result held by the model holder.

7. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

8. An electronic device, characterized in that: include: 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 according to any one of claims 1 to 6.

9. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Decision tree security reasoning method and framework based on efficient element selection protocol

    CN120110654A