Data processing methods, devices and servers
By leveraging the structural characteristics of the target model and the computational rules of model layer combination, the problem of high complexity in the data processing process is solved, achieving efficient data processing while protecting data privacy, reducing processing complexity and improving efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI MATRIXELEMENTS TECH CO LTD
- Filing Date
- 2021-10-20
- Publication Date
- 2026-05-26
AI Technical Summary
In data processing scenarios, where different data providers hold predictive models and business data, existing methods suffer from high complexity and low efficiency in protecting data privacy.
By leveraging the structural characteristics of the target model and employing model layer combination calculation rules, including calculating the point result vectors of non-leaf nodes, splicing model layer result vectors, grouping and calculating group result vectors, and combining these with encryption rules for data processing, data privacy and security are ensured.
This effectively reduces the complexity of the processing from O(n) to O(log(n)), improving the efficiency and security of data processing.
Smart Images

Figure CN113902443B_ABST
Abstract
Description
Technical Field
[0001] This manual pertains to the field of Internet technology, and in particular relates to data processing methods, devices, and servers. Background Technology
[0002] In some data processing scenarios (e.g., joint prediction scenarios), different data parties often hold prediction models and business data to be processed. For example, the first data party holds the prediction model, and the second data party holds the business data to be processed. To protect the data privacy of both parties, it is required that they cooperate to process the data without knowing what the other party holds, using the prediction model held by the first data party to process the business data held by the second data party, and obtain the corresponding prediction result.
[0003] However, when implementing existing methods, there are often technical problems such as high processing complexity and low processing efficiency.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This specification provides a data processing method, apparatus, and server that can effectively reduce the complexity of the processing process while protecting the data privacy of the participants, and efficiently process target data by calling the target model to obtain the target processing results about the target data.
[0006] This specification provides a data processing method applied to a first data party, which holds encrypted data of a target model; the target model is a tree model containing multiple model layers; the method includes:
[0007] Receive the target processing request;
[0008] In response to the target processing request, the target data is processed by cooperating with a second data party that takes the encrypted data of the target model as input and the encrypted data of the target data as input, based on preset protocol rules, to obtain the target processing result of the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0009] In some embodiments, target data processing is performed based on preset protocol rules, including:
[0010] Based on the ciphertext data of the target data and the ciphertext data of the target model, calculate the point result vector of each non-leaf node; and concatenate the point result vectors of non-leaf nodes in the same model layer to obtain the layer result vector of the model layer.
[0011] According to the preset grouping rules, the first type of model layer containing non-leaf nodes is divided into multiple model layer groups; wherein, each model layer group contains two adjacent model layers;
[0012] According to the preset calculation rules, the group result vector of each model layer group is calculated by using the layer result vector of the model layer contained in each model layer group.
[0013] Based on the group result vectors of each model layer group and the weight vectors of the second type of model layer where the leaf nodes are located, the target processing result for the target data is calculated.
[0014] In some embodiments, according to a preset grouping rule, the first type of model layer containing non-leaf nodes is divided into multiple model layer groups, including:
[0015] Detect whether the number of layers in the first type of model in the target model is even;
[0016] If the number of layers in the first type of model layer in the target model is even, the adjacent odd-numbered model layers and even-numbered model layers in the first type of model layer are divided into a model layer group according to the order of their corresponding depths from smallest to largest; wherein, in the same model layer group, the depth corresponding to the odd-numbered model layer is greater than the depth corresponding to the even-numbered model layer.
[0017] In some embodiments, after detecting whether the number of layers of the first type of model layer in the target model is even, the method further includes:
[0018] If the number of layers in the first type of model layer in the target model is determined to be odd, then the adjacent odd-numbered model layers and even-numbered model layers in the first type of model layer are divided into a model layer group in order of increasing depth; and the remaining model layer in the first type of model layer is divided into a model layer group.
[0019] In some embodiments, according to preset calculation rules, the group result vector of each model layer group is calculated using the layer result vectors of the model layers contained in each model layer group, including:
[0020] The group result vector for the current model layer group is calculated as follows:
[0021] Expand the layer result vector of the even-numbered model layer in the current model layer group to obtain the expanded layer result vector of the even-numbered model layer in the current model layer group.
[0022] Multiply the elements with the same data position in the expanded layer result vector of the even-numbered model layer in the current model layer group with the layer result vector of the odd-numbered model layer in the current model layer group to obtain the group result vector of the current model layer group.
[0023] In some embodiments, the target processing result for the target data is calculated based on the group result vector of each model layer group and the weight vector of the second type of model layer where the leaf node is located, including:
[0024] According to the preset grouping rules, the group result vectors of multiple model layer groups are divided into multiple data groups; wherein, each data group contains the group result vectors of two adjacent model layer groups.
[0025] According to the preset calculation rules, the result vector of each data group is calculated;
[0026] Based on the result vectors of each data group, the result vector of the first type of model layer is calculated;
[0027] The result vector of the first type of model layer is multiplied by the weight vector of the second type of model layer to obtain the target processing result.
[0028] In some embodiments, prior to performing target data processing, the method further includes:
[0029] According to the preset encryption rules, the feature selection vectors and feature thresholds at each non-leaf node in the target model, as well as the preset weight values at each leaf node, are encrypted to obtain the ciphertext data of the target model.
[0030] In some embodiments, the preset encryption rules include encryption rules based on secret sharing.
[0031] In some embodiments, the target model includes a user's transaction risk prediction model; the target data includes characteristic data of the target user;
[0032] Accordingly, the target processing results for the target data include: encrypted data of the target user's transaction risk level.
[0033] In some embodiments, prior to performing target data processing, the method further includes:
[0034] Detect whether the target model is a complete binary tree model;
[0035] If the target model is determined to be an incomplete binary tree model, the target model is completed to obtain an improved target model.
[0036] This specification also provides a data processing method in an embodiment, employing a second data party that holds encrypted data of the target data to be processed; the method includes:
[0037] Initiate a target processing request;
[0038] Using the encrypted data of the target data as input, and cooperating with a first data party that uses the encrypted data of the target model as input, target data processing is performed based on preset protocol rules to obtain target processing results for the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0039] In some embodiments, prior to performing target data processing, the method further includes:
[0040] According to the preset encryption rules, the multiple feature values contained in the target data are encrypted separately to obtain the ciphertext data of the target data.
[0041] In some embodiments, the preset encryption rules include encryption rules based on secret sharing.
[0042] In some embodiments, the target model includes a user's transaction risk prediction model; the target data includes characteristic data of the target user;
[0043] Accordingly, the target processing results for the target data include: encrypted data of the target user's transaction risk level.
[0044] In some embodiments, after obtaining the target processing result regarding the target data, the method further includes:
[0045] Receive the target processing result;
[0046] According to the preset encryption rules, the target processing result is decrypted to obtain the target user's transaction risk level;
[0047] Based on the target user's transaction risk level, provide matching services to the target user.
[0048] This specification also provides a data processing method applied to a first data party, the first data party holding encrypted data of a first fragment of a target model; the target model is a tree model containing multiple model layers; the method includes:
[0049] Receive the target processing request;
[0050] In response to the target processing request, the encrypted data of the first segment of the target model is used as input. The system collaborates with a second data party that uses the encrypted data of the target data as input and a third data party that uses the encrypted data of the second segment of the target model as input. Based on preset protocol rules, the system processes the target data to obtain the target processing result. The preset protocol rules include model layer combination calculation rules.
[0051] This specification also provides a data processing method applied to multiple first data parties and multiple second data parties, wherein each of the multiple first data parties holds a ciphertext data of a segment of a target model, and each of the multiple second data parties holds a ciphertext data of a segment of target data, wherein the target model is a tree model containing multiple model layers, and the method includes:
[0052] In response to the target processing request, multiple first data parties and multiple second data parties respectively use the encrypted data of the target model fragments and the encrypted data of the target data fragments they hold as inputs, and cooperate to process the target data based on preset protocol rules to obtain the target processing result about the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0053] This specification also provides a data processing apparatus, applied to a first data party, the first data party holding encrypted data of a target model; the target model is a tree model containing multiple model layers; including:
[0054] The receiving module is used to receive target processing requests;
[0055] The processing module is used to respond to the target processing request, take the encrypted data of the target model as input, cooperate with a second data party that takes the encrypted data of the target data as input, and perform target data processing based on preset protocol rules to obtain the target processing result about the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0056] This specification also provides a data processing apparatus, employing a second data party, the second data party holding encrypted data of the target data to be processed; including:
[0057] The initiation module is used to initiate target processing requests;
[0058] The processing module is used to take the encrypted data of the target data as input, cooperate with the first data party taking the encrypted data of the target model as input, and perform target data processing based on preset protocol rules to obtain the target processing result about the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0059] This specification also provides a server, including a processor and a memory for storing processor-executable instructions, wherein the processor executes the instructions to implement the relevant steps of the data processing method.
[0060] This specification also provides a computer-readable storage medium storing computer instructions that, when executed, implement the relevant steps of the data processing method.
[0061] Based on the data processing method, apparatus, and server provided in this specification, a first data party holding a target model with a tree model structure containing multiple model layers and a second data party holding target data to be processed can respond to target processing requests. Each data party uses the encrypted data of its respective target model and the encrypted data of the target data as input, and cooperates to process the target data based on preset protocol rules, including model layer combination calculation rules. This effectively reduces the complexity of the processing while protecting the data privacy of the participants, efficiently obtains the target processing results by calling the target model to process the target data, and improves overall data processing efficiency. Attached Figure Description
[0062] To more clearly illustrate the embodiments of this specification, the accompanying drawings used in the embodiments will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0063] Figure 1 This is a flowchart illustrating a data processing method provided in one embodiment of this specification;
[0064] Figure 2 This is a schematic diagram illustrating one embodiment of the data processing method provided in the embodiments of this specification, applied in a scenario example.
[0065] Figure 3 This is a schematic diagram illustrating one embodiment of the data processing method provided in the embodiments of this specification, applied in a scenario example.
[0066] Figure 4 This is a schematic diagram illustrating one embodiment of the data processing method provided in the embodiments of this specification, applied in a scenario example.
[0067] Figure 5 This is a schematic diagram illustrating one embodiment of the data processing method provided in the embodiments of this specification, applied in a scenario example.
[0068] Figure 6 This is a flowchart illustrating a data processing method provided in one embodiment of this specification;
[0069] Figure 7 This is a flowchart illustrating a data processing method provided in one embodiment of this specification;
[0070] Figure 8 This is a schematic diagram of the structural composition of a server provided in one embodiment of this specification;
[0071] Figure 9 This is a schematic diagram of the structural composition of a data processing apparatus provided in one embodiment of this specification;
[0072] Figure 10 This is a schematic diagram illustrating one embodiment of the data processing method provided in the embodiments of this specification, applied in a scenario example. Detailed Implementation
[0073] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0074] Given existing data processing methods, the complexity of securely accessing a model held by one party to process business data held by another party, while protecting the data privacy of all participants, is often relatively high (e.g., typically O(n)). This is because existing methods completely fail to consider the specific structural characteristics of the model (e.g., a tree model), and even less do they consider leveraging these structural characteristics to combine the model layers and then using the associative law of multiplication and related protocols to reduce the complexity of the processing.
[0075] To address the root cause of the aforementioned problems, this specification considers fully utilizing the structural characteristics of the model (e.g., the characteristic that multiple model layers in a tree model are connected sequentially according to their depth from smallest to largest). Based on preset protocol rules including model layer combination calculation rules, the point result vectors of each non-leaf node are first calculated; then, the point result vectors of non-leaf nodes on the same model layer are concatenated to obtain the layer result vector of the model layer. Next, according to preset grouping rules, the first type of model layer containing non-leaf nodes can be divided into multiple model layer groups; and according to preset calculation rules, the group result vectors of each model layer group are calculated using the layer result vectors of the model layers contained within each model layer group. Finally, according to the aforementioned preset grouping rules, the group result vectors of multiple model layer groups are processed using a processing method similar to that used for processing the layer result vectors of model layers to obtain the result vector of the first type of model layer; then, the result vector of the first type of model layer is multiplied by the weight vector obtained by concatenating the preset weight values of the leaf nodes on the second type of model layer, thereby obtaining the target processing result for the target data.
[0076] By using the above methods, the complexity of the processing can be effectively reduced (for example, the processing complexity can be reduced to O(log(n))) while protecting the data privacy of the participants. This allows for more efficient use of the target model to process the target data and obtain the target processing results for the target data.
[0077] Based on the above ideas, see Figure 1 As shown in the embodiments of this specification, a data processing method is provided. Specifically, this method is applied to a first data party. The first data party holds encrypted data of a target model; the target model is a tree model containing multiple model layers. In specific implementation, the method may include the following:
[0078] S101: Receive target processing request.
[0079] S102: In response to the target processing request, using the encrypted data of the target model as input, and cooperating with a second data party using the encrypted data of the target data as input, target data processing is performed based on preset protocol rules to obtain target processing results for the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0080] In some embodiments, the first data party can be specifically understood as a model holder, holding the target model to be invoked. The second data party can be specifically understood as a data holder, holding the target data to be processed.
[0081] Specifically, for example, in a transaction risk prediction scenario, the target model mentioned above could be a transaction risk prediction model for a user. Correspondingly, the target data could be the transaction characteristic data of the target user to be predicted. For example, the target user's age, occupation, monthly income, etc.
[0082] For example, in a weather forecasting scenario, the target model mentioned above can also be a weather forecasting model. Correspondingly, the target data can be the collected atmospheric characteristic data from the previous day, such as humidity, wind speed, cloud thickness, etc.
[0083] For example, in a shopping guidance scenario, the target model mentioned above can also be a model for determining customer shopping preferences. Correspondingly, the target data can be historical shopping behavior data of customers. For example, the number of times a customer shopped in the past week, the type of purchases, the amount spent, etc.
[0084] Of course, the application scenarios, target models, and target data listed above are merely illustrative. In practice, this method can be applied to other application scenarios, and correspondingly, the target models and target data involved can be other types of models and other types of data. This book does not impose any limitations on these aspects.
[0085] The current requirement is to process the target data held by the second data party using the target model held by the first data party, without disclosing the target data held by the second data party to the first data party, and without disclosing the target model held by the first data party to the second data party, in order to obtain the target processing result of the target data, while protecting the data privacy of the participants.
[0086] In some embodiments, the target model described above may specifically be a tree model containing multiple model layers. Specifically, the target model may be a complete binary tree model.
[0087] For details, please refer to Figure 2 As shown, the target model can include five model layers. These five model layers are connected sequentially in ascending order of their corresponding depths. Specifically, the top layer corresponds to depth 0 (level 0) and is denoted as model layer 0; the second layer corresponds to depth 1 (level 1) and is denoted as model layer 1; the third layer corresponds to depth 2 (level 2) and is denoted as model layer 2; the fourth layer corresponds to depth 3 (level 3) and is denoted as model layer 3; and the bottom layer corresponds to depth 4 (level 4) and is denoted as model layer 4. Model layers 0, 2, and 4 can be referred to as even-numbered model layers, while model layers 1 and 3 can be referred to as odd-numbered model layers.
[0088] Multiple nodes are deployed on each model layer. Nodes deployed on the bottom model layer (layer 4) can be called leaf nodes. Model layer 4 with leaf nodes can be called a second-type model layer. Nodes deployed on other model layers besides model layer 4 can be called non-leaf nodes. Model layers 0, 1, 2, and 3 with non-leaf nodes can be called first-type model layers. The non-leaf node deployed on model layer 0 can also be called the root node.
[0089] Specifically, a corresponding feature selection vector and a corresponding feature threshold can be set at each non-leaf node. For example, the feature selection vector corresponding to the non-leaf node numbered j in model layer i can be represented as e. i,j The corresponding feature threshold can be expressed as t i,j .
[0090] Each leaf node can be assigned a corresponding preset weight value. For example, the preset weight value at the leaf node numbered q in the second type of model layer can be represented as wq.
[0091] In some embodiments, the target data may specifically be a target feature vector containing multiple feature values. Specifically, for example, the target data may be represented in the following form: X = (x1, x2, x3, x4). Where x1, x2, x3, and x4 each correspond to a feature value of a feature.
[0092] For example, the target data X mentioned above can specifically refer to the transaction characteristic data of target user x, where x1 can specifically represent the age value of target user x, x2 can specifically represent the occupation of target user x, x3 can specifically represent the monthly income value of target user x, x4 can specifically represent the education level of target user x, etc.
[0093] In some embodiments, the aforementioned target processing request may specifically be request data generated and initiated by the second data party when it needs to call the target model held by the first data party to process target data.
[0094] In some embodiments, the first data party and the second data party may respond to the target processing request and use their respective encrypted target data and encrypted target data as input, and cooperate based on preset protocol rules to process the target data, so as to efficiently process the target data and obtain the target processing result while protecting the data privacy of both parties.
[0095] In some embodiments, when processing target data in a specific collaboration, the first data party may use encrypted data of the target model, and the second data party may use encrypted data of the target data.
[0096] Specifically, the encrypted data of the target model can refer to the encrypted data obtained by encrypting the feature selection vectors and feature thresholds at non-leaf nodes and the preset weight values at leaf nodes in the target model. The encrypted data of the target data can specifically refer to the encrypted data obtained by encrypting each feature value in the target data.
[0097] By using the encrypted data of the target model and the encrypted data of the target data to process the target data, the risk of leakage of the target model and target data during the processing can be effectively reduced, thus protecting the data privacy of the participants.
[0098] In some embodiments, the aforementioned preset protocol rules may include at least model layer combination calculation rules. These model layer combination calculation rules may further include preset combination rules and preset calculation rules.
[0099] In some embodiments, the aforementioned preset protocol rules can further be protocol rules introduced and formed based on the MPC protocol. In this way, processing target data based on the aforementioned preset protocol rules can better protect the data privacy and security of the participating parties.
[0100] Among them, MPC (Secure Multi-Party Computation) is an algorithm that protects data privacy and security. Secure multi-party computation enables multiple data parties to collaborate on computations without leaking their own data.
[0101] In some embodiments, in specific implementations, in response to a target processing request, the first data party takes the encrypted data of the target model as input, and the second data party takes the encrypted data of the target data as input. The two parties cooperate to process the target data based on preset protocol rules, so as to output the target processing result about the target data.
[0102] In some embodiments, the target processing results can be different types of result data, depending on the application scenario and the target data. Specifically, the target processing results can be the transaction risk level of the target user, tomorrow's weather forecast, or the identified customer's shopping preferences, etc.
[0103] In some embodiments, the above-mentioned target data processing based on preset protocol rules may include the following in specific implementations:
[0104] S1: Based on the ciphertext data of the target data and the ciphertext data of the target model, calculate the point result vector of each non-leaf node; and concatenate the point result vectors of non-leaf nodes in the same model layer to obtain the layer result vector of the model layer.
[0105] S2: According to the preset grouping rules, the first type of model layer containing non-leaf nodes is divided into multiple model layer groups; wherein, the model layer group contains two adjacent model layers;
[0106] S3: Based on the preset calculation rules, the group result vector of each model layer group is calculated using the layer result vector of the model layer contained in each model layer group.
[0107] S4: Calculate the target processing result for the target data based on the group result vector of each model layer group and the weight vector of the second type model layer where the leaf node is located.
[0108] In some embodiments, the above-mentioned calculation of the point result vector of each non-leaf node based on the ciphertext data of the target data and the ciphertext data of the target model may specifically include: calculating the point result vector of the current non-leaf node in the following manner:
[0109] S1: Perform a dot product between the ciphertext data of the target data and the ciphertext data of the feature selection vector at the current non-leaf node to obtain the ciphertext data of the intermediate result at the current non-leaf node.
[0110] S2: Compare the encrypted data of the intermediate results at the current non-leaf node with the encrypted data of the feature threshold at the current non-leaf node to obtain the point result vector of the current non-leaf node.
[0111] In some embodiments, the ciphertext data of the intermediate result at the current non-leaf node can specifically be the ciphertext data of the feature value corresponding to the current node in the target data.
[0112] For example, the ciphertext data of the intermediate result at the current non-leaf node (e.g., model layer j) can be calculated using the following formula: k i,j =X T *e i,j .
[0113] In some embodiments, the encrypted data of the intermediate result at the current non-leaf node can be compared with the encrypted data of the feature threshold at the current non-leaf node in an encrypted state to obtain the corresponding comparison result; based on the comparison result, the point result vector of the current non-leaf node can be determined.
[0114] Specifically, based on the comparison results, if the encrypted data of the intermediate result at the current non-leaf node is less than the encrypted data of the feature threshold at the current non-leaf node, the point result vector of the current non-leaf node is recorded as (1,0). Conversely, if the encrypted data of the intermediate result at the current non-leaf node is greater than or equal to the encrypted data of the feature threshold at the current non-leaf node, the point result vector of the current non-leaf node is recorded as (0,1).
[0115] Using the above method, the node result vectors of each non-leaf node can be calculated separately.
[0116] In some embodiments, when calculating the layer result vector of a specific model layer, the point result vectors of non-leaf nodes in the same model layer can be concatenated in ascending order of node number to obtain the layer result vector of the corresponding model layer.
[0117] Specifically, for example, participation Figure 2 As shown, the 3-model layer contains 2 3= There are 8 non-leaf nodes, namely the non-leaf node numbered 1 in the 3-model layer (abbreviated as node (3,1)), the non-leaf node numbered 2 in the 3-model layer (abbreviated as node (3,2)), the non-leaf node numbered 3 in the 3-model layer (abbreviated as node (3,3)), the non-leaf node numbered 4 in the 3-model layer (abbreviated as node (3,4)), the non-leaf node numbered 5 in the 3-model layer (abbreviated as node (3,5)), the non-leaf node numbered 6 in the 3-model layer (abbreviated as node (3,6)), the non-leaf node numbered 7 in the 3-model layer (abbreviated as node (3,7)), and the non-leaf node numbered 7 in the 3-model layer (abbreviated as node (3,7)). The point result vector of node (3,1) is (1,0), the point result vector of node (3,2) is (1,0), the point result vector of node (3,3) is (0,1), the point result vector of node (3,4) is (0,1), the point result vector of node (3,5) is (0,1), the point result vector of node (3,6) is (0,1), the point result vector of node (3,7) is (1,0), and the point result vector of node (3,8) is (0,1).
[0118] By concatenating the point result vectors of the above 8 nodes in ascending order of their numbers, we can obtain the layer result vector of the 3 model layers, denoted as a3=(1,0,1,0,0,1,0,1,0,1,0,1,1,0,0,1).
[0119] In a similar manner, the layer result vectors of each model layer in the first type of model layer can be calculated.
[0120] In some embodiments, the above-mentioned division of the first type of model layer containing non-leaf nodes into multiple model layer groups according to preset grouping rules may include the following: detecting whether the number of layers of the first type of model layer in the target model is even; if it is determined that the number of layers of the first type of model layer in the target model is even, dividing the adjacent odd-numbered model layers and even-numbered model layers in the first type of model layer into a model layer group in order of increasing depth; wherein, in the same model layer group, the depth corresponding to the odd-numbered model layer is greater than the depth corresponding to the even-numbered model layer.
[0121] In some embodiments, after detecting whether the number of layers in the first type of model layer in the target model is even, the method may further include the following: if it is determined that the number of layers in the first type of model layer in the target model is odd, the adjacent odd-numbered model layers and even-numbered model layers in the first type of model layer are grouped into a model layer group according to the order of their corresponding depths from smallest to largest; and the remaining model layer in the first type of model layer is grouped into a model layer group. Accordingly, when calculating the group result vector of each model layer group, the layer result vector of the model layer in the model layer group containing only one model layer can be determined as the group result vector of that model layer group.
[0122] Specifically, for example, see Figure 3 As shown, the first type of model layer has 4 layers, which is an even number. Therefore, according to the preset grouping rules, the 4 model layers contained in the first type of model layer can be divided into two model layer groups: model layer group 1 and model layer group 2. Model layer group 1 contains adjacent 0 model layers (even-numbered model layers) and 1 model layers (odd-numbered model layers). In this model layer group, the depth 1 corresponding to the 1 model layer is greater than the depth 0 corresponding to the 0 model layer; correspondingly, the number of elements in the layer result vector of the 1 model layer is twice that of the 0 model layer. Model layer group 2 contains adjacent 2 model layers and 3 model layers. In this model layer group, the depth 3 corresponding to the 3 model layer is greater than the depth 2 corresponding to the 2 model layer; correspondingly, the number of elements in the layer result vector of the 3 model layer is twice that of the 2 model layer.
[0123] For example, see Figure 4 As shown, the first type of model layer has 3 layers, which is an odd number. Therefore, according to the preset grouping rules, the 3 model layers contained in the first type of model layer can be divided into two model layer groups: model layer group 1 and model layer group 2. Model layer group 1 contains two adjacent model layers: a 0 model layer and a 1 model layer. Model layer group 2 contains only the remaining 2 model layers.
[0124] In some embodiments, the above-mentioned calculation of the group result vector of each model layer group is performed according to a preset calculation rule using the layer result vector of the model layer contained in each model layer group. In specific implementation, this may include the following: calculating the group result vector of the current model layer group in the following manner:
[0125] S1: Expand the layer result vector of the even-numbered model layer in the current model layer group to obtain the expanded layer result vector of the even-numbered model layer in the current model layer group.
[0126] S2: Multiply the elements with the same data position in the expanded layer result vector of the even-numbered model layer in the current model layer group and the layer result vector of the odd-numbered model layer in the current model layer group to obtain the group result vector of the current model layer group.
[0127] In some embodiments, when performing the expansion process, each element in the layer result vector of the even-numbered model layer can be copied and expanded sequentially to obtain the expanded layer result vector.
[0128] For details, please refer to Figure 3 As shown, for example, when expanding the layer result vector a0 = (1,0) of model 0 in model layer group 1, each element in a0 can be copied sequentially to obtain the expanded layer result vector b0 = (1,1,0,0).
[0129] For example, when expanding the layer result vector a2 = (1,0,1,0,1,0,1,0,1,0) of the 2nd model layer group 2, each element in a2 can be copied sequentially to obtain the expanded layer result vector b2 = (1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0).
[0130] Through the above expansion process, the number of elements contained in the expanded layer result vector of the even-numbered model layer in the same model layer group can be consistent with the number of elements in the layer result vector of the odd-numbered model layer, so as to perform subsequent calculations of the group result vector.
[0131] In some embodiments, when specifically calculating the group result vector of a model layer group, the expanded layer result vector of the even-numbered model layers and the layer result vector of the odd-numbered model layers in the same model layer group can be used to perform an element-wise product operation to obtain the group result vector of the model layer group. Specifically, the element-wise product operation refers to the operation of multiplying the elements with the same data bits in the two vectors.
[0132] For details, please refer to Figure 3 As shown, taking the calculation of the group result vector of model layer group 1 as an example, the layer result vector b0=(1,1,0,0) after the expansion of model layer 0 can be multiplied by the elements of the same data position in the layer result vector a1=(0,1,0,1) (which can also be written as b1) of model layer 1 respectively, and the corresponding vector c0=(0,0,0,0) is obtained as the group result vector of model layer group 1.
[0133] Using the above method, the group result vector of each model layer group in multiple model layer groups can be calculated.
[0134] In some embodiments, the target processing result for the target data is calculated based on the group result vector of each model layer group and the weight vector of the second type of model layer where the leaf node is located. In specific implementations, this may include the following:
[0135] S1: According to the preset grouping rules, the group result vectors of multiple model layer groups are divided into multiple data groups; wherein, the data group contains the group result vectors of two adjacent model layer groups;
[0136] S2: Calculate the result vector for each data group according to the preset calculation rules;
[0137] S3: Calculate the result vector of the first type of model layer based on the result vector of each data group;
[0138] S4: Perform a dot product between the result vector of the first type of model layer and the weight vector of the second type of model layer to obtain the target processing result.
[0139] In some embodiments, specifically for cases where the target model has a relatively simple structure, please refer to... Figure 3 As shown, the first type of model layer of the target model contains only 4 model layers. After performing the first grouping according to the preset combination rules and calculating the group result vectors of each model layer group according to the preset calculation rules, only two model layer group group result vectors remain. Therefore, there is no need to further divide the data groups. We can directly expand the group result vector c0 of model layer group 1 according to the preset calculation rules to obtain the expanded group result vector d0. The number of elements contained in c0 is the same as that in the group result vector c1 of model layer group 2. Then, we multiply the elements with the same data position in d0 and c1 to obtain a vector as the result vector of the first type of model layer, which can be denoted as r.
[0140] In some embodiments, for cases where the target model has a relatively complex structure, please refer to... Figure 5 As shown, the first type of model layer of the target model contains 8 model layers. The 8 circles in the first row represent the layer result vectors of the 8 model layers. Furthermore, from right to left, the depths of the 8 model layers are 0, 1, 2, 3, 4, 5, 6, and 7, respectively.
[0141] In practice, the model layer groups can be initially divided into four groups based on preset grouping rules. Each model layer group consists of two adjacent model layers. Then, the group vectors for the four model layer groups are calculated according to preset calculation rules.
[0142] Next, according to the preset grouping rules, a second grouping can be performed, dividing the above four model layer groups into two data groups. Each data group includes two adjacent model layer groups. Then, according to the preset calculation rules, the group vectors for the corresponding two data groups are calculated.
[0143] Next, based on the preset calculation rules, the final result vector r of the first type of model layer can be calculated using the group vectors of the two data sets mentioned above.
[0144] For cases where the target model has a more complex structure, please refer to [reference needed]. Figure 5 In one embodiment, each group is repeatedly processed multiple times according to a preset grouping rule; and after each grouping, the result vector of the corresponding group is calculated using the two adjacent result vectors contained in each group according to a preset calculation rule. The above process is repeated until the result vector r of the first type of model layer is obtained.
[0145] In practice, for cases where the model structure of the target model is relatively complex, a recursive algorithm can be used to quickly calculate the result vector r of the first type of model layer by performing multiple groupings and calculations.
[0146] In some embodiments, the weight vector of the second type of model layer can specifically be a vector obtained by concatenating the preset weight values at each leaf node of the second type layer in ascending order of their numbers.
[0147] Specifically, for example, see Figure 3 As shown, the weight vector of the second type of model layer can be expressed as: w = (w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15, w16).
[0148] In some embodiments, when implementing a specific method, the result vector of the first type of model layer and the weight vector of the second type of model layer can be multiplied by the following formula to obtain the corresponding value res as the target processing result: in, This indicates the inner product operation.
[0149] Through the above target data processing, the corresponding target processing result can be output and obtained. Specifically, the target processing result can also be encrypted data.
[0150] In some embodiments, before processing the target data, the method may further include the following: according to preset encryption rules, the feature selection vector and feature threshold at each non-leaf node in the target model, as well as the preset weight value at each leaf node, are encrypted to obtain the ciphertext data of the target model.
[0151] In some embodiments, the preset encryption rules may specifically include encryption rules based on secret sharing.
[0152] Specifically, the aforementioned Secret Sharing (SS) algorithm can be an algorithm for protecting data privacy and security. Based on the Secret Sharing algorithm, multiple data parties can collaborate on calculations and share secret information without leaking their own data; correspondingly, each data party can obtain a fragment of the secret information.
[0153] Correspondingly, the second data party can encrypt the target data it holds according to preset encryption rules to obtain the ciphertext data of the target data.
[0154] In some embodiments, the preset encryption rule used may also be an encryption rule based on other encryption algorithms. For example, it may be an encryption rule based on the symmetric encryption algorithm (Data Encryption Standard, DES), an encryption rule based on the elliptic curve encryption algorithm, an encryption rule based on the hash algorithm, and so on.
[0155] In some embodiments, the target model may specifically include a user's transaction risk prediction model; the target data may specifically include the transaction characteristic data of the target user; and correspondingly, the target processing result of the target data may specifically include: encrypted data of the target user's transaction risk level.
[0156] In some embodiments, prior to processing the target data, the method may further include the following:
[0157] S1: Detect whether the target model is a complete binary tree model;
[0158] S2: If the target model is determined to be a non-complete binary tree model, the target model is completed to obtain an improved target model.
[0159] Through the above completion process, the target model can be transformed from the original incomplete binary tree model into a complete binary tree structure model, resulting in an improved target model. This improved target model can then replace the original target model in subsequent data processing.
[0160] As can be seen from the above, based on the data processing method provided in the embodiments of this specification, a first data party holding the encrypted data of a target model containing a tree model with multiple model layers and a second data party holding the encrypted data of the target data to be processed can respond to a target processing request and, respectively, use the encrypted data of the target model and the encrypted data of the target data as input, and cooperate to process the target data based on preset protocol rules including model layer combination calculation rules. This effectively reduces the complexity of the processing process while protecting the data privacy of the participating parties, efficiently utilizes the target model to process the target data, and obtains the target processing result regarding the target data.
[0161] See Figure 6 As shown in the embodiments of this specification, another data processing method is also provided. This method is specifically applied to the second data party. In practice, it may include the following:
[0162] S601: Initiate a target processing request.
[0163] S602: Using the encrypted data of the target data as input, and cooperating with the first data party using the encrypted data of the target model as input, target data processing is performed based on preset protocol rules to obtain target processing results for the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0164] In some embodiments, before processing the target data, the method may further include the following: encrypting multiple feature values contained in the target data according to preset encryption rules to obtain ciphertext data of the target data.
[0165] In some embodiments, the preset encryption rules include encryption rules based on secret sharing.
[0166] In some embodiments, the target model may specifically include a user's transaction risk prediction model; the target data may specifically include the transaction characteristic data of the target user; and correspondingly, the target processing result of the target data may specifically include: encrypted data of the target user's transaction risk level.
[0167] In some embodiments, after obtaining the target processing result regarding the target data, the method may further include the following:
[0168] S1: Receive the target processing result;
[0169] S2: Decrypt the target processing result according to the preset encryption rules to obtain the target user's transaction risk level;
[0170] S3: Provide matching services to target users based on their transaction risk level.
[0171] Depending on the application scenario, the second data provider can also perform different types of data processing based on the target processing results. For example, in a shopping guidance scenario, the second data provider can search for products that match the target customer's shopping preferences based on the shopping preferences obtained from decrypting the target processing results, and then recommend these target products to the target customer to increase the conversion rate.
[0172] See Figure 7 As shown, for more complex data processing scenarios, this specification also provides another data processing method. Specifically, this method can be applied to a first data party. The target model is jointly held and managed by the first data party and a third data party. The first data party holds the encrypted data of the first fragment of the target model; the second data party holds the encrypted data of the second fragment of the target model; the first and second data parties need to simultaneously use their respective first and second fragments of the target model to obtain the complete target model; the target model can specifically be a tree model containing multiple model layers. In specific implementation, this method may include the following:
[0173] S701: Receive target processing request.
[0174] S702: In response to the target processing request, using the encrypted data of the first segment of the target model as input, and cooperating with the second data party using the encrypted data of the target data as input and the third data party using the encrypted data of the second segment of the target model as input, to perform target data processing based on preset protocol rules to obtain the target processing result of the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0175] For more complex data processing scenarios, such as those where multiple first-type data parties each hold a ciphertext fragment of the target model, and multiple second-type data parties each hold a ciphertext fragment of the target data to be processed, a complete data interaction system is formed. In this scenario, the multiple first-type data parties and multiple second-type data parties need to simultaneously combine their respective fragments of the target model to obtain the complete target model. Similarly, the multiple second-type data parties need to simultaneously combine their respective fragments of the target data to obtain the complete target data.
[0176] In practice, any one of the multiple second-class data parties or multiple first-class data parties (which can be referred to as the initiator) initiates the target processing request.
[0177] Multiple second-type data parties and multiple first-type data parties can respond to the target processing request, each using encrypted fragments of the target data and encrypted fragments of the target model as input, and cooperate to process the target data based on preset protocol rules to obtain the target processing result. The preset protocol rules include model-layer combination calculation rules.
[0178] For example, there is a scenario where each data party in a dataset holds a ciphertext fragment of the target data and / or a ciphertext fragment of the target model.
[0179] In practice, any one of the aforementioned data parties (which can be referred to as the initiator) initiates the target processing request.
[0180] Multiple data parties can respond to the target processing request, each using encrypted data of a fragment of the target data and / or encrypted data of a fragment of the target model as input, and cooperate to process the target data based on preset protocol rules to obtain a target processing result regarding the target data. The preset protocol rules include model layer combination calculation rules. This specification also provides a data processing method applied to multiple first data parties and multiple second data parties. Each of the first data parties holds encrypted data of a fragment of the target model, and each of the second data parties holds encrypted data of a fragment of the target data. The target model is a tree model containing multiple model layers. In specific implementation, the method may include the following: responding to the target processing request, the multiple first data parties and multiple second data parties respectively use encrypted data of their respective fragments of the target model and encrypted data of the target data as input, and cooperate to process the target data based on preset protocol rules to obtain a target processing result regarding the target data; wherein the preset protocol rules include model layer combination calculation rules.
[0181] Through the above embodiments, the complexity of the processing can be effectively reduced while protecting the data privacy of multiple participants, and the target model can be efficiently used to process the target data to obtain the target processing results.
[0182] This specification also provides a server, including a processor and a memory for storing processor-executable instructions. In a specific implementation, the processor can perform the following steps according to the instructions: receiving a target processing request; responding to the target processing request, using encrypted data of the target model as input, cooperating with a second data party using encrypted data of the target data as input, and processing the target data based on preset protocol rules to obtain a target processing result regarding the target data; wherein the preset protocol rules include model-layer combination calculation rules.
[0183] To execute the above instructions more accurately, please refer to... Figure 8 As shown in the embodiments of this specification, another specific server is also provided, wherein the server includes a network communication port 801, a processor 802, and a memory 803. The above structures are connected by internal cables so that the various structures can perform specific data interaction.
[0184] Specifically, the network communication port 801 can be used to receive target processing requests.
[0185] The processor 802 can specifically be used to respond to the target processing request, take the encrypted data of the target model as input, cooperate with a second data party that takes the encrypted data of the target data as input, and perform target data processing based on preset protocol rules to obtain the target processing result about the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0186] The memory 803 can specifically store corresponding instruction programs.
[0187] In this embodiment, the network communication port 801 can be a virtual port bound to different communication protocols, thereby enabling the sending or receiving of different data. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. Furthermore, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM or CDMA; it can also be a Wi-Fi chip; or it can be a Bluetooth chip.
[0188] In this embodiment, the processor 802 can be implemented in any suitable manner. For example, the processor can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers, etc. This specification is not limiting.
[0189] In this embodiment, the memory 803 may include multiple layers. In a digital system, anything that can store binary data can be a memory. In an integrated circuit, a circuit with storage function but no physical form is also called a memory, such as RAM, FIFO, etc. In a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.
[0190] This specification also provides a server, including a processor and a memory for storing processor-executable instructions. In a specific implementation, the processor can perform the following steps according to the instructions: initiating a target processing request; taking the encrypted data of the target data as input, cooperating with a first data party that takes the encrypted data of the target model as input, and performing target data processing based on preset protocol rules to obtain a target processing result for the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0191] This specification also provides a server, including a processor and a memory for storing processor-executable instructions. In a specific implementation, the processor can perform the following steps according to the instructions: receiving a target processing request; responding to the target processing request, using encrypted data of the first segment of the target model as input, cooperating with a second data party using encrypted data of the target data as input, and a third data party using encrypted data of the second segment of the target model as input, to perform target data processing based on preset protocol rules to obtain a target processing result regarding the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0192] This specification also provides a computer storage medium based on the above data processing method. The computer storage medium stores computer program instructions, which, when executed, implement: receiving a target processing request; responding to the target processing request, cooperating with a second data party that takes the encrypted data of the target model as input and takes the encrypted data of the target data as input, to perform target data processing based on preset protocol rules to obtain a target processing result for the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0193] This specification also provides a computer storage medium based on the above data processing method. The computer storage medium stores computer program instructions, which, when executed, implement: initiating a target processing request; using the encrypted data of the target data as input, cooperating with a first data party using the encrypted data of the target model as input, and performing target data processing based on preset protocol rules to obtain a target processing result for the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0194] This specification also provides a computer storage medium based on the above data processing method. The computer storage medium stores computer program instructions, which, when executed, implement: receiving a target processing request; responding to the target processing request, using the encrypted data of the first segment of the target model as input, cooperating with a second data party using the encrypted data of the target data as input, and a third data party using the encrypted data of the second segment of the target model as input, to perform target data processing based on preset protocol rules to obtain a target processing result for the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0195] In this embodiment, the storage medium includes, but is not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), cache, hard disk drive (HDD), or memory card. The memory can be used to store computer program instructions. The network communication unit can be an interface configured according to standards specified in the communication protocol for network connection communication.
[0196] In this embodiment, the specific functions and effects implemented by the program instructions stored in the computer storage medium can be explained in comparison with other implementation methods, and will not be repeated here.
[0197] See Figure 9 As shown, at the software level, this specification also provides a data processing apparatus for a first data provider. This apparatus may specifically include the following structural modules:
[0198] The receiving module 901 can be specifically used to receive target processing requests;
[0199] The processing module 902 can be specifically used to respond to the target processing request, take the encrypted data of the target model as input, and cooperate with a second data party that takes the encrypted data of the target data as input, based on preset protocol rules, to process the target data and obtain the target processing result about the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0200] This specification also provides another data processing apparatus, employing a second data party that holds encrypted target data to be processed; comprising: an initiation module, specifically used to initiate a target processing request; and a processing module, specifically used to cooperate with a first data party that takes the encrypted target data as input and takes the encrypted target model as input, to process the target data based on preset protocol rules to obtain a target processing result for the target data; wherein the preset protocol rules include model layer combination calculation rules.
[0201] This specification also provides another data processing apparatus, applied to a first data party, which holds encrypted data of a first fragment of a target model; the target model is a tree model containing multiple model layers; the method includes: a receiving module, specifically used to receive a target processing request; and a processing module, specifically used to respond to the target processing request, taking the encrypted data of the first fragment of the target model as input, cooperating with a second data party taking the encrypted data of the target data as input, and a third data party taking the encrypted data of the second fragment of the target model as input, to perform target data processing based on preset protocol rules to obtain a target processing result for the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0202] It should be noted that the units, devices, or modules described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. For ease of description, the above devices are described by dividing them into various modules according to their functions. Of course, in implementing this specification, the functions of each module can be implemented in one or more software and / or hardware, or the module that implements the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection between the devices or units shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0203] As can be seen from the above, the data processing apparatus provided in the embodiments of this specification can effectively reduce the complexity of the processing process and efficiently utilize the target model to process the target data, thereby obtaining the target processing result for the target data, while protecting the data privacy of the participants.
[0204] In a specific scenario example, the data processing method provided in the embodiments of this specification can be applied to a system that includes a first server and a second server. For details, please refer to... Figure 10 As shown in the diagram. The first and second servers can be connected via wired or wireless means to exchange data.
[0205] Specifically, the first server mentioned above can be a server deployed on the side of the first data provider, and the first server can hold the encrypted data of the target model. The target model can specifically be a tree model containing multiple model layers.
[0206] The aforementioned second server can be a server deployed on the side of the second data provider, and the second server can hold the encrypted data of the target data to be processed.
[0207] In this embodiment, the first server and the second server may specifically include a backend server capable of data transmission, data processing, and other functions. Specifically, the first server and the second server may be, for example, an electronic device with data processing, storage, and network interaction capabilities. Alternatively, the first server and the second server may also be software programs running on the electronic device that provide support for data processing, storage, and network interaction. In this embodiment, the number of servers included in the first server and the second server is not specifically limited. The first server and the second server may be a single server, several servers, or a server cluster formed by several servers.
[0208] In practice, when the second server needs to process target data, it can send a target processing request to the system.
[0209] The first server and the second server can respond to the target processing request, and use the encrypted data of the target model and the encrypted data of the target data held by each server as input, respectively, and cooperate to process the target data according to the preset protocol rules, and output the target processing result of the target data; wherein, the preset protocol rules include model layer combination calculation rules.
[0210] According to the preset permission rules, the second server obtains the processing result of the target.
[0211] The second server decrypts the target processing result according to a preset encryption rule, obtaining the plaintext data of the target processing result. The preset encryption rule includes a secret-sharing-based encryption rule.
[0212] While this specification provides the steps of operation for the methods described in the embodiments or flowcharts, more or fewer steps may be included based on conventional or non-inventive means. The order of steps listed in the embodiments is merely one possible order of execution among many steps and does not represent the only possible order. In actual device or client product execution, the methods shown in the embodiments or drawings may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, the presence of other identical or equivalent elements in a process, method, product, or apparatus that includes said elements is not excluded. The terms "first," "second," etc., are used to denote names and do not indicate any particular order.
[0213] Those skilled in the art will also know that, besides implementing the controller using purely computer-readable program code, the same functions can be achieved by logically programming the method steps, making the controller function as logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers (PLCs), and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the devices within it used to implement various functions can also be considered structures within that hardware component. Alternatively, the devices used to implement various functions can be considered as both software modules implementing the method and structures within a hardware component.
[0214] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0215] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this specification can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions of this specification can essentially be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, mobile terminal, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments of this specification.
[0216] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. This specification can be used in numerous general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices, etc.
[0217] Although this specification has been described by way of examples, those skilled in the art will recognize that many variations and modifications are possible without departing from the spirit of this specification, and it is intended that the appended claims cover such variations and modifications without departing from the spirit of this specification.
Claims
1. A data processing method, applied to a first data source, characterized in that, The first data provider holds the encrypted data of the target model; The target model is a tree model containing multiple model layers, and the method includes: Receive the target processing request; In response to the target processing request, the target data is processed by cooperating with a second data party that takes the encrypted data of the target model as input and the encrypted data of the target data as input, based on preset protocol rules, to obtain the target processing result of the target data; wherein, the preset protocol rules include model layer combination calculation rules. The process, based on preset protocol rules, involves processing the target data, including: calculating the point result vectors of each non-leaf node based on the encrypted data of the target data and the encrypted data of the target model; concatenating the point result vectors of non-leaf nodes within the same model layer to obtain the layer result vector of the model layer; dividing the first type of model layer containing non-leaf nodes into multiple model layer groups according to preset grouping rules; wherein each model layer group contains two adjacent model layers; calculating the group result vector of each model layer group using the layer result vectors of the model layers contained in each model layer group according to preset calculation rules; and calculating the group result vector of each model layer group based on the layer result vectors of the model layers contained in each model layer group. The target processing result for the target data is calculated using the group result vector and the weight vector of the second type of model layer where the leaf node is located. Specifically, the group result vector of the current model layer group is calculated as follows: the layer result vector of the even-numbered model layer in the current model layer group is expanded to obtain the expanded layer result vector of the even-numbered model layer in the current model layer group; the elements with the same data position in the expanded layer result vector of the even-numbered model layer in the current model layer group and the layer result vector of the odd-numbered model layer in the current model layer group are multiplied together to obtain the group result vector of the current model layer group.
2. The method according to claim 1, characterized in that, According to the preset grouping rules, the first type of model layer containing non-leaf nodes is divided into multiple model layer groups, including: Detect whether the number of layers in the first type of model in the target model is even; If the number of layers in the first type of model layer in the target model is even, the adjacent odd-numbered model layers and even-numbered model layers in the first type of model layer are divided into a model layer group according to the order of their corresponding depths from smallest to largest; wherein, in the same model layer group, the depth corresponding to the odd-numbered model layer is greater than the depth corresponding to the even-numbered model layer.
3. The method according to claim 2, characterized in that, After detecting whether the number of layers in the first type of model layer in the target model is even, the method further includes: If the number of layers in the first type of model layer in the target model is determined to be odd, then the adjacent odd-numbered model layers and even-numbered model layers in the first type of model layer are divided into a model layer group in order of increasing depth; and the remaining model layer in the first type of model layer is divided into a model layer group.
4. The method according to claim 1, characterized in that, Based on the group result vectors of each model layer group and the weight vectors of the second type of model layer where the leaf nodes are located, the target processing results for the target data are calculated, including: According to the preset grouping rules, the group result vectors of multiple model layer groups are divided into multiple data groups; wherein, each data group contains the group result vectors of two adjacent model layer groups. According to the preset calculation rules, the result vector of each data group is calculated; Based on the result vectors of each data group, the result vector of the first type of model layer is calculated; The result vector of the first type of model layer is multiplied by the weight vector of the second type of model layer to obtain the target processing result.
5. The method according to claim 1, characterized in that, Before performing target data processing, the method further includes: According to the preset encryption rules, the feature selection vectors and feature thresholds at each non-leaf node in the target model, as well as the preset weight values at each leaf node, are encrypted to obtain the ciphertext data of the target model.
6. The method according to claim 5, characterized in that, The preset encryption rules include encryption rules based on secret sharing.
7. The method according to claim 6, characterized in that, The target model includes a user's transaction risk prediction model; the target data includes the transaction characteristic data of the target user. Accordingly, the target processing results for the target data include: encrypted data of the target user's transaction risk level.
8. The method according to claim 1, characterized in that, Before performing target data processing, the method further includes: Detect whether the target model is a complete binary tree model; If the target model is determined to be an incomplete binary tree model, the target model is completed to obtain an improved target model.
9. A data processing method applied to a second data party, characterized in that, The second data party holds the encrypted target data to be processed, and the method includes: Initiate a target processing request; Using the encrypted data of the target data as input, and cooperating with a first data party that uses the encrypted data of the target model as input, target data processing is performed based on preset protocol rules to obtain target processing results for the target data; wherein, the preset protocol rules include model layer combination calculation rules; The process, based on preset protocol rules, involves processing the target data, including: calculating the point result vectors of each non-leaf node based on the encrypted data of the target data and the encrypted data of the target model; concatenating the point result vectors of non-leaf nodes within the same model layer to obtain the layer result vector of the model layer; dividing the first type of model layer containing non-leaf nodes into multiple model layer groups according to preset grouping rules; wherein each model layer group contains two adjacent model layers; calculating the group result vector of each model layer group using the layer result vectors of the model layers contained in each model layer group according to preset calculation rules; and calculating the group result vector of each model layer group based on the layer result vectors of the model layers contained in each model layer group. The target processing result for the target data is calculated using the group result vector and the weight vector of the second type of model layer where the leaf node is located. Specifically, the group result vector of the current model layer group is calculated as follows: the layer result vector of the even-numbered model layer in the current model layer group is expanded to obtain the expanded layer result vector of the even-numbered model layer in the current model layer group; the elements with the same data position in the expanded layer result vector of the even-numbered model layer in the current model layer group and the layer result vector of the odd-numbered model layer in the current model layer group are multiplied together to obtain the group result vector of the current model layer group.
10. The method according to claim 9, characterized in that, Before performing target data processing, the method further includes: According to the preset encryption rules, the multiple feature values contained in the target data are encrypted separately to obtain the ciphertext data of the target data.
11. The method according to claim 10, characterized in that, The preset encryption rules include encryption rules based on secret sharing.
12. The method according to claim 11, characterized in that, The target model includes a user's transaction risk prediction model; the target data includes the transaction characteristic data of the target user. Accordingly, the target processing results for the target data include: encrypted data of the target user's transaction risk level.
13. The method according to claim 12, characterized in that, After obtaining the target processing results for the target data, the method further includes: Receive the target processing result; According to the preset encryption rules, the target processing result is decrypted to obtain the target user's transaction risk level; Based on the target user's transaction risk level, provide matching services to the target user.
14. A data processing method, applied to a first data source, characterized in that, The first data provider holds the encrypted data of the first segment of the target model; The target model is a tree model containing multiple model layers, and the method includes: Receive the target processing request; In response to the target processing request, the encrypted data of the first segment of the target model is used as input, and the target data is processed in cooperation with the second data party (which uses the encrypted data of the target data as input) and the third data party (which uses the encrypted data of the second segment of the target model as input) based on preset protocol rules to obtain the target processing result of the target data; wherein, the preset protocol rules include model layer combination calculation rules. The process, based on preset protocol rules, involves processing the target data, including: calculating the point result vectors of each non-leaf node based on the encrypted data of the target data and the encrypted data of the target model; concatenating the point result vectors of non-leaf nodes within the same model layer to obtain the layer result vector of the model layer; dividing the first type of model layer containing non-leaf nodes into multiple model layer groups according to preset grouping rules; wherein each model layer group contains two adjacent model layers; calculating the group result vector of each model layer group using the layer result vectors of the model layers contained in each model layer group according to preset calculation rules; and calculating the group result vector of each model layer group based on the layer result vectors of the model layers contained in each model layer group. The target processing result for the target data is calculated using the group result vector and the weight vector of the second type of model layer where the leaf node is located. Specifically, the group result vector of the current model layer group is calculated as follows: the layer result vector of the even-numbered model layer in the current model layer group is expanded to obtain the expanded layer result vector of the even-numbered model layer in the current model layer group; the elements with the same data position in the expanded layer result vector of the even-numbered model layer in the current model layer group and the layer result vector of the odd-numbered model layer in the current model layer group are multiplied together to obtain the group result vector of the current model layer group.
15. A data processing method, characterized in that, The method is applied to multiple first data parties and multiple second data parties, wherein each of the first data parties holds a ciphertext data of a fragment of the target model, and each of the second data parties holds a ciphertext data of a fragment of the target model, wherein the target model is a tree model containing multiple model layers. The method includes: In response to the target processing request, multiple first data parties and multiple second data parties respectively use the encrypted data of the target model fragments and the encrypted data of the target data fragments as input, and cooperate to process the target data based on preset protocol rules to obtain the target processing result about the target data; wherein, the preset protocol rules include model layer combination calculation rules; The process, based on preset protocol rules, involves collaborative processing of target data, including: calculating the point result vectors of each non-leaf node based on the encrypted data of the target data and the encrypted data of the target model; concatenating the point result vectors of non-leaf nodes within the same model layer to obtain the layer result vector of the model layer; dividing the first type of model layer containing non-leaf nodes into multiple model layer groups according to preset grouping rules; wherein each model layer group contains two adjacent model layers; calculating the group result vector of each model layer group using the layer result vectors of the model layers contained in each model layer group according to preset calculation rules; and calculating the group result vector of each model layer group based on the layer result vectors of each model layer group. The group result vector of the group and the weight vector of the second type of model layer where the leaf node is located are used to calculate the target processing result for the target data; and, specifically, the group result vector of the current model layer group in the group result vector of each model layer group is calculated as follows: the layer result vector of the even-numbered model layer in the current model layer group is expanded to obtain the expanded layer result vector of the even-numbered model layer in the current model layer group; the elements with the same data position in the expanded layer result vector of the even-numbered model layer in the current model layer group and the layer result vector of the odd-numbered model layer in the current model layer group are multiplied to obtain the group result vector of the current model layer group.
16. A data processing apparatus, applied to a first data source, characterized in that, The first data provider holds the encrypted data of the target model; The target model is a tree model containing multiple model layers; including: The receiving module is used to receive target processing requests; The processing module is used to respond to the target processing request, take the encrypted data of the target model as input, cooperate with a second data party that takes the encrypted data of the target data as input, and perform target data processing based on preset protocol rules to obtain the target processing result about the target data; wherein, the preset protocol rules include model layer combination calculation rules; Specifically, the processing module is used to calculate the point result vector of each non-leaf node based on the encrypted data of the target data and the encrypted data of the target model; and to concatenate the point result vectors of non-leaf nodes in the same model layer to obtain the layer result vector of the model layer; according to a preset grouping rule, the first type of model layer containing the non-leaf nodes is divided into multiple model layer groups; wherein each model layer group contains two adjacent model layers; according to a preset calculation rule, using the layer result vectors of the model layers contained in each model layer group, the group result vector of each model layer group is calculated; and based on the group result vector of each model layer group... The target processing result for the target data is calculated using the weight vector of the second type of model layer where the leaf node is located; and the group result vector of the current model layer group is calculated in the following way: the layer result vector of the even-numbered model layer in the current model layer group is expanded to obtain the expanded layer result vector of the even-numbered model layer in the current model layer group; the elements with the same data position in the expanded layer result vector of the even-numbered model layer in the current model layer group and the layer result vector of the odd-numbered model layer in the current model layer group are multiplied to obtain the group result vector of the current model layer group.
17. A data processing apparatus, applied to a second data source, characterized in that, The second data party holds the encrypted data of the target data to be processed; including: The initiation module is used to initiate target processing requests; The processing module is used to take the encrypted data of the target data as input, cooperate with the first data party taking the encrypted data of the target model as input, and perform target data processing based on preset protocol rules to obtain the target processing result about the target data; wherein, the preset protocol rules include model layer combination calculation rules; The process, based on preset protocol rules, involves processing the target data, including: calculating the point result vectors of each non-leaf node based on the encrypted data of the target data and the encrypted data of the target model; concatenating the point result vectors of non-leaf nodes within the same model layer to obtain the layer result vector of the model layer; dividing the first type of model layer containing non-leaf nodes into multiple model layer groups according to preset grouping rules; wherein each model layer group contains two adjacent model layers; calculating the group result vector of each model layer group using the layer result vectors of the model layers contained in each model layer group according to preset calculation rules; and calculating the group result vector of each model layer group based on the layer result vectors of the model layers contained in each model layer group. The target processing result for the target data is calculated using the group result vector and the weight vector of the second type of model layer where the leaf node is located. Specifically, the group result vector of the current model layer group is calculated as follows: the layer result vector of the even-numbered model layer in the current model layer group is expanded to obtain the expanded layer result vector of the even-numbered model layer in the current model layer group; the elements with the same data position in the expanded layer result vector of the even-numbered model layer in the current model layer group and the layer result vector of the odd-numbered model layer in the current model layer group are multiplied together to obtain the group result vector of the current model layer group.
18. A server, characterized in that, It includes a processor and a memory for storing processor-executable instructions, wherein the processor, when executing the instructions, implements the steps of the method according to any one of claims 1 to 15.
19. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed, implement the steps of the method according to any one of claims 1 to 15.