Hierarchical trace privacy decision tree reasoning method, electronic equipment and storage medium
By encoding and encrypting the decision tree model and query information, combining anonymous query and privacy decision tree batch reasoning, the privacy leakage problem caused by multiple queries in the existing technology is solved, and the privacy of the anonymous query is realized is protected, protecting the privacy of users and servers.
Patent Information
- Application Number
- CN202510401918.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-04
AI Technical Summary
When performing decision tree classification tasks, existing anonymous query technology requires multiple anonymous query queries to obtain multiple query results. It is impossible to realize the decision tree classification task of the current pre-query user while ensuring anonymity, resulting in privacy leakage between the server and pre-query users.
By encoding and encrypting the decision tree model into a cryptographic decision tree, using a finite-level homomorphic encryption algorithm to encode and encrypt the query information, the server performs anonymous query query and batch inference of the privacy decision tree, generates the query result ciphertext, pre-query users decrypt it to obtain the query results, and realizes anonymous privacy decision tree inference.
It realizes that on the premise of ensuring anonymity, pre-query users only obtain decision tree classification results while the server does not obtain query information, protecting the privacy of users and servers, and avoiding the risk of privacy leakage caused by multiple queries.
Smart Images

Figure CN120257360A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of information security, and particularly relates to a method for inferring a stealth privacy decision tree, an electronic device, and a storage medium. Background Art
[0002] Privacy information retrieval (PIR), also known as stealth query, has a wide range of application scenarios in fields such as education, medical care, and high-tech. In the data interaction between different parties, it can be abstracted into a two-party model of the current pre-query user and the server. The server has a database, and the current pre-query user has query information. The current pre-query user is retrieving the database from the server without wanting the server to obtain its query information, and the server does not want the current pre-query user to obtain information other than the query result.
[0003] In the existing stealth query technology, the query result is often a definite element in the database. When the current pre-query user hopes to perform a decision tree classification task on multiple elements in the database, multiple stealth queries need to be performed to obtain multiple query results, and then the decision tree classification task can be carried out. In this process, the server provides multiple query results to the current pre-query user, and the current pre-query user only needs to obtain the decision tree classification results of these query results. Therefore, designing a stealth privacy decision tree inference method in which the pre-query user only obtains the decision tree classification results and hides the query information can effectively protect the privacy of the pre-query user and the server. Summary of the Invention
[0004] The problem to be solved by the present invention is to implement the decision tree classification task of the current pre-query user on the premise of ensuring the stealth of the query target, and a method for inferring a stealth privacy decision tree, an electronic device, and a storage medium are proposed.
[0005] To achieve the above object, the present invention is realized through the following technical solutions:
[0006] A method for inferring a stealth privacy decision tree includes the following steps:
[0007] The current pre-query user encodes and encrypts the decision tree model to obtain a ciphertext decision tree, and sends it to the server;
[0008] The current pre-query user performs stealth query encoding and encryption on the query information of the database to be queried to obtain a ciphertext of the query information, and sends it to the server;
[0009] The server encodes and matrixizes the database, and runs a stealth query unit and a privacy decision tree batch inference unit according to the ciphertext decision tree and the ciphertext of the query information to obtain a ciphertext of the query result, and sends the ciphertext of the query result to the pre-query user;
[0010] The current pre-query user decrypts the ciphertext of the query result to obtain the query result.
[0011] Furthermore, the specific implementation method for the current pre-query user to encode and encrypt the decision tree model to obtain the encrypted decision tree and send it to the server includes:
[0012] Perform binary expansion on the threshold value in the decision tree model to obtain the threshold encoding value, perform one-hot encoding on the threshold index to obtain the threshold index encoding value, directly change the classification label to the classification label encoding value, and circularly fill it into a fixed vector. Use the finite series homomorphic encryption algorithm to encrypt the threshold encoding value, threshold index encoding value, and classification label encoding value in the decision tree model to obtain the encrypted decision tree model, and send the encrypted decision tree model to the server.
[0013] Furthermore, the specific implementation method for the current pre-query user to perform traceable query encoding and encryption on the query information of the database to be queried to obtain the ciphertext of the query information and send it to the server includes:
[0014] According to the finite series homomorphic encryption algorithm parameter N and the bit length k of the decision tree threshold value, divide the database to be queried into a two-dimensional matrix of M×(N / k), where each element of the two-dimensional matrix is a vector for decision tree inference. Perform one-hot encoding respectively according to the position of the query information in the two-dimensional matrix to obtain the first query encoding value and the second query encoding value. Use the finite series homomorphic encryption algorithm to encrypt the first query encoding value and the second query encoding value to obtain the first query ciphertext and the second query ciphertext, and send them to the server.
[0015] Furthermore, the finite series homomorphic encryption algorithm parameter N includes the degree of the ring polynomial in the BFV encryption scheme or the degree of the ring polynomial in the BGV encryption scheme.
[0016] Furthermore, the specific implementation method for the server to encode and matrixize the database, and run the traceable query unit and the privacy decision tree batch inference unit according to the encrypted decision tree and the ciphertext of the query information to obtain the ciphertext of the query result and send the ciphertext of the query result to the pre-query user includes:
[0017] The server divides the database into a database matrix of M×(N / k), where each element of the database matrix is a vector for decision tree inference. Run the traceable query unit according to the first query ciphertext and the database matrix to obtain the first ciphertext vector, then run the privacy decision tree batch inference unit according to the first ciphertext vector and the encrypted decision tree to obtain the batch inference ciphertext, and run the traceable query unit again according to the batch inference ciphertext and the second query ciphertext to obtain the ciphertext of the query result, and send the ciphertext of the query result to the pre-query user.
[0018] An electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the traceable privacy decision tree inference method are implemented.
[0019] A computer-readable storage medium stores a computer program thereon. The computer program, when executed by a processor, implements the traceable privacy decision tree inference method.
[0020] Advantages of the present invention:
[0021] In the traceable privacy decision tree inference method of the present invention, the current pre-query user only obtains the classification result of the query result, and the server does not obtain the query information. Moreover, the server does not provide additional information except for the classification result of the query result.
[0022] In the traceable privacy decision tree inference method of the present invention, compared with the existing traceable query, the traceable privacy decision tree inference method avoids multiple database elements from leaving the domain and protects the privacy of the server. Compared with the existing privacy decision tree inference technology, the present invention achieves the technical effect of hiding query information and protecting the privacy of the current pre-query user. Description of the drawings
[0023] Figure 1 It is a flowchart of the traceable privacy decision tree inference method of the present invention. Detailed implementation manners
[0024] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation manners. It should be understood that the specific implementation manners described herein are only used to explain the present invention and are not used to limit the present invention. That is, the specific implementation manners described are only a part of the implementation manners of the present invention, rather than all of the specific implementation manners. The components of the specific implementation manners of the present invention usually described and shown in the drawings here can be arranged and designed in various different configurations, and the present invention can also have other implementation manners.
[0025] Therefore, the detailed description of the specific implementation manners of the present invention provided in the drawings below is not intended to limit the scope of the claimed invention, but only represents the selected specific implementation manners of the present invention. Based on the specific implementation manners of the present invention, all other specific implementation manners obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.
[0026] To further understand the content, features and effects of the present invention, the following specific implementation manners are exemplified and described in detail in conjunction with the attached Figure 1 as follows:
[0027] Example 1:
[0028] A stealth privacy decision tree inference method includes the following steps:
[0029] S1. The current pre-query user encodes and encrypts the decision tree model to obtain a ciphertext decision tree, and sends it to the server;
[0030] Further, the specific implementation method for the current pre-query user to encode and encrypt the decision tree model to obtain a ciphertext decision tree and send it to the server includes:
[0031] Perform binary expansion on the threshold value in the decision tree model to obtain a threshold encoding value, perform one-hot encoding on the threshold index to obtain a threshold index encoding value, directly change the classification label to a classification label encoding value, and circularly fill it into a fixed vector. Use the finite series homomorphic encryption algorithm to encrypt the threshold encoding value, threshold index encoding value, and classification label encoding value in the decision tree model to obtain a ciphertext decision tree model, and send the ciphertext decision tree model to the server;
[0032] Specifically, in the data preprocessing stage, the current pre-query user first encodes and encrypts the decision tree model, aiming to prepare for the subsequent privacy decision tree batch inference unit. The decision tree consists of several nodes, and each node contains information such as a threshold value, a threshold index, and a classification label value. The encrypted ciphertext decision tree of the decision tree model is used as the input of the privacy decision tree batch inference unit, and needs to be appropriately encoded and then encrypted.
[0033] Specifically, the threshold value t of the i-th node in the decision tree i is encoded as {t i,0 , t i,1 , …, t i,k-1}, t i,j ∈ {0, 1}, t i = ∑2 j ·t i,j , the threshold index a i is encoded as Then circularly fill the threshold encoding value t i,j , the threshold index encoding value a i,j , and the classification label value into a fixed vector, and then use finite series homomorphic encryption to encode and encrypt each node to obtain a ciphertext decision tree model.
[0034] S2. The current pre-query user performs stealth query encoding and encryption on the query information of the database to be queried to obtain a query information ciphertext, and sends it to the server;
[0035] Further, the specific implementation method for the current pre-query user to perform stealth query encoding and encryption on the query information of the database to be queried and then send the encrypted query information ciphertext to the server includes:
[0036] According to the finite series homomorphic encryption algorithm parameter N, the bit length k of the decision tree threshold, and the size t of the database to be queried, calculate the number of rows M = t / (N / k), divide the database to be queried into a two-dimensional matrix of M × (N / k), where each element of the two-dimensional matrix is a vector for decision tree inference. According to the position of the query information in the two-dimensional matrix, perform one-hot encoding respectively to obtain the first query encoding value and the second query encoding value, and use the finite series homomorphic encryption algorithm to encrypt the first query encoding value and the second query encoding value to obtain the first query ciphertext and the second query ciphertext, and send them to the server;
[0037] Further, the finite series homomorphic encryption algorithm parameter N includes the degree of the ring polynomial in the BFV encryption scheme or the degree of the ring polynomial in the BGV encryption scheme;
[0038] Specifically, in the data preprocessing stage, the current pre-query user encodes the query information according to the encoding method and the information of the database, uses the finite series homomorphic encryption algorithm to encrypt to ensure the confidentiality of the query information, and is compatible with the encryption method of the decision tree model.
[0039] Specifically, the database D to be queried is:
[0040]
[0041] Among them, As the i-th vector for decision tree inference, the database D has a total of t row vectors;
[0042] According to the finite series homomorphic encryption algorithm parameter N and the bit length k of the decision tree threshold, calculate M = t / (N / k), divide every N / k vectors into a group, and obtain the database encoding D M×(N / k) as:
[0043]
[0044] According to the position of the query information q = i * ·M + j * , q ∈ [0, t - 1] in D M×(N / k) at the i-th * row and the j-th * column, perform one-hot encoding respectively to obtain:
[0045]
[0046] Among them, Q1 is the first query vector, and Q′1 is the vector obtained by cycling each element in Q1 N times;
[0047]
[0048] Q′2 = {q 2,0 , q 2,0 , …, q 2,0 , q 2,1 , q 2,1 , …, q 2,1 , …, q 2,(N / k)-1 , q 2,(N / k)-1 , …, q 2,(N / k)-1}
[0049] Among them, Q2 is the second query vector, and Q′2 is the vector obtained by cycling each element in Q2 k times; Q′1 is the first query code, Q′2 is the second query code, and the first query code and the second query code are encrypted using the finite series homomorphic encryption algorithm to obtain the first query ciphertext and the second information ciphertext, and then sent to the server.
[0050] S3. The server encodes and matrixizes the database, runs the stealth query unit and the privacy decision tree batch inference unit according to the encrypted decision tree and the query information ciphertext to obtain the query result ciphertext, and sends the query result ciphertext to the pre-query user;
[0051] Furthermore, the specific implementation method for the server to encode and matrixize the database, run the stealth query unit and the privacy decision tree batch inference unit according to the encrypted decision tree and the query information ciphertext to obtain the query result ciphertext, and send the query result ciphertext to the pre-query user includes:
[0052] The server divides the database into a database matrix of M×(N / k), where each element of the database matrix is a vector for decision tree inference. According to the first query ciphertext and the database matrix, the stealth query unit is run to obtain the first ciphertext vector, and then according to the first ciphertext vector and the encrypted decision tree, the privacy decision tree batch inference unit is run to obtain the batch inference ciphertext. According to the batch inference ciphertext and the second query ciphertext, the stealth query unit is run again to obtain the query result ciphertext, and the query result ciphertext is sent to the pre-query user;
[0053] Specifically, the database elements are expanded in binary:
[0054]
[0055] x i,j = Σ2 k ·x i,j,k , x i,j ∈[0, 2 k -1]
[0056] Among them, As a vector for decision tree inference, the database D has a total of t row vectors;
[0057] According to the finite series homomorphic encryption algorithm parameter N and the bit length k of the decision tree threshold, calculate M = t / (N / k), and encode the database as:
[0058]
[0059] In There are a total of (N / k) · n · k = N · n x i,j,k ∈ {0, 1}, which can be encoded as n vectors of dimension N;
[0060] When receiving the ciphertext of the first query ciphertext, i.e., Q′1, run the stealth query unit with D M×(N / k) to obtain the ciphertext of * located in the i-th row.
[0061] Take the ciphertext of and the encrypted decision tree as inputs, and run the privacy decision tree batch inference unit to obtain the ciphertext
[0062]
[0063] Among them, The elements in the plaintext are the privacy decision tree inference results of
[0064] When receiving the ciphertext of the second query ciphertext, i.e., Q′2, run the stealth query unit to obtain which is the inference result ciphertext of
[0065] S4. The current pre-query user decrypts the query result ciphertext to obtain the query result.
[0066] Specifically, in the stealth query stage, the current pre-query user receives the query result ciphertext. According to the stealth query unit and the privacy decision tree batch inference unit, the query result ciphertext is a single finite series homomorphic encryption ciphertext, and decrypting it can obtain the query result.
[0067] Specifically, the current pre-query user decrypts the query result ciphertext to obtain:
[0068]
[0069] Extract the * at the k · j position, which is the query result of the query information.
[0070] This embodiment includes two entities, namely the current pre-query user and the server. The current pre-query user constructs a decision tree model according to relevant data analysis criteria and provides query information, hoping to use the data located in the query information on the server for decision tree classification work without disclosing the decision tree model and query information. The server is the holder of the data, usually a big data center with rich computing resources, but does not want the plaintext of the original data to leave the domain. The entire system is divided into two stages: data preprocessing and traceable query. The data preprocessing stage includes encoding and encrypting the decision tree model to obtain a ciphertext decision tree, and sending the ciphertext decision tree model to the server; the server encodes and matrixizes the data in the database, transforms the database data into a two-dimensional matrix of M×(N / k), each element in the matrix is a vector for decision tree inference, and the vector is expanded in binary. The traceable query stage includes a traceable query unit and a privacy decision tree batch inference unit. The current pre-query user encodes and encrypts the query information to generate a first query ciphertext and a second query ciphertext, and sends the first query ciphertext and the second query ciphertext to the server. The server runs the traceable query unit according to the first query ciphertext and the data matrix to obtain a first ciphertext vector, runs the privacy decision tree batch inference unit according to the first ciphertext vector and the ciphertext decision tree to obtain a batch inference ciphertext, and then runs the traceable query unit again according to the batch inference ciphertext and the second query ciphertext to obtain a query result ciphertext, and sends the query result ciphertext to the current pre-query user; finally, the current pre-query user decrypts the query result ciphertext to obtain the query result.
[0071] The specific implementation using this embodiment obtains the following technical solutions and technical effects:
[0072] In the field of modern information technology, big data centers store a large amount of user-sensitive data and have strong computing capabilities. Third-party institutions use the user data in big data centers to achieve commercial purposes, such as credit scoring, user profiling, business handling, etc. However, traditional data sharing methods bring the risk of data leakage, which not only damages user privacy but also damages the reputation of big data centers. To solve this problem, the current pre-query user proposes a traceable privacy decision tree inference method.
[0073] Taking a bank's business handling as an example. The bank holds a trained decision tree classification model that inputs the personal information of users and outputs whether to approve the handling of relevant business. The personal information of users is stored in the big data center. However, the big data center does not want to disclose the personal information of users to the bank, and at the same time, the bank does not want the big data center to obtain the decision tree model parameters and the specific user name of the business to be handled.
[0074] The bank and the big data center adopt the inference method of the anonymized privacy decision tree for the currently pre-querying users. First, the bank encodes and encrypts the decision tree model to obtain the encrypted decision tree and sends it to the big data center. The big data center encodes a batch of user information into a database. Then, the bank sends the first query ciphertext and the second query ciphertext to the big data center, and the big data center responds with the query result ciphertext. Finally, the bank obtains the business handling opinion through the decryption algorithm.
[0075] Suppose the bank wants to query the following user data for credit limit upgrade:
[0076] User identity number 5667:
[0077] Annual income: 90K, house: 1 (yes), education level: 2 (undergraduate);
[0078] Anonymized decision tree model:
[0079] Root node: Encrypted annual income threshold value of 30K;
[0080] The left node of the first layer: Encrypted house threshold value of 1;
[0081] The right node of the first layer: Encrypted education level threshold value of 1;
[0082] The left and right leaf nodes of the left node of the first layer are respectively: Encrypted decision result 0, encrypted decision result 1;
[0083] The left and right leaf nodes of the right node of the first layer are respectively: Encrypted decision result 0, encrypted decision result 1;
[0084] The bank first sends the encrypted decision tree model to the big data center;
[0085] The big data center encodes the user information of user identity numbers 0 to 10000 into a database. At this time, the parameter t is selected as 10240, the parameter N is selected as 16384, the parameter k is selected as 16, and the parameter M is calculated as 10;
[0086] The bank sends the first query plaintext and the second query plaintext for encoding, which are respectively:
[0087]
[0088] Among them, and The length of is 16384;
[0089] Q′2 = [q 2,0 , q 2,1 , …, q 2,16383 , where q 2,9184 = 1, …, q 2,9199 = 1, and the rest of q2,i = 0;
[0090] The bank encrypts Q'1 and Q′2 to obtain the first query ciphertext and the second query ciphertext, and sends them to the big data center.
[0091] The big data center performs traceable privacy decision tree reasoning, and the specific process is as follows:
[0092] The big data center calculates the first ciphertext vector of users numbered from 5120 to 6143 based on the first query ciphertext Q′1 and the database, and performs the privacy decision tree reasoning unit;
[0093] Among them, for user number 5667, the annual income 90 > 30, the calculation result is yes, enter the right node of the first layer, the education level 2 > 1, the calculation result is yes, and output the right leaf node 1 of the right node of the first layer, that is, the plaintext of the query result of user number 5667 is 1;
[0094] The big data center obtains the query result ciphertext of user number 5667 based on the second query ciphertext Q′2 and the batch inference ciphertext;
[0095] The bank decrypts the query result ciphertext, and the traceable privacy decision tree reasoning result of user number 5667 is 1. Based on this result, the bank agrees to increase the credit limit of user number 5667;
[0096] According to the above traceable privacy decision tree reasoning process, the big data center does not obtain the decision tree parameters and user identity numbers of the bank, and the bank processes the reasoning results corresponding to the user identity numbers without obtaining other information. Compared with the traditional method, this method not only realizes the security of the decision tree parameters, but also realizes the security of the user identity numbers. In addition, the performance of this method is efficient, time: 3s, there is no risk of data leakage, and the cost is moderate;
[0097] Through this embodiment, the current pre-query user demonstrates the application of a traceable privacy decision tree reasoning method in the field of data sharing, effectively ensuring user privacy and model privacy, and having important application value.
[0098] Embodiment 2:
[0099] An electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the traceable privacy decision tree reasoning method described in any one of Embodiment 1 are implemented.
[0100] The computer device of the present invention may be a device including a processor and a memory, such as a single-chip microcomputer including a central processing unit. And, when the processor is used to execute the computer program stored in the memory, the steps of the above-mentioned recommendation method for modifiable relationship-driven recommendation data based on CREO software are implemented.
[0101] The so-called processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0102] The memory may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, Flash Card, at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
[0103] Embodiment 3:
[0104] A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the traceable privacy decision tree inference method described in Embodiment 1.
[0105] The computer-readable storage medium of the present invention may be any form of storage medium readable by the processor of a computer device, including but not limited to non-volatile memory, volatile memory, ferroelectric memory, etc. A computer program is stored on the computer-readable storage medium. When the processor of the computer device reads and executes the computer program stored in the memory, the steps of the above-mentioned modeling method for modifying relationship-driven modeling data based on CREO software can be implemented.
[0106] The computer program includes computer program code, which may be in the form of source code, object code, executable files, or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, removable hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0107] It should be noted that relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0108] Although the present application has been described above with reference to specific embodiments, various improvements can be made to it and components therein can be replaced with equivalents without departing from the scope of the present application. In particular, as long as there is no structural conflict, the various features in the specific embodiments disclosed in the present application can be combined with each other in any way, and the exhaustive description of the situations of these combinations is omitted in this specification only for the consideration of saving space and resources. Therefore, the present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A method for reasoning of a stealth privacy decision tree, characterized in that It includes the following steps: The current pre-query user encodes and encrypts the decision tree model to obtain a ciphertext decision tree, and sends it to the server; The current pre-query user performs oblivious query encoding and encryption on the query information of the database to be queried to obtain a ciphertext of the query information, and sends it to the server; The server encodes and matrices the database, and runs the oblivious query unit and the privacy decision tree batch inference unit according to the ciphertext decision tree and the ciphertext of the query information to obtain a ciphertext of the query result, and sends the ciphertext of the query result to the pre-query user; The current pre-query user decrypts the ciphertext of the query result to obtain the query result.
2. The method for reasoning of a stealth privacy decision tree according to claim 1, wherein The specific implementation method for the current pre-query user to encode and encrypt the decision tree model to obtain a ciphertext decision tree and send it to the server includes: Perform binary expansion on the threshold value in the decision tree model to obtain a threshold encoding value, perform one-hot encoding on the threshold index to obtain a threshold index encoding value, directly change the classification label to a classification label encoding value, and circularly fill it into a fixed vector. Use the finite series homomorphic encryption algorithm to encrypt the threshold encoding value, the threshold index encoding value, and the classification label encoding value in the decision tree model to obtain a ciphertext decision tree model, and send the ciphertext decision tree model to the server.
3. A stealth privacy decision tree inference method according to claim 1, characterized in that, The specific implementation method for the current pre-query user to perform oblivious query encoding and encryption on the query information of the database to be queried to obtain a ciphertext of the query information and send it to the server includes: According to the finite series homomorphic encryption algorithm parameter N and the bit length k of the decision tree threshold value, divide the database to be queried into a two-dimensional matrix of M×(N / k), where each element of the two-dimensional matrix is a vector for decision tree inference. Perform one-hot encoding respectively according to the position of the query information in the two-dimensional matrix to obtain a first query encoding value and a second query encoding value. Use the finite series homomorphic encryption algorithm to encrypt the first query encoding value and the second query encoding value to obtain a first query ciphertext and a second query ciphertext, and send them to the server.
4. A stealth privacy decision tree inference method according to claim 3, characterized in that The finite series homomorphic encryption algorithm parameter N includes the degree of the ring polynomial in the BFV encryption scheme or the degree of the ring polynomial in the BGV encryption scheme.
5. The method for reasoning about an anonymized privacy decision tree according to claim 4, characterized in that The specific implementation method for the server to encode and matrix the database, run the oblivious query unit and the privacy decision tree batch inference unit according to the ciphertext decision tree and the ciphertext of the query information to obtain a ciphertext of the query result, and send the ciphertext of the query result to the pre-query user includes: The server divides the database into a database matrix of M×(N / k), where each element of the database matrix is a vector for decision tree inference. Run the oblivious query unit according to the first query ciphertext and the database matrix to obtain a first ciphertext vector, then run the privacy decision tree batch inference unit according to the first ciphertext vector and the ciphertext decision tree to obtain a batch inference ciphertext, and run the oblivious query unit again according to the batch inference ciphertext and the second query ciphertext to obtain a ciphertext of the query result, and send the ciphertext of the query result to the pre-query user.
6. An electronic device, characterized in that, It includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, it implements the steps of an oblivious privacy decision tree inference method according to any one of claims 1-5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements a method for reasoning about an anonymous privacy decision tree according to any one of claims 1-5.