Business processing method and device and electronic equipment

By receiving and processing ciphertext feature data in cross-server model business access, using multiple decision trees for prediction and obfuscation, the problem of low security of cross-server access is solved, and the security protection of data and model structure is achieved.

CN119848932APending Publication Date: 2025-04-18CHINA TELECOM BESTPAY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411974408.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

When accessing model services across servers in the prior art, the access security is low, resulting in easy leakage of data and model structure features.

Method used

By receiving the ciphertext feature data sent by the service demand side, using multiple decision trees in the business model to predict, and obfuscate the intermediate prediction results and send them to the service demand side. After the business demand side returns the processed results, the model provider side then performs final prediction and encryption processing to ensure that the data and model structure are not leaked.

Benefits of technology

It realizes that when cross-server model business access is not exposed, data characteristics and model structure characteristics are improved, access security is solved and the problem of low access security is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848932A_ABST
    Figure CN119848932A_ABST
Patent Text Reader

Abstract

The invention discloses a service processing method and device and electronic equipment. The method comprises the following steps: receiving ciphertext feature data sent by a service demand end; based on the ciphertext feature data, multiple decision trees included in the service model are adopted for prediction, and intermediate prediction results corresponding to the multiple decision trees are obtained; performing confusion processing on the intermediate prediction results respectively corresponding to the plurality of decision trees to obtain first confusion prediction results respectively corresponding to the plurality of decision trees, and sending the first confusion prediction results respectively corresponding to the plurality of decision trees to a service demand end; receiving second confusion prediction results corresponding to the plurality of decision trees returned by the service demand side; and obtaining a target encryption prediction result based on the second confusion prediction results corresponding to the plurality of decision trees. According to the method and the device, the technical problem of low access safety caused by cross-server model service access in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of privacy computing, and in particular to a business processing method, device and electronic device. Background Art

[0002] Privacy computing refers to a set of technologies that implement data analysis and calculation while protecting the data itself from external leakage, thereby achieving the goal of making data "available but invisible"; and realizing the transformation and release of data value while fully protecting data and privacy security.

[0003] The decision tree model (such as the extreme gradient boosting XGBoost model) is one of the most commonly used machine learning algorithms and has been widely used in data competitions, medical, financial, energy and other industries. For example, in the field of financial risk control, the risk control model trained with XGBoost can output recognition results based on the input user information and assist risk control business. In related technologies, some institutions (such as enterprises) can train accurate XGBoost models (which can be risk control models, etc.), which can serve the business of the institution. However, the model can also be used as an asset. If it can provide risk control services to the outside world, it will bring more value returns to the model provider. Many financial institutions are small in scale or in the newly established stage, and do not have enough data or capabilities to build accurate risk control models. In the process of model prediction, "model" and "input data" are required to obtain the prediction results. "Model" and "input data" are in different institutions, and no matter which party makes the prediction, data leakage will occur.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a business processing method, device and electronic device to at least solve the technical problem of low access security caused by cross-server model business access in the related art.

[0006] According to one aspect of an embodiment of the present invention, a business processing method is provided, comprising: receiving ciphertext feature data sent by a business demand end, wherein the ciphertext feature data is obtained by encrypting the business feature data by the business demand end based on a first type of public key; based on the ciphertext feature data, using multiple decision trees included in a business model to perform predictions to obtain intermediate prediction results corresponding to the multiple decision trees; performing obfuscation processing on the intermediate prediction results corresponding to the multiple decision trees to obtain first obfuscated prediction results corresponding to the multiple decision trees, and sending the first obfuscated prediction results corresponding to the multiple decision trees to the business demand end; receiving second obfuscated prediction results corresponding to the multiple decision trees returned by the business demand end, wherein the second obfuscated prediction results corresponding to the multiple decision trees are obtained by processing the first obfuscated prediction results corresponding to the multiple decision trees by the business demand end based on a second type of public key; obtaining a target encrypted prediction result based on the second obfuscated prediction results corresponding to the multiple decision trees; sending the target encrypted prediction result to the business demand end, so that the business demand end decrypts the target encrypted prediction result to obtain a business prediction result corresponding to the business feature data.

[0007] According to one aspect of an embodiment of the present invention, another business processing method is also provided, including: the business demand end encrypts the business feature data based on the first type of public key to obtain ciphertext feature data, and sends the ciphertext feature data to the model provider end; the model provider end uses multiple decision trees included in the business model to perform prediction based on the ciphertext feature data to obtain intermediate prediction results corresponding to the multiple decision trees respectively; the model provider end performs obfuscation processing on the intermediate prediction results corresponding to the multiple decision trees respectively to obtain first obfuscated prediction results corresponding to the multiple decision trees respectively, and sends the first obfuscated prediction results corresponding to the multiple decision trees respectively. The result is sent to the business demand end; the business demand end processes the first obfuscated prediction results corresponding to the multiple decision trees based on the second type of public key to obtain the second obfuscated prediction results corresponding to the multiple decision trees, and sends the second obfuscated prediction results corresponding to the multiple decision trees to the model providing end; the model providing end obtains the target encrypted prediction result based on the second obfuscated prediction results corresponding to the multiple decision trees, and sends the ciphertext of the target encrypted prediction result to the business demand end; the business demand end decrypts the target encrypted prediction result to obtain the business prediction result corresponding to the business feature data.

[0008] According to another aspect of an embodiment of the present invention, a business processing device is also provided, including: a receiving module, used to receive ciphertext feature data sent by a business demand end, wherein the ciphertext feature data is obtained by the business demand end encrypting the business feature data based on a first type of public key; a prediction module, used to perform prediction based on the ciphertext feature data using multiple decision trees included in the business model to obtain intermediate prediction results corresponding to the multiple decision trees respectively; a processing module, used to perform obfuscation processing on the intermediate prediction results corresponding to the multiple decision trees respectively to obtain first obfuscated prediction results corresponding to the multiple decision trees respectively, and send the first obfuscated prediction results corresponding to the multiple decision trees respectively To the business demand end; a return module is used to receive the second obfuscation prediction results corresponding to the multiple decision trees returned by the business demand end, wherein the second obfuscation prediction results corresponding to the multiple decision trees are obtained by the business demand end based on the second type of public key, processing the first obfuscation prediction results corresponding to the multiple decision trees; an acquisition module is used to obtain a target encrypted prediction result based on the second obfuscation prediction results corresponding to the multiple decision trees; a sending module is used to send the target encrypted prediction result to the business demand end, and the business demand end is used to decrypt the target encrypted prediction result to obtain the business prediction result corresponding to the business feature data.

[0009] According to another aspect of an embodiment of the present invention, another business processing device is provided, including: an encryption module, which is used for the business demand end to encrypt business feature data based on a first type of public key to obtain ciphertext feature data, and send the ciphertext feature data to the model provider end; a prediction module, which is used for the model provider end to use multiple decision trees included in the business model to perform prediction based on the ciphertext feature data to obtain intermediate prediction results corresponding to the multiple decision trees; a processing module, which is used for the model provider end to perform obfuscation processing on the intermediate prediction results corresponding to the multiple decision trees to obtain first obfuscated prediction results corresponding to the multiple decision trees, and send the first obfuscated prediction results corresponding to the multiple decision trees to the model provider end. The result is sent to the business demand end; a sending module is used for the business demand end to process the first obfuscated prediction results corresponding to the multiple decision trees based on the second type of public key, obtain the second obfuscated prediction results corresponding to the multiple decision trees, and send the second obfuscated prediction results corresponding to the multiple decision trees to the model providing end; an acquisition module is used for the model providing end to obtain the target encrypted prediction result based on the second obfuscated prediction results corresponding to the multiple decision trees, and send the ciphertext of the target encrypted prediction result to the business demand end; a decryption module is used for the business demand end to decrypt the target encrypted prediction result to obtain the business prediction result corresponding to the business feature data.

[0010] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the business processing methods described.

[0011] In an embodiment of the present invention, ciphertext feature data sent by a business demand end is received; based on the ciphertext feature data, multiple decision trees included in the business model are used for prediction to obtain intermediate prediction results corresponding to the multiple decision trees; the intermediate prediction results corresponding to the multiple decision trees are obfuscated to obtain first obfuscated prediction results corresponding to the multiple decision trees, and the first obfuscated prediction results corresponding to the multiple decision trees are sent to the business demand end; second obfuscated prediction results corresponding to the multiple decision trees returned by the business demand end are received; based on the second obfuscated prediction results corresponding to the multiple decision trees, a target encrypted prediction result is obtained, thereby achieving the purpose of not exposing data features and model structure features during cross-server model business access, thereby achieving the technical effect of improving the security of cross-server model business access, and further solving the technical problem of low access security caused by cross-server model business access in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0013] Figure 1 is a flow chart of a service processing method according to an embodiment of the present invention;

[0014] Figure 2 is a schematic diagram of an optional XGBoost single subtree structure according to an embodiment of the present invention;

[0015] Figure 3 is a flow chart of another service processing method according to an embodiment of the present invention;

[0016] Figure 4 is a flowchart of an optional XGBoost model security prediction according to an embodiment of the present invention;

[0017] Figure 5 is a schematic diagram of a service processing device according to an embodiment of the present invention;

[0018] Figure 6 is a schematic diagram of another service processing device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0021] First, to facilitate understanding of the embodiments of the present invention, some terms or nouns involved in the present invention are explained below:

[0022] Privacy computing (PC) is a technical field that involves protecting the privacy of personal or organizational data while allowing data analysis and processing. The goal of this technology is to enable data sharing, analysis and utilization without leaking sensitive information.

[0023] Paillier is a public key encryption algorithm with additive homomorphism. It can perform addition operations on encrypted data without decrypting the data. This feature enables the Paillier algorithm to perform a certain degree of computation while protecting private data.

[0024] Rivest–Shamir–Adleman (RSA) is a common public key encryption algorithm, widely used in digital signatures and data encryption. The RSA algorithm has multiplication homomorphism, which allows multiplication of encrypted data without decrypting the data.

[0025] A decision tree (DT) is a tree-structured decision model used to predict results through a series of questions or conditions. It is widely used in machine learning and data mining for classification and regression tasks. A decision tree builds a tree-like model by learning the characteristics and decision rules of sample data to predict new data instances. In a decision tree, each internal node represents a test on a feature or attribute, each branch represents the result of the test, and each leaf node represents a decision or classification result.

[0026] eXtreme Gradient Boosting (XGBoost) is a machine learning algorithm that has been widely used in data competitions, medical, financial, energy and other industries. It has a strong ability to learn data patterns and has good prediction results.

[0027] The public key is used to encrypt data or messages. It is the key used to encrypt information. The public key can be made public to other users, and anyone can use the public key to encrypt data. The encrypted data can only be decrypted using the corresponding private key.

[0028] The private key is used to decrypt data that has been encrypted with the public key. It is the key used to decrypt information. The private key is confidential and only the holder of the private key can use it to decrypt data. The private key is used to decrypt encrypted data to ensure the security and privacy of the data.

[0029] According to an embodiment of the present invention, a method embodiment of business processing is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0030] Figure 1 is a flow chart of a service processing method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0031] Step S100, receiving ciphertext feature data sent by the service demand end, wherein the ciphertext feature data is obtained by encrypting the service feature data by the service demand end based on a public key of the first type;

[0032] The execution entity of steps S102 to S108 may be a model provider.

[0033] Optionally, by using the business demand side to encrypt the original business feature data based on the first type of public key, the security and privacy of the data during transmission can be ensured. Even if the data is intercepted during transmission, a third party cannot decrypt the data because only the corresponding private key can decrypt the data.

[0034] The ciphertext feature data can be expressed as [[X]] = ([[x1]], [[x2]], …, [[x n ]]), the first type of encryption algorithm may be the Paillier algorithm, and the corresponding first type of public key may be the Paillier public key.

[0035] It should be noted that the Paillier encryption algorithm has additive homomorphism, that is, the data can be directly added in the encrypted state. In the XGBoost model prediction, the model provider can perform prediction calculations based on the encrypted feature data without decrypting the data first, thereby ensuring the data security of the business demand side (i.e. the model demand side).

[0036] Optionally, through public key encryption and homomorphic encryption, both parties do not need to directly share plaintext data, and a trusted and secure computing framework can be established. After receiving the encrypted feature data, the model provider can perform predictive calculations without touching sensitive data, reducing the risk of data leakage.

[0037] Step S102, based on the ciphertext feature data, using multiple decision trees included in the business model to perform predictions, and obtaining intermediate prediction results corresponding to the multiple decision trees respectively;

[0038] Optionally, based on the received ciphertext feature data, the model provider can use its business model (including multiple decision trees) to predict these data without decrypting them first. This can be achieved by utilizing the characteristics of homomorphic encryption (such as the additive homomorphism of the Paillier algorithm and the multiplicative homomorphism of the RSA algorithm). The business model can be built based on XGBoost, which consists of multiple decision trees. The entire prediction process is decomposed into separate predictions for each tree, which can simplify the calculation process and parallel calculation, and facilitate processing in a homomorphic encryption environment. The prediction results of each decision tree can reflect the judgment of a sub-model on the input data, and these intermediate prediction results will be further obfuscated and processed to protect the privacy of the model and data.

[0039] In an optional embodiment, based on the ciphertext feature data, multiple decision trees included in the business model are used to perform predictions to obtain intermediate prediction results corresponding to the multiple decision trees, including: based on the splitting characteristics of any decision tree among the multiple decision trees, a difference operation is performed on the ciphertext feature data and the corresponding threshold to obtain the intermediate prediction result of any decision tree; using the method of obtaining the intermediate prediction result of any decision tree to obtain the intermediate prediction results corresponding to the multiple decision trees.

[0040] Optionally, this embodiment refines the process of how the model provider performs decision tree prediction based on encrypted feature data. By performing a difference operation with the threshold of the node in the decision tree, the model provider can determine the branch path of the encrypted feature data in the tree, thereby obtaining the intermediate prediction results of each tree. Describe how to expand from the prediction results of a single tree to the prediction of the entire XGBoost model (a collection of multiple trees). By repeating the above difference operation steps for any decision tree, the model provider can obtain the intermediate prediction results of all decision trees.

[0041] In an optional embodiment, the XGBoost model owned by the model provider is composed of multiple trees. Taking a single tree as an example, Figure 2 is a schematic diagram of an optional XGBoost single subtree structure according to an embodiment of the present invention, such as Figure 2 As shown in the figure, the bottom layer is the leaf node, each leaf node has its own weight, and the remaining nodes are split nodes, which record the feature number and split threshold. When the input feature value is less than the split threshold, it flows to the left child node, otherwise it flows to the right child node until it reaches the leaf node and terminates to obtain the prediction result. The model provider receives the ciphertext feature data [[X]] = ([[x1]], [[x2]], …, [[x n ]]), find the corresponding feature according to each leaf split node of the tree, use the feature value to subtract the feature threshold, and arrange the results by layer to obtain a ciphertext vector [[D]] as the intermediate prediction result. Figure 2 The decision tree structure shown, the corresponding ciphertext vector can be expressed in the following form:

[0042] [[D]]=([[x3]]-0.65,[[x2]]-0.37,[[x5]]-0.25)

[0043] Optionally, the model provider can use its XGBoost model to predict the encrypted feature data without touching the plaintext data. This is achieved by utilizing the characteristics of Paillier additive homomorphic encryption and RSA multiplicative homomorphic encryption to ensure the security of data during the prediction process.

[0044] Step S104, performing obfuscation processing on the intermediate prediction results corresponding to the multiple decision trees respectively, obtaining the first obfuscated prediction results corresponding to the multiple decision trees respectively, and sending the first obfuscated prediction results corresponding to the multiple decision trees respectively to the business demand end;

[0045] Optionally, through obfuscation, the model provider can protect the specific details of the XGBoost model, including the structure of the tree, node thresholds, and weights of leaf nodes, which are critical to the accuracy and value of the model. Obfuscation ensures that even if the business demand side decrypts the first obfuscated prediction result, it cannot directly obtain this information. Obfuscation further enhances data privacy protection on the business demand side. Even if encrypted feature data is sent, it is impossible to directly reverse-infer the data or model structure of other business demand sides or model providers from the received obfuscated prediction results, because obfuscation is to superimpose additional encryption layers and random perturbations on the prediction results. Obfuscation allows both parties (model provider and business demand side) to exchange and process data securely during the prediction process without leaking information from either party.

[0046] In an optional embodiment, the intermediate prediction results corresponding to the multiple decision trees are obfuscated to obtain the first obfuscated prediction results corresponding to the multiple decision trees, including: generating a first random number vector based on the node information of any decision tree among the multiple decision trees, wherein the length of the first random number vector is equal to the number of split nodes of any decision tree; performing an element-by-element multiplication operation on the intermediate prediction result of any decision tree and the first random number vector to obtain a first multiplication result; obfuscating the elements included in the first multiplication result in a first random order to obtain the first obfuscated prediction result of any decision tree; and obtaining the first obfuscated prediction results corresponding to the multiple decision trees in the manner of obtaining the first obfuscated prediction result of any decision tree.

[0047] Optionally, by generating a first random number vector equal to the number of decision tree splitting nodes and multiplying it with the intermediate prediction result, the structural information of the model can be effectively concealed. Even if the intermediate prediction result is decrypted, it is difficult to directly restore the original structure of the model because the introduction of the random number vector increases the uncertainty of the result. The intermediate prediction result is further encrypted by multiplying it with a random number and sequentially obfuscating it before transmission, ensuring that even if it is intercepted during transmission, any business-related information in the prediction process cannot be directly obtained. Obfuscation provides a secure environment for the calculation process, and the model provider and business demand side can perform the necessary calculation steps without worrying about leaking model details or user data.

[0048] The first confusion prediction result is [[D r _shuffle]]; the first random number vector is R_1; the first multiplication result is [[Dr ]]; the first random order is p_1.

[0049] In an optional embodiment, the model provider can obtain a first multiplication result [[D]] by multiplying the intermediate prediction result [[D]] and the generated first random number vector R_1 to obtain a first random number vector R_1 of the same length as the intermediate prediction result [[D]] r ]], to ensure that the random numbers are all positive numbers, the specific calculation formula for the first multiplication result is as follows:

[0050] [[D r ]]=[[D]]*R_1

[0051] The model provider further converts the first multiplication result [[D r ]] is disrupted, and the first confusion prediction result [[D r _shuffle]], [[D r _shuffle]] is sent to the model demander.

[0052] Optionally, the model provider generates at least one random number vector R based on the node information of the tree model, where the length of R is equal to the number of split nodes of the tree model, and each element of R is independently randomly generated by the model provider to ensure that the prediction result of each node is independently randomized; the intermediate prediction result is multiplied element by element with the random number vector R, and the multiplication homomorphic property of the second type of encryption algorithm (such as the RSA algorithm) is used to obtain a first obfuscation result to prevent the model demander from directly obtaining the true value of the intermediate prediction result through decryption.

[0053] Step S106, receiving the second obfuscation prediction results respectively corresponding to the multiple decision trees returned by the business demand end, wherein the second obfuscation prediction results respectively corresponding to the multiple decision trees are obtained by the business demand end processing the first obfuscation prediction results respectively corresponding to the multiple decision trees based on the public key of the second type;

[0054] Optionally, the first obfuscated prediction result received by the business demand side is in the form of Paillier additive homomorphic encryption. By using the second type of public key based on RSA multiplication homomorphism, the business demand side processes these obfuscated prediction results. This process includes decryption (using the private key) and re-encryption (using its own public key). After the decryption process on the business demand side, it is encrypted again using its own public key to provide an additional layer of security. Even if a third party intercepts the second obfuscated prediction result, it cannot be easily decrypted to obtain useful information because it is encrypted based on the public key of the business demand side, thereby protecting the privacy and security of the data. The second obfuscated prediction result provides the necessary conditions for the model provider to perform the next step of calculation (such as summation, deobfuscation, etc.). By using RSA multiplication homomorphic encryption, the integrity of the prediction results is ensured, and the ciphertext data required to perform subsequent steps is provided to the model provider.

[0055] Optionally, the business demand end can process the first obfuscation prediction results corresponding to multiple decision trees respectively based on the second type of public key in the following manner to obtain the first obfuscation prediction results corresponding to the multiple decision trees respectively: the business demand end uses the first type of private key to decrypt the first obfuscation prediction results corresponding to the multiple decision trees respectively, to obtain the decryption results corresponding to the multiple decision trees respectively; the business demand end performs numerical replacement on the feature data included in the decryption results corresponding to the multiple decision trees respectively, to obtain the numerical replacement results corresponding to the multiple decision trees respectively, wherein the numerical replacement is used to indicate that the feature data greater than or equal to the value is replaced with the first numerical value, and the feature data less than the corresponding threshold is replaced with the second numerical value; the business demand end uses the second type of public key to encrypt the numerical replacement results corresponding to the multiple decision trees respectively, to obtain the second obfuscation prediction results corresponding to the multiple decision trees respectively, and sends the second obfuscation prediction results corresponding to the multiple decision trees respectively to the model provider.

[0056] Optionally, the business demand end decrypts the first obfuscated prediction result [[D r _shuffle]], and replace the values ​​less than 0 with 0, and replace the remaining values ​​with 1, to obtain a 0-1 vector as the first numerical replacement result M_shuffle_right, and then calculate the second numerical replacement result M_shuffle_left=1-M_shuffle_right; the model demander generates a second type of public and private key (such as RSA public and private key), sends the public key to the model provider, encrypts the second obfuscated prediction results [[M_shuffle_left]] and [[M_shuffle_right]] and sends them to the model provider.

[0057] Optionally, the model provider generates a random order sequence to reorder the elements in the first obfuscation result to obtain a second obfuscation result, so as to further increase the degree of obfuscation of the data and prevent the model demander from using the sequence information to infer the structure of the tree model; if necessary, the model provider can also add additional random perturbation information to the second obfuscation result, such as adding a small range of random noise, to enhance data protection and avoid the leakage of precise values, while ensuring that the accuracy of the prediction results is not significantly affected.

[0058] Step S108, obtaining a target encrypted prediction result based on the second obfuscated prediction results corresponding to the plurality of decision trees;

[0059] Optionally, the business model built based on XGBoost is composed of multiple decision trees, and the prediction results of each tree need to be summarized to obtain the final prediction value. By processing and synthesizing the second obfuscated prediction result, the model provider can calculate the final prediction result of the XGBoost model, and this result exists in encrypted form to ensure data security. After receiving the second obfuscated prediction result, the model provider needs to deobfuscate it, restore the order of the prediction results of each tree, and then sum these prediction results based on the characteristics of the additive homomorphic encryption algorithm to generate the target encrypted prediction result. During the generation of the prediction result, the result is always kept in an encrypted state. Even after multiple rounds of processing and calculation, the final result exists in encrypted form, and only the business demand side has the ability to decrypt this result.

[0060] In an optional embodiment, a target encrypted prediction result is obtained based on the second obfuscated prediction results corresponding to each of the multiple decision trees, including: based on a first random order, restoring the second obfuscated prediction result of any decision tree to obtain a first restored prediction result; separating the judgment result representing each decision path in any decision tree from the first restored prediction result to obtain a separated prediction result; splicing the separated prediction result and the random ciphertext vector to obtain a spliced ​​prediction result; obfuscating the elements included in the spliced ​​prediction result according to the second random order to obtain a third obfuscated prediction result of any decision tree; obtaining third obfuscated prediction results corresponding to each of the multiple decision trees by adopting a method of obtaining the third obfuscated prediction result of any decision tree; and obtaining a target encrypted prediction result based on the obfuscated prediction results corresponding to each of the multiple decision trees.

[0061] Optionally, in the prediction of the business model built based on XGBoost, the path information of each tree is the key data, and the first restored prediction result is the result of each decision path when the input feature data makes a decision along each split node of the tree. Through restoration, separation and obfuscation, the model provider can protect the path judgment result of the model from being directly decrypted and understood, ensuring the intellectual property security of the model. The restoration process is performed based on the first random order to ensure the consistency and correctness of the prediction results in the interaction with the business demand side, and the prediction results for further calculation can be restored even after multiple encryption and obfuscation. By splicing with random ciphertext vectors and using the second random order for obfuscation, the security of the prediction results can be increased, preventing unauthorized parties from recovering useful information from encrypted data, and further protecting the privacy of the data. After multiple rounds of obfuscation and conversion, the model provider can calculate the target encrypted prediction results based on the third obfuscated prediction results of all decision trees.

[0062] In an optional embodiment, a target encrypted prediction result is obtained based on the third obfuscated prediction results corresponding to each of the multiple decision trees, including: sending the third obfuscated prediction results corresponding to each of the multiple decision trees to a business demand end; receiving the fourth obfuscated prediction results corresponding to each of the multiple decision trees returned by the business demand end, wherein the fourth obfuscated prediction results corresponding to each of the multiple decision trees are obtained by the business demand end decrypting the third obfuscated prediction results corresponding to each of the multiple decision trees based on a second type of private key, and encrypting them using a first type of public key; restoring the fourth obfuscated prediction results corresponding to each of the multiple decision trees using a second random order to obtain restored prediction results corresponding to each of the multiple decision trees; and summing the restored prediction results corresponding to each of the multiple decision trees to obtain a target encrypted prediction result.

[0063] Optionally, this embodiment can implement data conversion from the RSA encryption domain (the second type of public key / private key) to the Paillier encryption domain (the first type of public key), so that the model provider can perform a sum operation on the prediction results based on the additive homomorphic characteristics, thereby generating a target encrypted prediction result. By sending the third obfuscated prediction result to the business demand end, which is then decrypted by the business demand end using the second type of private key and then encrypted using the first type of public key, the integrity of the model prediction result during the conversion process is ensured, while maintaining the encrypted state to protect the security of the data. After restoring the fourth obfuscated prediction result using the second random order, the restored prediction result is expressed in the form of an additively homomorphic Paillier ciphertext, which can provide the necessary data format for the model provider to perform a sum operation and generate the final XGBoost model prediction result.

[0064] Optionally, after receiving the encrypted second obfuscated prediction result from the business demand end, the model provider uses the originally generated random order and information to deobfuscate and calculates the possible value of each path leading to the leaf node of the tree; then, the model provider adds random information to the possible values ​​of the path and shuffles the order to obtain the third obfuscated prediction result [[RT_2_shuffle]]. After receiving the third obfuscated prediction result [[RT_2_shuffle]], the business demand end decrypts it (in this case, it is decrypted with the RSA private key), and then encrypts it with the Paillier public key to obtain the fourth obfuscated prediction result [[RT_2_shuffle]], and sends it to the model provider.

[0065] After the model provider receives the fourth obfuscated prediction result [[RT_2_shuffle]], it uses the previously added random information and random order to restore and extract the [[RT]] part value (which is the Paillier format ciphertext at this time). Calculate the second restored prediction result [[res]] of the tree as the final result of the tree:

[0066]

[0067] Among them, leaf i is the value of the leaf node, and k is the number of leaf nodes.

[0068]

[0069] Among them, res i is the second restored prediction result of the i-th tree, and t is the number of XGBoost decision trees.

[0070] Optionally, through decryption, value replacement, re-encryption, deobfuscation, summation and final decryption, the business demand end B can securely obtain the prediction results of the business model built based on XGBoost for its own business feature data. This constitutes a secure data prediction process to ensure that the security of the data and the privacy of the model are protected during the model prediction process. At the same time, the data privacy of both the model provider and the business demand end is effectively protected.

[0071] Step S110, sending the target encrypted prediction result to the business demand end, so that the business demand end decrypts the target encrypted prediction result to obtain the business prediction result corresponding to the business feature data.

[0072] Optionally, after calculating the target encrypted prediction result, the model provider sends it to the business demand side to complete a round of secure prediction process. At this point, the business demand side has all the information needed to decrypt the prediction result. Only the business demand side has the ability to decrypt the target encrypted prediction result, because the business demand side previously provided its own public key for the encryption and obfuscation process, and the private key is stored on the business demand side to ensure the privacy and security of the prediction result. After decryption, the business demand side will obtain the plaintext prediction result. This step allows the business demand side to verify the accuracy of the prediction result and confirm the effectiveness of the data protection measures.

[0073] According to an embodiment of the present invention, another method embodiment of business processing is also provided. Figure 3 is a flow chart of a service processing method according to an embodiment of the present invention. Figure 3 As shown, the method comprises the following steps:

[0074] Step S200: The business demand end encrypts the business feature data based on the first type of public key to obtain ciphertext feature data, and sends the ciphertext feature data to the model provider;

[0075] In step S202, the model provider uses multiple decision trees included in the business model to make predictions based on the ciphertext feature data, and obtains intermediate prediction results corresponding to the multiple decision trees respectively; in step S204, the model provider performs obfuscation processing on the intermediate prediction results corresponding to the multiple decision trees respectively, obtains first obfuscated prediction results corresponding to the multiple decision trees respectively, and sends the first obfuscated prediction results corresponding to the multiple decision trees respectively to the business demand side; in step S206, the business demand side processes the first obfuscated prediction results corresponding to the multiple decision trees respectively based on the second type of public key, obtains second obfuscated prediction results corresponding to the multiple decision trees respectively, and sends the second obfuscated prediction results corresponding to the multiple decision trees respectively to the model provider;

[0076] Step S208: the model provider obtains a target encrypted prediction result based on the second obfuscated prediction results corresponding to the multiple decision trees, and sends the ciphertext of the target encrypted prediction result to the business demand side;

[0077] Step S210: The business demand end decrypts the target encrypted prediction result to obtain a business prediction result corresponding to the business feature data.

[0078] Optionally, by using the first type of public key (such as the public key of the Paillier algorithm), the business demand side can securely encrypt the feature data and send it to the model provider side to ensure the privacy of sensitive business feature data during transmission. Using different types of homomorphic encryption algorithms (Paillier's additive homomorphism and RSA's multiplicative homomorphism), the model provider side can predict the encrypted feature data and obfuscate the intermediate prediction results, ensuring that the model details, structure and parameters will not be known to the business demand side during the prediction process. The interaction between the model provider and the business demand side through the first obfuscated prediction result and the second obfuscated prediction result realizes double obfuscation and encryption of data during transmission, increasing the difficulty of reverse engineering and data theft. Utilizing the characteristics of the homomorphic encryption algorithm, the model provider side can process data in a ciphertext state and calculate the target encrypted prediction result without decrypting the data, providing strong protection for data privacy and model security.

[0079] In an optional embodiment, the business demand end processes the first obfuscation prediction results corresponding to the multiple decision trees based on the second type of public key to obtain the second obfuscation prediction results corresponding to the multiple decision trees, including: the business demand end uses the first type of private key to decrypt the first obfuscation prediction results corresponding to the multiple decision trees to obtain the decryption results corresponding to the multiple decision trees; the business demand end performs numerical replacement on the feature data included in the decryption results corresponding to the multiple decision trees to obtain the numerical replacement results corresponding to the multiple decision trees, wherein the numerical replacement is used to indicate that the feature data greater than or equal to the corresponding threshold is replaced with the first numerical value, and the feature data less than the corresponding threshold is replaced with the second numerical value; the business demand end uses the second type of public key to encrypt the numerical replacement results corresponding to the multiple decision trees to obtain the second obfuscation prediction results corresponding to the multiple decision trees, and sends the second obfuscation prediction results corresponding to the multiple decision trees to the model provider.

[0080] Optionally, the business demand end uses a first type of private key (Paillier private key) to decrypt the first obfuscated prediction result to obtain a decrypted result. Subsequently, the business demand end replaces the feature data in the decrypted result with a numerical value based on the split threshold in the model to indicate whether the feature data meets the split condition. The feature value is converted into an indicator (such as 1 or 0) to facilitate the model provider to perform the next decision tree calculation. The business demand end uses a second type of public key (RSA public key) to encrypt the numerical replacement result to generate a second obfuscated prediction result. The encryption operation ensures the security of the data during subsequent transmission. The second obfuscated prediction result is sent back to the model provider for further prediction calculations, while keeping the data encrypted to prevent the leakage of sensitive information during transmission.

[0081] Optionally, the business demand end decrypts the first obfuscated prediction result [[D r _shuffle]], and replace the values ​​less than 0 with 0, and replace the remaining values ​​with 1, to obtain a 0-1 vector as the first numerical replacement result M_shuffle_right, and then calculate the second numerical replacement result M_shuffle_left=1-M_shuffle_right; the model demander generates a second type of public and private key (such as RSA public and private key), sends the public key to the model provider, encrypts the second obfuscated prediction results [[M_shuffle_left]] and [[M_shuffle_right]] and sends them to the model provider.

[0082] The execution subjects of steps S200 to S210 can be the model provider and the business demand side (i.e., the business demand side). Through the above steps S200 to S210, the purpose of not exposing data features and model structure features during cross-server model business access can be achieved, thereby achieving the technical effect of improving the security of cross-server model business access, and further solving the technical problem of low access security caused by cross-server model business access in related technologies.

[0083] Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation mode: Figure 4 is a flow chart of an optional service processing method according to an embodiment of the present invention. Figure 4 As shown, the method includes:

[0084] The business demand side generates Paillier public and private keys and RSA public and private keys to encrypt feature data; the business demand side generates a first type of public and private key pair, and uses the public key to encrypt its business feature data to form ciphertext feature data [[X]]. Then, the business demand side sends the ciphertext feature data to the model provider. The model provider uses the ciphertext feature data corresponding to the eigenvalue minus the split threshold based on the tree splitting information, and uses the XGBoost model to predict the ciphertext data. Each tree generates an intermediate prediction result to obtain the intermediate prediction result [[D]]. Since the data is in an encrypted state, the model provider cannot directly obtain the plaintext data. In order to further protect the privacy of the model, the model provider obfuscates the intermediate prediction results, that is, by multiplying them with random numbers, adding random information, and scrambling the order, a first obfuscated prediction result [[D r_shuffle]], and sends the obfuscated data back to the business demand end; after the business demand end receives the first obfuscated prediction result from the model provider, it uses the Paillier private key to decrypt the data, replaces values ​​less than 0 with 0, and replaces the remaining values ​​with 1, forming the second obfuscated prediction results [[M_shuffle_left]] and [[M_shuffle_right]], encrypts them using the RSA algorithm and sends the results to the model provider; after the model provider receives the encrypted second obfuscated prediction result from the business demand end, it uses the originally generated random order and information to de-obfuscate, and calculates the possible values ​​of each path leading to the leaf node of the tree; then, the model provider adds random information to the possible values ​​of the path and shuffles the order to obtain the third obfuscated prediction result [[RT_2_shuffle]], which is the predicted value of the entire XGBoost model; the third obfuscated prediction result is sent to the business demand end, which decrypts it and encrypts it using the Paillier algorithm; the model provider segment is deobfuscated to obtain the separation prediction result [[RT]], which is the corresponding leaf node value leaf i After multiplication and addition, we get the predicted value res of a tree. i , then add up the prediction values ​​of multiple trees to get the final prediction value [[pred]], and send the final prediction result to the business demand side; the business demand side accepts the prediction result.

[0085] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set up between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.

[0086] In this embodiment, a business processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the terms "module" and "device" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0087] According to an embodiment of the present invention, there is also provided an apparatus embodiment for implementing the above service processing method. Figure 5 is a schematic diagram of the structure of a service processing device according to an embodiment of the present invention. Figure 5As shown, the above-mentioned business processing device includes: a receiving module 300, which is used to receive the ciphertext feature data sent by the business demand end, wherein the ciphertext feature data is obtained by encrypting the business feature data by the business demand end based on the first type of public key; a prediction module 302, connected to the receiving module 300, used to predict based on the ciphertext feature data, using multiple decision trees included in the business model, to obtain intermediate prediction results corresponding to the multiple decision trees; a processing module 304, connected to the prediction module 302, used to perform obfuscation processing on the intermediate prediction results corresponding to the multiple decision trees, to obtain first obfuscated prediction results corresponding to the multiple decision trees, and send the first obfuscated prediction results corresponding to the multiple decision trees to the business demand end; return The return module 306 is connected to the processing module 304, and is used to receive the second obfuscated prediction results corresponding to the multiple decision trees returned by the business demand end, wherein the second obfuscated prediction results corresponding to the multiple decision trees are obtained by the business demand end processing the first obfuscated prediction results corresponding to the multiple decision trees based on the second type of public key; the acquisition module 308 is connected to the return module 306, and is used to obtain the target encrypted prediction result based on the second obfuscated prediction results corresponding to the multiple decision trees; the sending module 310 is connected to the acquisition module 308, and is used to send the target encrypted prediction result to the business demand end, and the business demand end decrypts the target encrypted prediction result to obtain the business prediction result corresponding to the business feature data.

[0088] According to an embodiment of the present invention, another device embodiment for implementing the above service processing method is also provided. Figure 6 is a schematic diagram of the structure of a service processing device according to an embodiment of the present invention. Figure 6As shown, the above-mentioned business processing device includes: an encryption module 400, which is used for the business demand end to encrypt the business feature data based on the first type of public key to obtain the ciphertext feature data, and send the ciphertext feature data to the model provider end; a prediction module 402, which is connected to the encryption module 400, and is used for the model provider end to predict based on the ciphertext feature data using multiple decision trees included in the business model to obtain intermediate prediction results corresponding to the multiple decision trees; a processing module 404, which is connected to the prediction module 402, and is used for the model provider end to perform obfuscation processing on the intermediate prediction results corresponding to the multiple decision trees, to obtain the first obfuscated prediction results corresponding to the multiple decision trees, and send the first obfuscated prediction results corresponding to the multiple decision trees to the business demand end ; A sending module 406 is connected to the processing module 404, and is used by the business demand side to process the first obfuscated prediction results corresponding to the multiple decision trees based on the second type of public key, to obtain the second obfuscated prediction results corresponding to the multiple decision trees, and send the second obfuscated prediction results corresponding to the multiple decision trees to the model provider; an acquisition module 408 is connected to the sending module 406, and is used by the model provider to obtain the target encrypted prediction result based on the second obfuscated prediction results corresponding to the multiple decision trees, and send the ciphertext of the target encrypted prediction result to the business demand side; a decryption module 410 is connected to the acquisition module 408, and is used by the business demand side to decrypt the target encrypted prediction result to obtain the business prediction result corresponding to the business feature data.

[0089] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0090] It should be noted that the receiving module 300, the prediction module 302, the processing module 304, the return module 306, the acquisition module 308, and the sending module 310 correspond to steps S100 to S110 in the embodiment, and the encryption module 400, the prediction module 402, the processing module 404, the sending module 406, the acquisition module 408, and the decryption module 410 correspond to steps S200 to S210 in the embodiment. The examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules can be run in a computer terminal as part of the device.

[0091] It should be noted that the optional or preferred implementation of this embodiment can refer to the relevant description in the embodiment, which will not be repeated here.

[0092] The above-mentioned business processing device may also include a processor and a memory. The above-mentioned receiving module 300, prediction module 302, processing module 304, return module 306, acquisition module 308, sending module 310, encryption module 400, prediction module 402, processing module 404, sending module 406, acquisition module 408, decryption module 410, etc. are all stored in the memory as program modules, and the processor executes the above-mentioned program modules stored in the memory to realize corresponding functions.

[0093] The processor includes a kernel, which retrieves the corresponding program module from the memory. The kernel may be one or more. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory includes at least one memory chip.

[0094] According to an embodiment of the present application, an embodiment of a non-volatile storage medium is also provided. Optionally, in this embodiment, the non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute any of the above-mentioned service processing methods.

[0095] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group, and the non-volatile storage medium includes a stored program.

[0096] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: receiving ciphertext feature data sent by the business demand end, wherein the ciphertext feature data is obtained by encrypting the business feature data by the business demand end based on the first type of public key; based on the ciphertext feature data, using multiple decision trees included in the business model to make predictions, and obtaining intermediate prediction results corresponding to the multiple decision trees respectively; performing obfuscation processing on the intermediate prediction results corresponding to the multiple decision trees respectively, and obtaining first obfuscated prediction results corresponding to the multiple decision trees respectively, and sending the first obfuscated prediction results corresponding to the multiple decision trees respectively. Send it to the business demand end; receive the second obfuscated prediction results corresponding to the multiple decision trees returned by the business demand end, wherein the second obfuscated prediction results corresponding to the multiple decision trees are obtained by the business demand end processing the first obfuscated prediction results corresponding to the multiple decision trees based on the second type of public key; obtain a target encrypted prediction result based on the second obfuscated prediction results corresponding to the multiple decision trees; send the target encrypted prediction result to the business demand end, so that the business demand end decrypts the target encrypted prediction result to obtain the business prediction result corresponding to the business feature data.

[0097] According to an embodiment of the present application, an embodiment of a processor is also provided. Optionally, in this embodiment, the processor is used to run a program, wherein the program executes any one of the above-mentioned business processing methods when it is run.

[0098] According to an embodiment of the present application, an embodiment of a computer program product is also provided, which, when executed on a data processing device, is suitable for executing a program that initializes any of the steps of the above-mentioned business processing method.

[0099] Optionally, the above-mentioned computer program product, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: receiving ciphertext feature data sent by a business demand end, wherein the ciphertext feature data is obtained by encrypting the business feature data by the business demand end based on a first type of public key; based on the ciphertext feature data, using multiple decision trees included in the business model to make predictions, and obtaining intermediate prediction results corresponding to the multiple decision trees respectively; performing obfuscation processing on the intermediate prediction results corresponding to the multiple decision trees respectively, and obtaining first obfuscated prediction results corresponding to the multiple decision trees respectively, and the first obfuscated prediction results corresponding to the multiple decision trees respectively. The obfuscated prediction result is sent to the business demand end; the second obfuscated prediction results corresponding to the multiple decision trees returned by the business demand end are received, wherein the second obfuscated prediction results corresponding to the multiple decision trees are obtained by the business demand end processing the first obfuscated prediction results corresponding to the multiple decision trees based on the second type of public key; based on the second obfuscated prediction results corresponding to the multiple decision trees, a target encrypted prediction result is obtained; the target encrypted prediction result is sent to the business demand end, and the business demand end decrypts the target encrypted prediction result to obtain the business prediction result corresponding to the business feature data.

[0100] An embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: receiving ciphertext feature data sent by a business demand end, wherein the ciphertext feature data is obtained by encrypting the business feature data by the business demand end based on a first type of public key; based on the ciphertext feature data, using multiple decision trees included in a business model to perform predictions to obtain intermediate prediction results corresponding to the multiple decision trees respectively; performing obfuscation processing on the intermediate prediction results corresponding to the multiple decision trees respectively to obtain first obfuscated prediction results corresponding to the multiple decision trees respectively, and performing obfuscation processing on the intermediate ... The first obfuscated prediction results corresponding to the decision trees are sent to the business demand end; the second obfuscated prediction results corresponding to the multiple decision trees returned by the business demand end are received, wherein the second obfuscated prediction results corresponding to the multiple decision trees are obtained by the business demand end processing the first obfuscated prediction results corresponding to the multiple decision trees based on the second type of public key; based on the second obfuscated prediction results corresponding to the multiple decision trees, a target encrypted prediction result is obtained; the target encrypted prediction result is sent to the business demand end, and the business demand end decrypts the target encrypted prediction result to obtain the business prediction result corresponding to the business feature data.

[0101] The above sequence of the embodiments of the present invention is for description only and does not represent the superiority or inferiority of the embodiments.

[0102] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0103] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the above modules can be a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, modules or indirect coupling or communication connection of modules, which can be electrical or other forms.

[0104] The modules described above as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0105] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.

[0106] If the above-mentioned integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0107] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A business processing method, characterized in that: include: Receiving ciphertext feature data sent by the service demand end, wherein the ciphertext feature data is obtained by the service demand end encrypting the service feature data based on the first type of public key; Based on the ciphertext feature data, multiple decision trees included in the business model are used to perform predictions to obtain intermediate prediction results corresponding to the multiple decision trees respectively; Performing obfuscation processing on the intermediate prediction results respectively corresponding to the multiple decision trees to obtain first obfuscated prediction results respectively corresponding to the multiple decision trees, and sending the first obfuscated prediction results respectively corresponding to the multiple decision trees to the business demand end; Receiving second obfuscated prediction results respectively corresponding to the multiple decision trees returned by the business demand end, wherein the second obfuscated prediction results respectively corresponding to the multiple decision trees are obtained by the business demand end processing the first obfuscated prediction results respectively corresponding to the multiple decision trees based on the public key of the second type; Obtaining a target encrypted prediction result based on the second obfuscated prediction results respectively corresponding to the plurality of decision trees; The target encrypted prediction result is sent to the business demand end, so that the business demand end decrypts the target encrypted prediction result to obtain the business prediction result corresponding to the business feature data.

2. The method according to claim 1, characterized in that The method of using a plurality of decision trees included in the business model to perform prediction based on the ciphertext feature data to obtain intermediate prediction results corresponding to the plurality of decision trees respectively includes: Based on the splitting feature of any decision tree among the multiple decision trees, performing a difference operation on the ciphertext feature data and a corresponding threshold value to obtain an intermediate prediction result of any decision tree; The intermediate prediction results corresponding to the multiple decision trees are obtained by adopting the method of obtaining the intermediate prediction result of any one of the decision trees.

3. The method according to claim 1, characterized in that: The performing obfuscation processing on the intermediate prediction results respectively corresponding to the plurality of decision trees to obtain first obfuscated prediction results respectively corresponding to the plurality of decision trees includes: Generate a first random number vector based on node information of any decision tree among the multiple decision trees, wherein the length of the first random number vector is equal to the number of split nodes of any decision tree; Performing an element-by-element multiplication operation on the intermediate prediction result of any one of the decision trees and the first random number vector to obtain a first multiplication result; Performing obfuscation processing on the elements included in the first multiplication result in a first random order to obtain a first obfuscated prediction result of any one of the decision trees; The first confused prediction results corresponding to the plurality of decision trees are obtained by adopting a method of obtaining the first confused prediction result of any one of the decision trees.

4. The method according to claim 3, characterized in that The step of obtaining a target encrypted prediction result based on the second obfuscated prediction results respectively corresponding to the plurality of decision trees includes: Based on the first random order, restore the second confused prediction result of any one of the decision trees to obtain a first restored prediction result; Separating the judgment result representing each decision path in any one of the decision trees from the first restored prediction result to obtain a separated prediction result; splicing the separated prediction result and the random ciphertext vector to obtain a spliced ​​prediction result; Obfuscating the elements included in the splicing prediction result according to a second random order to obtain a third obfuscated prediction result of any one of the decision trees; Obtaining the third confused prediction results corresponding to the plurality of decision trees respectively by adopting the method of obtaining the third confused prediction result of any one of the decision trees; Based on the obfuscated prediction results corresponding to the multiple decision trees, the target encrypted prediction result is obtained.

5. The method according to claim 4, characterized in that The step of obtaining the target encrypted prediction result based on the third obfuscated prediction results respectively corresponding to the plurality of decision trees includes: Sending the third confusion prediction results respectively corresponding to the plurality of decision trees to the business demand end; Receiving fourth obfuscated prediction results respectively corresponding to the multiple decision trees returned by the business demand end, wherein the fourth obfuscated prediction results respectively corresponding to the multiple decision trees are obtained by the business demand end decrypting the third obfuscated prediction results respectively corresponding to the multiple decision trees based on the second type of private key and encrypting them using the first type of public key; Using the second random order to restore the fourth confused prediction results respectively corresponding to the plurality of decision trees, to obtain restored prediction results respectively corresponding to the plurality of decision trees; The restored prediction results corresponding to the multiple decision trees are summed to obtain the target encrypted prediction result.

6. A business processing method, characterized in that: include: The business demand end encrypts the business feature data based on the first type of public key to obtain ciphertext feature data, and sends the ciphertext feature data to the model provider end; The model providing end uses a plurality of decision trees included in the business model to perform prediction based on the ciphertext feature data, and obtains intermediate prediction results corresponding to the plurality of decision trees respectively; The model provider performs obfuscation processing on the intermediate prediction results corresponding to the multiple decision trees respectively, obtains the first obfuscated prediction results corresponding to the multiple decision trees respectively, and sends the first obfuscated prediction results corresponding to the multiple decision trees respectively to the business demand end; The business demand end processes the first obfuscation prediction results corresponding to the plurality of decision trees respectively based on the second type of public key to obtain the second obfuscation prediction results corresponding to the plurality of decision trees respectively, and sends the second obfuscation prediction results corresponding to the plurality of decision trees respectively to the model providing end; The model providing end obtains a target encrypted prediction result based on the second obfuscated prediction results respectively corresponding to the plurality of decision trees, and sends the ciphertext of the target encrypted prediction result to the business demand end; The business demand end decrypts the target encrypted prediction result to obtain the business prediction result corresponding to the business feature data.

7. The method according to claim 6, characterized in that The business demand end processes the first obfuscated prediction results corresponding to the plurality of decision trees respectively based on the public key of the second type to obtain the second obfuscated prediction results corresponding to the plurality of decision trees respectively, including: The business demand end uses the first type of private key to decrypt the first obfuscated prediction results corresponding to the multiple decision trees respectively, to obtain the decrypted results corresponding to the multiple decision trees respectively; The business demand end performs numerical replacement on the feature data included in the decryption results corresponding to the multiple decision trees respectively, to obtain numerical replacement results corresponding to the multiple decision trees respectively, wherein the numerical replacement is used to indicate that the feature data greater than or equal to the corresponding threshold is replaced with a first numerical value, and the feature data less than the corresponding threshold is replaced with a second numerical value; The business demand end uses the second type of public key to encrypt the numerical replacement results corresponding to the multiple decision trees, obtain the second confusion prediction results corresponding to the multiple decision trees, and send the second confusion prediction results corresponding to the multiple decision trees to the model provider.

8. A service processing device, characterized in that: include: A receiving module, configured to receive ciphertext feature data sent by a service demand end, wherein the ciphertext feature data is obtained by encrypting the service feature data by the service demand end based on a public key of the first type; A prediction module, configured to perform prediction based on the ciphertext feature data using multiple decision trees included in the business model to obtain intermediate prediction results corresponding to the multiple decision trees respectively; A processing module, configured to perform obfuscation processing on the intermediate prediction results respectively corresponding to the plurality of decision trees, obtain first obfuscated prediction results respectively corresponding to the plurality of decision trees, and send the first obfuscated prediction results respectively corresponding to the plurality of decision trees to the business demand end; A return module, used for receiving the second obfuscation prediction results respectively corresponding to the multiple decision trees returned by the business demand end, wherein the second obfuscation prediction results respectively corresponding to the multiple decision trees are obtained by the business demand end processing the first obfuscation prediction results respectively corresponding to the multiple decision trees based on the public key of the second type; An acquisition module, configured to obtain a target encrypted prediction result based on the second obfuscated prediction results respectively corresponding to the plurality of decision trees; A sending module is used to send the target encrypted prediction result to the business demand end, and the business demand end is used to decrypt the target encrypted prediction result to obtain the business prediction result corresponding to the business feature data.

9. A service processing device, characterized in that: include: An encryption module is used for the business demand end to encrypt the business feature data based on the first type of public key to obtain ciphertext feature data, and send the ciphertext feature data to the model provider end; A prediction module, used for the model providing end to perform prediction based on the ciphertext feature data using multiple decision trees included in the business model to obtain intermediate prediction results corresponding to the multiple decision trees respectively; A processing module, used for the model provider to perform obfuscation processing on the intermediate prediction results corresponding to the multiple decision trees, obtain the first obfuscated prediction results corresponding to the multiple decision trees, and send the first obfuscated prediction results corresponding to the multiple decision trees to the business demand end; A sending module, used for the business demand end to process the first obfuscation prediction results corresponding to the multiple decision trees respectively based on the second type of public key, obtain the second obfuscation prediction results corresponding to the multiple decision trees respectively, and send the second obfuscation prediction results corresponding to the multiple decision trees respectively to the model providing end; An acquisition module is used for the model providing end to obtain a target encrypted prediction result based on the second obfuscated prediction results respectively corresponding to the multiple decision trees, and send the ciphertext of the target encrypted prediction result to the business demand end; The decryption module is used for the business demand end to decrypt the target encrypted prediction result to obtain the business prediction result corresponding to the business feature data.

10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the business processing method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Privacy protection method

    CN110222527A

  • Prediction method and device based on GBDT model

    CN110874481A

  • Homomorphic encryption model parameter anti-theft-based network threat detection method and system

    CN116743346A

  • Distributed decision tree model privacy protection method, system and device

    CN118869275A

  • Protecting data from brute force attack

    US10824737B1