CN113902443A - Data processing method and device and server - Google Patents

Data processing method and device and server Download PDF

Info

Publication number
CN113902443A
CN113902443A CN202111219196.XA CN202111219196A CN113902443A CN 113902443 A CN113902443 A CN 113902443A CN 202111219196 A CN202111219196 A CN 202111219196A CN 113902443 A CN113902443 A CN 113902443A
Authority
CN
China
Prior art keywords
target
data
model
layer
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111219196.XA
Other languages
Chinese (zh)
Inventor
杜吉锋
孙朋慧
谢翔
李升林
孙立林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Qianfang Technology Co ltd
Original Assignee
Shanghai Qianfang Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Qianfang Technology Co ltd filed Critical Shanghai Qianfang Technology Co ltd
Priority to CN202111219196.XA priority Critical patent/CN113902443A/en
Publication of CN113902443A publication Critical patent/CN113902443A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4016Transaction verification involving fraud or risk level assessment in transaction processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/405Establishing or using transaction specific rules

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The specification provides a data processing method, a data processing device and a server. Based on the method, a first data party holding a target model with a tree model structure comprising a plurality of model layers and a second data party holding target data to be processed can respond to a target processing request, respectively take ciphertext data of the target model and ciphertext data of the target data as input, and cooperatively process the target data based on preset protocol rules comprising model layer combination calculation rules. Therefore, on the premise of protecting the data privacy of the participants, the complexity of the processing process can be effectively reduced, the target model is efficiently utilized to process the target data, and the target processing result of the target data is obtained.

Description

Data processing method and device and server
Technical Field
The specification belongs to the technical field of internet, and particularly relates to a data processing method, a data processing device and a server.
Background
In some data processing scenarios (e.g., joint prediction scenarios, etc.), there are often cases where different data parties hold the prediction model and the business data to be processed, respectively. For example, a first data party holds the predictive model and a second data party holds the business data to be processed. In order to protect the data privacy of both parties, the two parties are required to cooperate to perform corresponding processing on the premise that the two parties cannot know the data held by the other party, so that a prediction model held by a first data party is called to process business data held by a second data party, and a corresponding prediction result is obtained.
However, when the method is implemented specifically based on the existing method, the technical problems of high complexity of the processing process, low processing efficiency and the like often exist.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The specification provides a data processing method, a data processing device and a server, which can effectively reduce the complexity of a processing process and efficiently process target data by calling a target model on the premise of protecting the data privacy of a participant so as to obtain a target processing result related to the target data.
The embodiment of the specification provides a data processing method, which is applied to a first data party, wherein the first data party holds ciphertext data of a target model; the target model is a tree model comprising a plurality of model layers; the method comprises the following steps:
receiving a target processing request;
responding to the target processing request, taking the ciphertext data of the target model as input, cooperating with a second data party taking the ciphertext data of the target model as input, and processing the target data based on a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
In some embodiments, the target data processing is performed based on a preset protocol rule, and includes:
calculating point result vectors of all non-leaf nodes according to the ciphertext data of the target data and the ciphertext data of the target model; splicing point result vectors of non-leaf points in the same model layer to obtain a layer result vector of the model layer;
dividing a first type model layer where the non-leaf nodes are located into a plurality of model layer groups according to a preset grouping rule; wherein the model layer group comprises two adjacent model layers;
according to a preset calculation rule, calculating a group result vector of each model layer group by using the layer result vectors of the model layers contained in each model layer group;
and calculating to obtain a target processing result related to the target data according to 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.
In some embodiments, dividing the first type model layer where the non-leaf node is located into a plurality of model layer groups according to a preset grouping rule includes:
detecting whether the layer number of the first type of model layer in the target model is an even number;
under the condition that the number of layers of a first type model layer in the target model is determined to be an even number, sequentially dividing adjacent odd number model layers and even number model layers in the first type model layer into a model layer group according to the sequence of the corresponding depths from small to large; the depth corresponding to the odd model layers in the same model layer group is greater than the depth corresponding to the even model layers.
In some embodiments, after detecting whether the number of layers of the first type of model layer in the target model is an even number, the method further comprises:
under the condition that the number of layers of a first type model layer in the target model is determined to be odd, sequentially dividing adjacent odd model layers and even model layers in the first type model layer into a model layer group according to the sequence of the corresponding depths from small to large; and dividing the remaining one of the first type of model layers into a set of model layers.
In some embodiments, according to a preset calculation rule, calculating a group result vector of each model layer group by using a layer result vector of a model layer included in each model layer group, including:
calculating a group result vector of the current model layer group according to the following modes:
expanding the layer result vectors of the even model layers in the current model layer group to obtain expanded layer result vectors of the even model layers in the current model layer group;
and multiplying the expanded layer result vector of the even model layer in the current model layer group and the elements with the same data bit in the layer result vector of the odd model layer in the current model layer group to obtain the group result vector of the current model layer group.
In some embodiments, calculating a target processing result related to the target data according to 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 includes:
dividing the group result vectors of the plurality of model layer groups into a plurality of data groups according to a preset grouping rule; wherein the data group comprises group result vectors of two adjacent model layer groups;
calculating a result vector of each data group according to a preset calculation rule;
calculating a result vector of the first type model layer according to the result vectors of the data groups;
and performing dot product processing on the result vector of the first type of model layer and the weight vector of the second type of model layer to obtain a target processing result.
In some embodiments, before performing the target data processing, the method further comprises:
and according to a preset encryption rule, respectively encrypting the feature selection vector and the feature threshold value at each non-leaf node in the target model and the preset weight value at each leaf node to obtain ciphertext data of the target model.
In some embodiments, the preset encryption rules include encryption rules based on secret sharing.
In some embodiments, the objective model comprises a transaction risk prediction model of the user; the target data comprises characteristic data of a target user;
accordingly, the target processing result on the target data includes: ciphertext data of a transaction risk level of the target user.
In some embodiments, before performing the target data processing, the method further comprises:
detecting whether the target model is a complete binary tree model;
and under the condition that the target model is determined to be a non-complete binary tree model, performing completion processing on the target model to obtain an improved target model.
The embodiment of the specification further provides a data processing method, which applies a second data party, wherein the second data party holds ciphertext data of target data to be processed; the method comprises the following steps:
initiating a target processing request;
the ciphertext data of the target data are used as input, and the target data are processed by cooperating with a first data party which takes the ciphertext data of the target model as input on the basis of a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
In some embodiments, before performing the target data processing, the method further comprises:
and respectively encrypting the plurality of characteristic values contained in the target data according to a preset encryption rule to obtain ciphertext data of the target data.
In some embodiments, the preset encryption rules include encryption rules based on secret sharing.
In some embodiments, the objective model comprises a transaction risk prediction model of the user; the target data comprises characteristic data of a target user;
accordingly, the target processing result on the target data includes: ciphertext data of a transaction risk level of the target user.
In some embodiments, after obtaining the target processing result on the target data, the method further comprises:
receiving a target processing result;
according to a preset encryption rule, carrying out decryption processing on a target processing result to obtain a transaction risk level of a target user;
and providing matched services for the target user according to the transaction risk level of the target user.
The embodiment of the present specification further provides a data processing method, which is applied to a first data party, where the first data party holds ciphertext data of a first fragment of a target model; the target model is a tree model comprising a plurality of model layers; the method comprises the following steps:
receiving a target processing request;
responding to the target processing request, taking the ciphertext data of the first fragment of the target model as input, cooperating with a second data party taking the ciphertext data of the target model as input and a third data party taking the ciphertext data of the second fragment of the target model as input, and processing the target data based on a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
An embodiment of the present specification further provides a data processing method, which is applied to a plurality of first data parties and a plurality of second data parties, where the plurality of first data parties respectively hold ciphertext data of one segment of a target model, the plurality of second data parties respectively hold ciphertext data of one segment of the target model, and the target model is a tree model including a plurality of model layers, and the method includes:
responding to the target processing request, and cooperatively performing target data processing by using the ciphertext data of the fragments of the target model and the ciphertext data of the fragments of the target data which are respectively held by the plurality of first data parties and the plurality of second data parties as input based on a preset protocol rule so as to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
The embodiment of the present specification further provides a data processing apparatus, which is applied to a first data party, where the first data party holds ciphertext data of a target model; the target model is a tree model comprising a plurality of model layers; the method comprises the following steps:
a receiving module, configured to receive a target processing request;
the processing module is used for responding to the target processing request, taking the ciphertext data of the target model as input, cooperating with a second data party taking the ciphertext data of the target model as input, and processing the target data based on a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
The embodiment of the present specification further provides a data processing apparatus, which applies a second data party, where the second data party holds ciphertext data of target data to be processed; the method comprises the following steps:
the initiating module is used for initiating a target processing request;
the processing module is used for taking the ciphertext data of the target data as input, cooperating with a first data party taking the ciphertext data of the target model as input, and processing the target data based on a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
Embodiments of the present specification also provide a server, which includes a processor and a memory for storing processor-executable instructions, and when the processor executes the instructions, the relevant steps of the data processing method are implemented.
The present specification also provides a computer readable storage medium, on which computer instructions are stored, and when executed, the instructions implement the relevant steps of the data processing method.
Based on the data processing method, the data processing device and the server provided by the specification, a first data party holding a target model with a tree model structure comprising a plurality of model layers and a second data party holding target data to be processed can respond to a target processing request, respectively take ciphertext data of the target model and ciphertext data of the target data held by the first data party and the ciphertext data of the target model as input, and cooperatively perform corresponding target data processing based on preset protocol rules including model layer combination calculation rules. Therefore, on the premise of protecting the data privacy of the participants, the complexity of the processing process can be effectively reduced, the target data is efficiently processed by calling the target model, and the target processing result of the target data is obtained, so that the overall data processing efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present specification, the drawings needed to be used in the embodiments will be briefly described below, and the drawings in the following description are only some of the embodiments described in the specification, and it is obvious to those skilled in the art that other drawings can be obtained based on the drawings without any inventive work.
FIG. 1 is a flow diagram of a data processing method provided by one embodiment of the present description;
FIG. 2 is a diagram illustrating an embodiment of a data processing method according to an embodiment of the present disclosure;
FIG. 3 is a diagram illustrating an embodiment of a data processing method according to an embodiment of the present disclosure;
FIG. 4 is a diagram illustrating an embodiment of a data processing method according to an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating an embodiment of a data processing method according to an embodiment of the present disclosure;
FIG. 6 is a flow diagram of a data processing method provided by one embodiment of the present description;
FIG. 7 is a flow diagram of a data processing method provided by one embodiment of the present description;
FIG. 8 is a schematic diagram of a server according to an embodiment of the present disclosure;
fig. 9 is a schematic structural component diagram of a data processing apparatus provided in an embodiment of the present specification;
fig. 10 is a schematic diagram of an embodiment of a data processing method provided by an embodiment of the present specification, in an example scenario.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
Considering that, based on the existing data processing method, to securely call the model held by one of the parties to process the business data held by the other party while protecting the data privacy of the parties, the complexity of the processing procedure is often relatively high (e.g., the complexity is usually up to o (n)). This is because the existing method does not consider the specific structural characteristics of the model (e.g., tree model) at all, and does not consider that the model layers included in the model are combined by using the structural characteristics of the model, and then the complexity of the processing procedure is reduced based on the multiplicative association law and the related protocol.
For the root cause of the above problem, the present specification considers that the structural characteristics of the model (for example, the characteristics that a plurality of model layers included in the tree model are sequentially connected from small to large according to the depths corresponding to the model layers) can be fully utilized, and based on a preset protocol rule including a model layer combination calculation rule, a point result vector of each non-leaf node is calculated first; and splicing the point result vectors of the non-leaf nodes on the same model layer to obtain the layer result vector of the model layer. Then, dividing a first type model layer where the non-leaf nodes are located into a plurality of model layer groups according to a preset grouping rule; and calculating to obtain a group result vector of each model layer group by using the layer result vectors of the model layers included in each model layer group according to a preset calculation rule. Finally, according to the preset grouping rule, processing the group result vectors of the plurality of model layer groups in a processing mode similar to the layer result vector of the processing model layer to obtain a result vector of the first type of model layer; and performing dot product processing on the result vector of the first type model layer and a weight vector obtained by splicing preset weight values of leaf nodes on the second type model layer, so as to obtain a target processing result related to target data.
By the method, the complexity of the processing process can be effectively reduced (for example, the processing complexity can be reduced to O (log (n)) on the premise of protecting the data privacy of the participants), so that the target model can be used for processing the target data more efficiently, and a target processing result about the target data can be obtained.
Based on the above thought, referring to fig. 1, the embodiment of the present specification provides a data processing method. Wherein the method is particularly applicable to the first data party. The first data party holds ciphertext data of the target model; the target model is a tree model comprising a plurality of model layers. In particular implementations, the method may include the following.
S101: a target processing request is received.
S102: responding to the target processing request, taking the ciphertext data of the target model as input, cooperating with a second data party taking the ciphertext data of the target model as input, and processing the target data based on a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
In some embodiments, the first data party may be specifically understood as a model holder, which holds a target model to be invoked. The second data party may be specifically understood as a data holder, and holds target data to be processed.
Specifically, for example, in a transaction risk prediction scenario, the target model may be a transaction risk prediction model of the user. Accordingly, the target data may be transaction characteristic data of the target user to be predicted. Such as the age, occupation, monthly income, etc. of the target user.
For another example, in a weather prediction scenario, the target model may also be a weather prediction model. Accordingly, the target data may be gas phase characteristic data collected the previous day. Such as humidity, wind speed, cloud cover thickness, etc. of the previous day.
For another example, in a shopping guide scenario, the above object model may also be a determination model of the shopping preferences of the customer. Accordingly, the target data may be historical shopping behavior characteristic data of the customer. Such as the number of times the customer has purchased in the past week, the type of purchase, the amount spent shopping, etc.
Of course, the above listed application scenarios, object models, and object data are only illustrative. When the method is specifically implemented, the method can also be applied to other application scenarios, and accordingly, the related target model can also be other types of models, and the related target data can also be other types of data. The specification is not limited thereto.
Currently, the target model held by the first data party is called to process the target data held by the second data party on the premise that the target data held by the second data party is not disclosed to the first data party and the target model held by the first data party is not disclosed to the second data party, so that the data privacy of the participating parties is protected, and a target processing result about the target data is obtained.
In some embodiments, the target model may be a tree model including a plurality of model layers. Specifically, the target model may be a complete binary tree model.
Specifically, as can be seen in FIG. 2, the target model may include 5 model layers. Wherein, the 5 model layers are connected in sequence according to the corresponding depth from small to large. Specifically, the model layer located at the topmost layer is the model layer corresponding to the depth 0(level0), and is marked as the model layer 0; the model layer which is positioned at the second layer and corresponds to the depth 1(level1) is marked as a model layer 1; the model layer which is positioned at the third layer and corresponds to the depth 2(level2) is marked as a 2 model layer; the model layer which is positioned on the fourth layer and corresponds to the depth 3(level3) is marked as a 3 model layer; the lowest layer is the model layer corresponding to the depth 4(level4), which is denoted as the 4 model layer. The model 0, the model 2, and the model 4 may be referred to as even-numbered model layers. The 1 model layer and the 3 model layer may be referred to as odd model layers.
A plurality of nodes are also arranged on each model layer. Wherein, the nodes laid on the 4 model layers at the bottommost layer can be called leaf nodes. The 4 model layers populated with leaf nodes may be referred to as a second type model layer. Nodes that are laid out on model layers other than the 4 model layer may be referred to as non-leaf nodes. The model layer 0, the model layer 1, the model layer 2 and the model layer 3 which are provided with the non-leaf nodes can be called as a first type model layer. The non-leaf nodes disposed at the 0 model layer may also be referred to as root nodes.
In particular, a corresponding feature selection vector may be set at each non-leaf node, along with a corresponding feature threshold. For example, the corresponding feature selection vector at the non-leaf node numbered j on the i-model layer may be represented as ei,jThe corresponding characteristic threshold may be denoted ti,j
A corresponding preset weight value may be set at each leaf node. For example, the preset weight value at the leaf node numbered q on the second type model layer may be represented as wq.
In some embodiments, the target data may be a target feature vector including a plurality of feature values. Specifically, for example, the target data may be represented in the form of: x ═ X1,x2,x3,x4). Wherein x is1,x2,x3,x4Respectively corresponding to the eigenvalues of one of the characteristics.
For example, the target data X may specifically refer to transaction characteristic data of a target user X, where X is1Specifically, the age of the target user xValue, x2May particularly represent the occupation of a target user x, x3May particularly represent a monthly revenue value, x, for a target user x4Specifically, the academic calendar of the target user x may be represented.
In some embodiments, the target processing request may specifically be request data generated and initiated by the second data party when the target model held by the first data party needs to be called to process the target data.
In some embodiments, the first data party and the second data party may perform target data processing in response to the target processing request by using the held ciphertext data of the target wakeup and the held ciphertext data of the target data as inputs, and collaborating based on a preset protocol rule, so as to efficiently process the target processing result of the target data on the premise of protecting the privacy of the two parties.
In some embodiments, when a specific cooperation performs target data processing, the first data party may use ciphertext data of the target model, and the second data party may use ciphertext data of the target model.
The ciphertext data of the target model may specifically be ciphertext data obtained by encrypting a feature selection vector and a feature threshold at a non-leaf node in the target model, and a preset weight value at the leaf node. The ciphertext data of the target data may specifically be ciphertext data obtained by encrypting each feature value in the target data.
By using the ciphertext data of the target model and the ciphertext data of the target data to process the target data, the risk that the target model and the target data are leaked in the processing process can be well reduced, and the data privacy of the participants is effectively protected.
In some embodiments, the preset protocol rules may include at least model layer combination calculation rules. The model layer combination calculation rule may further include a preset combination rule and a preset calculation rule.
In some embodiments, the preset protocol rule may be a protocol rule introduced and formed based on the MPC protocol. Therefore, the target data processing is carried out based on the preset protocol rule, and the data privacy and safety of the participants can be better protected.
Among them, MPC (Secure Muti-Party computing) is an algorithm for protecting data privacy and security. The multi-party security calculation can ensure that a plurality of data parties perform cooperative calculation on the premise of not leaking own data.
In some embodiments, in response to a target processing request, a first data party takes ciphertext data of a target model as input, a second data party takes ciphertext data of the target model as input, and the two data parties cooperate to perform target data processing based on a preset protocol rule to output a target processing result about the target data.
In some embodiments, the target processing result may be different types of result data corresponding to different application scenarios and different target data. Specifically, the target processing result may be a transaction risk level of the target user, a weather prediction result of tomorrow, a shopping preference of the determined customer, and the like.
In some embodiments, the target data processing based on the preset protocol rule may include the following steps:
s1: calculating point result vectors of all non-leaf nodes according to the ciphertext data of the target data and the ciphertext data of the target model; splicing point result vectors of non-leaf points in the same model layer to obtain a layer result vector of the model layer;
s2: dividing a first type model layer where the non-leaf nodes are located into a plurality of model layer groups according to a preset grouping rule; wherein the model layer group comprises two adjacent model layers;
s3: according to a preset calculation rule, calculating a group result vector of each model layer group by using the layer result vectors of the model layers contained in each model layer group;
s4: and calculating to obtain a target processing result related to the target data according to 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.
In some embodiments, the calculating a point result vector of each non-leaf node according to the ciphertext data of the target data and the ciphertext data of the target model may include: the point result vector for the current non-leaf node is calculated as follows:
s1: performing point multiplication on the ciphertext data of the target data and the ciphertext data of the feature selection vector at the current non-leaf node to obtain ciphertext data of an intermediate result at the current non-leaf node;
s2: and comparing and operating the ciphertext data of the intermediate result at the current non-leaf node with the ciphertext data of the characteristic threshold at the current non-leaf node to obtain a point result vector of the current non-leaf node.
In some embodiments, the above-mentioned ciphertext data of the intermediate result at the current non-leaf node may specifically be ciphertext data of a feature value corresponding to the current node in the target data.
For example, the ciphertext data for the intermediate result at the current non-leaf node (e.g., i model layer j) may be calculated as follows: k is a radical ofi,j=XT*ei,j
In some embodiments, in specific implementation, the ciphertext data of the intermediate result at the current non-leaf node may be compared with the ciphertext data of the feature threshold at the current non-leaf node in an encrypted state to obtain a corresponding comparison result; and determining a point result vector of the current non-leaf node according to the comparison result.
Specifically, according to the comparison result, under the condition that the ciphertext data of the intermediate result at the current non-leaf node is determined to be smaller than the ciphertext data of the feature threshold at the current non-leaf node, the point result vector of the current non-leaf node is marked as (1, 0). Conversely, according to the comparison result, in the case where it is determined that the ciphertext data of the intermediate result at the current non-leaf node is greater than or equal to the ciphertext data of the feature threshold at the current non-leaf node, the point result vector of the current non-leaf node is marked as (0, 1).
By the method, the node result vectors of the non-leaf nodes can be obtained through calculation respectively.
In some embodiments, when the layer result vectors of the model layers are specifically calculated, the point result vectors of the non-leaf nodes in the same model layer may be spliced in the order from small to large of the node numbers to obtain the layer result vectors corresponding to the model layers.
Specifically, for example, referring to FIG. 2, a 3-model layer comprises 23The 8 non-leaf nodes are respectively a non-leaf node with a model layer number of 3 (abbreviated as node (3,1)), a non-leaf node with a model layer number of 2 (abbreviated as node (3,2)), a non-leaf node with a model layer number of 3 (abbreviated as node (3,3)), a non-leaf node with a model layer number of 4 (abbreviated as node (3,4)), a non-leaf node with a model layer number of 5 (abbreviated as node (3,5)), a non-leaf node with a model layer number of 6 (abbreviated as node (3,6)), a non-leaf node with a model layer number of 7 (abbreviated as node (3,7)), and a non-leaf node with a model layer number of 7 (abbreviated as node (3, 7)). The point result vector of the node (3,1) is (1,0), the point result vector of the node (3,2) is (1,0), the point result vector of the node (3,3) is (0,1), the point result vector of the node (3,4) is (0,1), the point result vector of the node (3,5) is (0,1), the point result vector of the node (3,6) is (0,1), the point result vector of the node (3,7) is (1,0), and the point result vector of the node (3,8) is (0, 1).
Splicing the point result vectors of the 8 nodes according to the sequence of the serial numbers from small to large to obtain a layer result vector of the 3-model layer, which is marked as a3=(1,0,1,0,0,1,0,1,0,1,0,1,1,0,0,1)。
In a similar manner, a layer result vector for each of the first type of model layers may be calculated.
In some embodiments, the dividing the first type model layer where the non-leaf node is located into a plurality of model layer groups according to a preset grouping rule may include the following steps: detecting whether the layer number of the first type of model layer in the target model is an even number; under the condition that the number of layers of a first type model layer in the target model is determined to be an even number, sequentially dividing adjacent odd number model layers and even number model layers in the first type model layer into a model layer group according to the sequence of the corresponding depths from small to large; the depth corresponding to the odd model layers in the same model layer group is greater than the depth corresponding to the even model layers.
In some embodiments, after detecting whether the number of layers of the first type of model layer in the target model is an even number, when the method is implemented, the following may be further included: under the condition that the number of layers of a first type model layer in the target model is determined to be odd, sequentially dividing adjacent odd model layers and even model layers in the first type model layer into a model layer group according to the sequence of the corresponding depths from small to large; and dividing the remaining one of the first type of model layers into a set of model layers. Correspondingly, subsequently, when calculating the group result vector of each model layer group, the layer result vector of the model layer in the model layer group including only one model layer may be determined as the group result vector of the model layer group.
Specifically, for example, referring to fig. 3, the number of layers of the first type of molding layer is 4, which is an even number. Therefore, according to the preset grouping rule, the 4 model layers included in the first type model layer can be divided into two model layer groups: a model layer group 1 and a model layer group 2. The model layer group 1 comprises a 0 model layer (even model layer) and a 1 model layer (odd model layer) which are adjacent, and the depth 1 corresponding to the 1 model layer in the model layer group is greater than the depth 0 corresponding to the 0 model layer; accordingly, the layer result vector of the 1-mode layer contains twice as many elements as the 0-mode layer. The model layer group 2 comprises a 2 model layer and a 3 model layer which are adjacent, and the depth 3 corresponding to the 3 model layer in the model layer group is larger than the depth 2 corresponding to the 2 model layer; accordingly, the layer result vector of the 3-mode layer contains twice as many elements as the 2-mode layer.
For another example, referring to fig. 4, the number of layers of the first type of mold layer is 3, which is an odd number. Therefore, according to the preset grouping rule, the 3 model layers included in the first type model layer can be divided into two model layer groups: a model layer group 1 and a model layer group 2. The model layer group 1 comprises two adjacent model layers, namely a model layer 0 and a model layer 1. The model layer 2 contains only one model layer of the remaining 2 model layers.
In some embodiments, the above calculating, according to a preset calculation rule, a group result vector of each model layer group by using a layer result vector of a model layer included in each model layer group may include the following steps: calculating a group result vector of the current model layer group according to the following modes:
s1: expanding the layer result vectors of the even model layers in the current model layer group to obtain expanded layer result vectors of the even model layers in the current model layer group;
s2: and multiplying the expanded layer result vector of the even model layer in the current model layer group and the elements with the same data bit in the layer result vector of the odd model layer in the current model layer group to obtain the group result vector of the current model layer group.
In some embodiments, when performing the expansion process, each element in the layer result vector of the even model layer may be sequentially copied and expanded to obtain an expanded layer result vector.
Specifically, referring to fig. 3, for example, a layer result vector a of a 0 model layer in the extended model layer group 10When the value is (1, 0). Can be combined with0Each element in the layer is copied in turn to obtain an expanded layer result vector b0=(1,1,0,0)。
As another example, layer result vector a of 2-model layer in extended-model layer group 22When the expression is (1,0,1,0,1,0,1, 0). Can be combined with2Each element in the layer is copied in turn to obtain an expanded layer result vector b2=(1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0)。
By the expansion processing, the number of elements contained in the expanded layer result vector of the even model layer in the same model layer group can be consistent with that of the layer result vector of the odd model layer, so that the subsequent group result vector can be calculated.
In some embodiments, when the group result vector of the model layer group is specifically calculated, an element wise product operation may be performed using the expanded layer result vector of the even model layer and the layer result vector of the odd model layer in the same model layer group to obtain the group result vector of the model layer group. The element wise product operation may be specifically an operation of multiplying elements of the same data bit in two vectors.
Specifically, referring to fig. 3, taking the group result vector of the model layer group 1 as an example, the layer result vector b after the model layer 0 is expanded can be used0Layer result vector a of 1-mode layer (1,1,0,0)1(0,1,0,1) (may also be denoted as b)1) Multiplying elements of the same data bit respectively to obtain corresponding vector c0Set result vector as model layer set 1 is (0,0,0, 0).
By the above manner, a group result vector of each model layer group in the plurality of model layer groups can be calculated.
In some embodiments, the calculating, according to 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, a target processing result related to the target data may include the following steps:
s1: dividing the group result vectors of the plurality of model layer groups into a plurality of data groups according to a preset grouping rule; wherein the data group comprises group result vectors of two adjacent model layer groups;
s2: calculating a result vector of each data group according to a preset calculation rule;
s3: calculating a result vector of the first type model layer according to the result vectors of the data groups;
s4: and performing dot product processing on the result vector of the first type of model layer and the weight vector of the second type of model layer to obtain a target processing result.
In some embodiments, particularly for the case that the model structure of the target model is relatively simple, as shown in fig. 3, the first model of the target modelThe class model layer contains only 4 model layers. And according to a preset combination rule, performing first grouping, and calculating a group result vector of each model layer group obtained by the first grouping according to a preset calculation rule, wherein only two group result vectors of the model layer groups are left. No additional division of the data set is required. The group result vector c of the model layer group 1 can be firstly processed directly according to the preset calculation rule0Performing expansion processing to obtain expanded group result vector d0. Wherein, c0The number of elements included and the group result vector c of the model group 21The same is true. Then d is put0And c1The elements of the same data bit are multiplied to obtain a vector as a result vector of the first type of model layer, which can be denoted as r.
In some embodiments, for the case that the model structure of the target model is relatively complex, as shown in fig. 5, the first type model layer of the target model includes 8 model layers. Wherein the 8 circles in the first row represent the layer result vectors of the 8 model layers, respectively. And the depths corresponding to the 8 model layers are respectively 0,1,2,3,4,5,6 and 7 along the direction from the right to the left.
In specific implementation, the first grouping may be performed according to a preset grouping rule, and 4 model layer groups are divided. Wherein each model layer group comprises two adjacent model layers. And calculating to obtain corresponding group vectors of 4 model layer groups according to a preset calculation rule.
Then, according to a preset grouping rule, a second grouping may be performed to subdivide the 4 model layer groups into 2 data groups. Wherein each data set comprises two adjacent groups of model layers. And calculating to obtain group vectors of the corresponding 2 data groups according to a preset calculation rule.
Then, according to a preset calculation rule, the final result vector r of the first type model layer can be calculated by using the group vectors of the 2 data groups.
For the case that the model structure of the target model is more complex, each group is repeatedly performed for a plurality of times according to the preset grouping rule with reference to the embodiment of fig. 5; and after each grouping, calculating the result vector of the corresponding grouping by using the two adjacent result vectors contained in each grouping according to a preset calculation rule. The above process is repeated until the result vector r for the layer of the first type is obtained.
In specific implementation, under the condition that the model structure of the target model is complex, a recursive algorithm can be adopted, and the result vector r of the first type model layer can be rapidly calculated by performing grouping and calculation for many times.
In some embodiments, the weight vector of the second type of layer may be specifically a vector obtained by splicing preset weight values at each leaf node on the second type of layer in the descending order of numbers.
Specifically, for example, referring to fig. 3, the weight vector of the second type model layer can be expressed as: w ═ (w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15, w 16).
In some embodiments, in specific implementation, the result vector of the first type of model layer and the weight vector of the second type of model layer may be subjected to a dot product according to the following equation, so as to obtain a corresponding value res as a target processing result:
Figure BDA0003311924860000131
wherein the content of the first and second substances,
Figure BDA0003311924860000132
representing an inner product operation.
Through the target data processing, a corresponding target processing result can be output and obtained. The target processing result may be specifically encrypted data.
In some embodiments, before performing the target data processing, when the method is implemented, the following may be further included: and according to a preset encryption rule, respectively encrypting the feature selection vector and the feature threshold value at each non-leaf node in the target model and the preset weight value at each leaf node to obtain ciphertext data of the target model.
In some embodiments, the preset encryption rule may specifically include an encryption rule based on secret sharing.
The Secret Sharing algorithm (SS) may be specifically an algorithm for protecting data privacy and security. Based on a secret sharing algorithm, a plurality of data parties can perform cooperative calculation and share secret information on the premise of not leaking own data; accordingly, each data party can obtain one piece of secret information.
Correspondingly, the second data party can encrypt the held target data according to a preset encryption rule to obtain ciphertext data of the target data.
In some embodiments, the preset encryption rules used may also be encryption rules based on other encryption algorithms. For example, an Encryption rule based on a symmetric Encryption algorithm (DES), an Encryption rule based on an elliptic curve Encryption algorithm, an Encryption rule based on a hash algorithm, or the like may be also possible.
In some embodiments, the objective model may specifically include a transaction risk prediction model of the user; the target data may specifically include transaction characteristic data of the target user; correspondingly, the target processing result of the target data may specifically include: ciphertext data of a transaction risk level of the target user.
In some embodiments, before performing the target data processing, when the method is implemented, the following may be further included:
s1: detecting whether the target model is a complete binary tree model;
s2: and under the condition that the target model is determined to be a non-complete binary tree model, performing completion processing on the target model to obtain an improved target model.
Through the completion processing, the target model can be converted from the original incomplete binary tree model into a model with a complete binary tree structure, and the improved target model is obtained. And the improved target model can be used for replacing the original target model to participate in subsequent data processing.
As can be seen from the above, according to the data processing method provided in the embodiments of the present specification, a first data party holding ciphertext data of a target model of a tree model including multiple model layers and a second data party holding ciphertext data of target data to be processed may respond to a target processing request, and perform target data processing in cooperation with each other by using the ciphertext data of the target model and the ciphertext data of the target data as input, based on a preset protocol rule including a model layer combination calculation rule. Therefore, on the premise of protecting the data privacy of the participants, the complexity of the processing process can be effectively reduced, the target model is efficiently utilized to process the target data, and the target processing result of the target data is obtained.
Referring to fig. 6, another data processing method is provided in the embodiments of the present disclosure. Wherein, the method is particularly applied to the side of the second data side. When implemented, the following may be included.
S601: a target processing request is initiated.
S602: the ciphertext data of the target data are used as input, and the target data are processed by cooperating with a first data party which takes the ciphertext data of the target model as input on the basis of a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
In some embodiments, before performing the target data processing, when the method is implemented, the following may be further included: and respectively encrypting the plurality of characteristic values contained in the target data according to a preset encryption rule to obtain ciphertext data of the target data.
In some embodiments, the preset encryption rules include encryption rules based on secret sharing.
In some embodiments, the objective model may specifically include a transaction risk prediction model of the user; the target data may specifically include transaction characteristic data of the target user; correspondingly, the target processing result of the target data may specifically include: ciphertext data of a transaction risk level of the target user.
In some embodiments, after obtaining the target processing result about the target data, when the method is implemented, the following may be further included:
s1: receiving a target processing result;
s2: according to a preset encryption rule, carrying out decryption processing on a target processing result to obtain a transaction risk level of a target user;
s3: and providing matched services for the target user according to the transaction risk level of the target user.
And aiming at different application scenes, the second data party can also perform type data processing according to the target processing result. For example, in a shopping guide scenario, the second data party may search, according to the shopping preference of the target customer obtained by decrypting the target processing result, for a commodity matching the shopping preference of the target customer as a target commodity; and recommending the target commodity to the target client to improve the unit yield.
Referring to fig. 7, the present specification further provides another data processing method for a more complex data processing scenario. The method can be applied to the first data side. The target model is commonly held and managed by the first data party and the third data party. The first data party holds ciphertext data of a first fragment of the target model; the second data party holds ciphertext data of a second fragment of the target model; a first data side and a second data side need to use a first fragment and a second fragment of a respective target model at the same time to obtain a complete target model; the target model may specifically be a tree model comprising a plurality of model layers. The method may be embodied as follows.
S701: a target processing request is received.
S702: responding to the target processing request, taking the ciphertext data of the first fragment of the target model as input, cooperating with a second data party taking the ciphertext data of the target model as input and a third data party taking the ciphertext data of the second fragment of the target model as input, and processing the target data based on a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
For a more complex data processing scenario, for example, a plurality of first-class data parties respectively hold ciphertext data of one segment of the target model, and a plurality of second-class data parties respectively hold ciphertext data of one segment of the target model to be processed. In the data processing scene, a plurality of first-class data parties and a plurality of second-class data parties form a complete data interaction system. Wherein, a plurality of first-class data parties need to use the fragments of the respective target models to be combined at the same time to obtain the complete target model. Multiple second-class data parties need to use fragments of the target data respectively and simultaneously for combination, and then complete target data can be obtained.
In specific implementation, any one of the second-class data parties or the first-class data parties (which may be referred to as an initiator) initiates the target processing request.
The second-class data parties and the first-class data parties can respond to the target processing request, respectively take the held ciphertext data of the target data fragment and the held ciphertext data of the target model fragment as input, and cooperatively perform target data processing based on a preset protocol rule to obtain a target processing result related to the target data. Wherein the preset protocol rules comprise model layer combination calculation rules.
For another example, each of the plurality of data parties respectively holds ciphertext data of a fragment of the target data and/or a scene of ciphertext data of a fragment of the target model.
In a specific implementation, any one of the data parties (which may be referred to as an initiator) initiates a target processing request.
The multiple data parties can respond to the target processing request, respectively take the held ciphertext data of the target data fragment and/or the ciphertext data of the target model fragment as input, and cooperatively perform target data processing based on preset protocol rules to obtain a target processing result about the target data. Wherein the preset protocol rules comprise model layer combination calculation rules. An embodiment of the present specification further provides a data processing method, which is applied to a plurality of first data parties and a plurality of second data parties, where the plurality of first data parties respectively hold ciphertext data of one segment of a target model, the plurality of second data parties respectively hold ciphertext data of one segment of the target model, and the target model is a tree model including a plurality of model layers, and when the method is specifically implemented, the method may include the following steps: responding to the target processing request, and cooperatively performing target data processing by using the ciphertext data of the fragments of the target model and the ciphertext data of the fragments of the target data which are respectively held by the plurality of first data parties and the plurality of second data parties as input based on a preset protocol rule so as to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
By the embodiment, on the premise of protecting the data privacy of a plurality of participants, the complexity of the processing process can be effectively reduced, the target data is processed by the target model efficiently, and the target processing result of the target data is obtained.
Embodiments of the present specification further provide a server, including a processor and a memory for storing processor-executable instructions, where the processor, when implemented, may perform the following steps according to the instructions: receiving a target processing request; responding to the target processing request, taking the ciphertext data of the target model as input, cooperating with a second data party taking the ciphertext data of the target model as input, and processing the target data based on a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
In order to more accurately complete the above instructions, referring to fig. 8, the present specification further provides another specific server, wherein the server includes a network communication port 801, a processor 802 and a memory 803, and the above structures are connected by an internal cable, so that the structures can perform specific data interaction.
The network communication port 801 may be specifically configured to receive a target processing request.
The processor 802 may be specifically configured to respond to the target processing request, use the ciphertext data of the target model as an input, cooperate with a second data party that uses the ciphertext data of the target model as an input, and perform target data processing based on a preset protocol rule to obtain a target processing result about the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
The memory 803 may specifically store a corresponding instruction program.
In this embodiment, the network communication port 801 may be a virtual port that is bound to different communication protocols so as to send or receive different data. For example, the network communication port may be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for mail data communication. In addition, the network communication port can also be a communication interface or a communication chip of an entity. For example, it may be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it may also be a bluetooth chip.
In the present embodiment, the processor 802 may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The description is not intended to be limiting.
In this embodiment, the memory 803 may include multiple layers, and in a digital system, the memory may be any memory as long as it can store binary data; in an integrated circuit, a circuit without a physical form and with a storage function is also called a memory, such as a RAM, a FIFO and the like; in the system, the storage device in physical form is also called a memory, such as a memory bank, a TF card and the like.
Embodiments of the present specification further provide a server, including a processor and a memory for storing processor-executable instructions, where the processor, when implemented, may perform the following steps according to the instructions: initiating a target processing request; the ciphertext data of the target data are used as input, and the target data are processed by cooperating with a first data party which takes the ciphertext data of the target model as input on the basis of a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
Embodiments of the present specification further provide a server, including a processor and a memory for storing processor-executable instructions, where the processor, when implemented, may perform the following steps according to the instructions: receiving a target processing request; responding to the target processing request, taking the ciphertext data of the first fragment of the target model as input, cooperating with a second data party taking the ciphertext data of the target model as input and a third data party taking the ciphertext data of the second fragment of the target model as input, and processing the target data based on a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
The present specification further provides a computer storage medium based on the above data processing method, where the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the computer storage medium implements: receiving a target processing request; responding to the target processing request, taking the ciphertext data of the target model as input, cooperating with a second data party taking the ciphertext data of the target model as input, and processing the target data based on a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
The present specification further provides a computer storage medium based on the above data processing method, where the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the computer storage medium implements: initiating a target processing request; the ciphertext data of the target data are used as input, and the target data are processed by cooperating with a first data party which takes the ciphertext data of the target model as input on the basis of a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
The present specification further provides a computer storage medium based on the above data processing method, where the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the computer storage medium implements: receiving a target processing request; responding to the target processing request, taking the ciphertext data of the first fragment of the target model as input, cooperating with a second data party taking the ciphertext data of the target model as input and a third data party taking the ciphertext data of the second fragment of the target model as input, and processing the target data based on a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
In this embodiment, the storage medium includes, but is not limited to, a Random Access Memory (RAM), a Read-Only Memory (ROM), a Cache (Cache), a Hard Disk Drive (HDD), or a Memory Card (Memory Card). The memory may be used to store computer program instructions. The network communication unit may be an interface for performing network connection communication, which is set in accordance with a standard prescribed by a communication protocol.
In this embodiment, the functions and effects specifically realized by the program instructions stored in the computer storage medium can be explained by comparing with other embodiments, and are not described herein again.
Referring to fig. 9, in a software level, an embodiment of the present specification further provides a data processing apparatus, which is applied to a first data side, and the apparatus may specifically include the following structural modules:
a receiving module 901, which may be specifically configured to receive a target processing request;
the processing module 902 may be specifically configured to respond to the target processing request, use the ciphertext data of the target model as an input, cooperate with a second data party that uses the ciphertext data of the target data as an input, and perform target data processing based on a preset protocol rule to obtain a target processing result about the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
The embodiment of the present specification further provides another data processing apparatus, which applies a second data party, where the second data party holds ciphertext data of target data to be processed; the method comprises the following steps: the initiating module is specifically used for initiating a target processing request; the processing module is specifically configured to perform target data processing based on a preset protocol rule by using the ciphertext data of the target data as input and cooperating with a first data partner using the ciphertext data of the target model as input, so as to obtain a target processing result about the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
The embodiment of the present specification further provides another data processing apparatus, which is applied to a first data party, where the first data party holds ciphertext data of a first fragment of a target model; the target model is a tree model comprising a plurality of model layers; the method comprises the following steps: the receiving module is specifically used for receiving a target processing request; the processing module may be specifically configured to respond to the target processing request, perform target data processing in cooperation with a second data party that uses ciphertext data of the target model as input and a third data party that uses ciphertext data of the second fragment of the target model as input, and based on a preset protocol rule, obtain a target processing result on the target data, where the ciphertext data of the first fragment of the target model is used as input; wherein the preset protocol rules comprise model layer combination calculation rules.
It should be noted that, the units, devices, modules, etc. illustrated in the above embodiments may be implemented by a computer chip or an entity, or implemented by a product with certain functions. For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. It is to be understood that, in implementing the present specification, functions of each module may be implemented in one or more pieces of software and/or hardware, or a module that implements the same function may be implemented by a combination of a plurality of sub-modules or sub-units, or the like. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
As can be seen from the above, the data processing apparatus provided in the embodiments of the present specification can effectively reduce the complexity of the processing procedure and efficiently process the target data using the target model on the premise of protecting the data privacy of the participants, so as to obtain the target processing result related to the target data.
In a specific scenario example, the data processing method provided by the embodiment of the present specification may be applied to a system including a first server and a second server. In particular, as shown in fig. 10. The first server and the second server can be connected in a wired or wireless mode to perform specific data interaction.
Specifically, the first server may be a server disposed on a side of the first data side, and the first server may hold ciphertext data of the target model. The target model may be a tree model including a plurality of model layers.
The second server may be a server disposed on a side of the second data side, and the second server may hold ciphertext data of the target data to be processed.
In this embodiment, the first server and the second server may specifically include a background server capable of implementing functions such as data transmission and data processing. Specifically, the first server and the second server may be, for example, an electronic device having data operation, storage functions and network interaction functions. Alternatively, the first server and the second server may also be software programs running in the electronic device and providing support for data processing, storage and network interaction. In this embodiment, the number of the servers included in the first server and the second server is not specifically limited. The first server and the second server may be specifically one server, or several servers, or a server cluster formed by several servers.
In specific implementation, the second server may initiate a target processing request to the system when the target data needs to be processed.
The first server and the second server can respond to the target processing request, respectively use the ciphertext data of the target model and the ciphertext data of the target data which are respectively held as input, cooperatively process the target data according to a preset protocol rule, and output a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
And obtaining the target processing result by the second server according to a preset authority rule.
And the second server decrypts the target processing result according to a preset encryption rule to obtain plaintext data of the target processing result. Wherein the preset encryption rules comprise encryption rules based on secret sharing.
Although the present specification provides method steps as described in the examples or flowcharts, additional or fewer steps may be included based on conventional or non-inventive means. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an apparatus or client product in practice executes, it may execute sequentially or in parallel (e.g., in a parallel processor or multithreaded processing environment, or even in a distributed data processing environment) according to the embodiments or methods shown in the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, article, or apparatus that comprises the recited elements is not excluded. The terms first, second, etc. are used to denote names, but not any particular order.
Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may therefore be considered as a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
From the above description of the embodiments, it is clear to those skilled in the art that the present specification can be implemented by software plus necessary general hardware platform. With this understanding, the technical solutions in the present specification may be essentially embodied in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments in the present specification.
The embodiments in the present specification are described in a progressive manner, and the same or similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. The description is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
While the specification has been described with examples, those skilled in the art will appreciate that there are numerous variations and permutations of the specification that do not depart from the spirit of the specification, and it is intended that the appended claims include such variations and modifications that do not depart from the spirit of the specification.

Claims (21)

1. A data processing method is applied to a first data party, and is characterized in that the first data party holds ciphertext data of a target model; the target model is a tree model comprising a plurality of model layers, and the method comprises the following steps:
receiving a target processing request;
responding to the target processing request, taking the ciphertext data of the target model as input, cooperating with a second data party taking the ciphertext data of the target model as input, and processing the target data based on a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
2. The method of claim 1, wherein the target data processing is performed based on a preset protocol rule, and comprises:
calculating point result vectors of all non-leaf nodes according to the ciphertext data of the target data and the ciphertext data of the target model; splicing point result vectors of non-leaf points in the same model layer to obtain a layer result vector of the model layer;
dividing a first type model layer where the non-leaf nodes are located into a plurality of model layer groups according to a preset grouping rule; wherein the model layer group comprises two adjacent model layers;
according to a preset calculation rule, calculating a group result vector of each model layer group by using the layer result vectors of the model layers contained in each model layer group;
and calculating to obtain a target processing result related to the target data according to 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.
3. The method of claim 2, wherein dividing the first type model layer where the non-leaf nodes are located into a plurality of model layer groups according to a preset grouping rule comprises:
detecting whether the layer number of the first type of model layer in the target model is an even number;
under the condition that the number of layers of a first type model layer in the target model is determined to be an even number, sequentially dividing adjacent odd number model layers and even number model layers in the first type model layer into a model layer group according to the sequence of the corresponding depths from small to large; the depth corresponding to the odd model layers in the same model layer group is greater than the depth corresponding to the even model layers.
4. The method of claim 3, wherein after detecting whether the number of layers of the first type of model layer in the target model is an even number, the method further comprises:
under the condition that the number of layers of a first type model layer in the target model is determined to be odd, sequentially dividing adjacent odd model layers and even model layers in the first type model layer into a model layer group according to the sequence of the corresponding depths from small to large; and dividing the remaining one of the first type of model layers into a set of model layers.
5. The method according to claim 3, wherein calculating a group result vector of each model layer group by using a layer result vector of a model layer included in each model layer group according to a preset calculation rule includes:
calculating a group result vector of the current model layer group according to the following modes:
expanding the layer result vectors of the even model layers in the current model layer group to obtain expanded layer result vectors of the even model layers in the current model layer group;
and multiplying the expanded layer result vector of the even model layer in the current model layer group and the elements with the same data bit in the layer result vector of the odd model layer in the current model layer group to obtain the group result vector of the current model layer group.
6. The method of claim 5, wherein calculating the target processing result related to the target data according to 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 comprises:
dividing the group result vectors of the plurality of model layer groups into a plurality of data groups according to a preset grouping rule; wherein the data group comprises group result vectors of two adjacent model layer groups;
calculating a result vector of each data group according to a preset calculation rule;
calculating a result vector of the first type model layer according to the result vectors of the data groups;
and performing dot product processing on the result vector of the first type of model layer and the weight vector of the second type of model layer to obtain a target processing result.
7. The method of claim 1, wherein prior to performing target data processing, the method further comprises:
and according to a preset encryption rule, respectively encrypting the feature selection vector and the feature threshold value at each non-leaf node in the target model and the preset weight value at each leaf node to obtain ciphertext data of the target model.
8. The method of claim 7, wherein the preset encryption rules comprise secret sharing based encryption rules.
9. The method of claim 8, wherein the objective model comprises a transaction risk prediction model of a user; the target data comprises transaction characteristic data of a target user;
accordingly, the target processing result on the target data includes: ciphertext data of a transaction risk level of the target user.
10. The method of claim 1, wherein prior to performing target data processing, the method further comprises:
detecting whether the target model is a complete binary tree model;
and under the condition that the target model is determined to be a non-complete binary tree model, performing completion processing on the target model to obtain an improved target model.
11. A data processing method, which applies a second data party, wherein the second data party holds ciphertext data of target data to be processed, the method comprising:
initiating a target processing request;
the ciphertext data of the target data are used as input, and the target data are processed by cooperating with a first data party which takes the ciphertext data of the target model as input on the basis of a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
12. The method of claim 11, wherein prior to performing target data processing, the method further comprises:
and respectively encrypting the plurality of characteristic values contained in the target data according to a preset encryption rule to obtain ciphertext data of the target data.
13. The method of claim 12, wherein the preset encryption rules comprise secret sharing based encryption rules.
14. The method of claim 13, wherein the objective model comprises a transaction risk prediction model of a user; the target data comprises transaction characteristic data of a target user;
accordingly, the target processing result on the target data includes: ciphertext data of a transaction risk level of the target user.
15. The method of claim 14, wherein after obtaining the target processing result for the target data, the method further comprises:
receiving a target processing result;
according to a preset encryption rule, carrying out decryption processing on a target processing result to obtain a transaction risk level of a target user;
and providing matched services for the target user according to the transaction risk level of the target user.
16. A data processing method is applied to a first data party, and is characterized in that the first data party holds ciphertext data of a first fragment of a target model; the target model is a tree model comprising a plurality of model layers, and the method comprises the following steps:
receiving a target processing request;
responding to the target processing request, taking the ciphertext data of the first fragment of the target model as input, cooperating with a second data party taking the ciphertext data of the target model as input and a third data party taking the ciphertext data of the second fragment of the target model as input, and processing the target data based on a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
17. A data processing method, applied to a plurality of first data parties and a plurality of second data parties, where the plurality of first data parties respectively hold ciphertext data of one segment of a target model, the plurality of second data parties respectively hold ciphertext data of one segment of the target model, and the target model is a tree model including a plurality of model layers, the method comprising:
responding to the target processing request, and cooperatively performing target data processing by using the ciphertext data of the fragments of the target model and the ciphertext data of the fragments of the target data which are respectively held by the plurality of first data parties and the plurality of second data parties as input based on a preset protocol rule so as to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
18. A data processing device is applied to a first data party, and is characterized in that the first data party holds ciphertext data of a target model; the target model is a tree model comprising a plurality of model layers; the method comprises the following steps:
a receiving module, configured to receive a target processing request;
the processing module is used for responding to the target processing request, taking the ciphertext data of the target model as input, cooperating with a second data party taking the ciphertext data of the target model as input, and processing the target data based on a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
19. A data processing device, apply the second data side, characterized by that, the said second data side holds the cryptograph data of the target data to be processed; the method comprises the following steps:
the initiating module is used for initiating a target processing request;
the processing module is used for taking the ciphertext data of the target data as input, cooperating with a first data party taking the ciphertext data of the target model as input, and processing the target data based on a preset protocol rule to obtain a target processing result related to the target data; wherein the preset protocol rules comprise model layer combination calculation rules.
20. A server comprising a processor and a memory for storing processor-executable instructions which, when executed by the processor, implement the steps of the method of any one of claims 1 to 10, 11 to 15, 16 or 17.
21. A computer readable storage medium having stored thereon computer instructions which, when executed, implement the steps of the method of any one of claims 1 to 10, 11 to 15, 16 or 17.
CN202111219196.XA 2021-10-20 2021-10-20 Data processing method and device and server Pending CN113902443A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111219196.XA CN113902443A (en) 2021-10-20 2021-10-20 Data processing method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111219196.XA CN113902443A (en) 2021-10-20 2021-10-20 Data processing method and device and server

Publications (1)

Publication Number Publication Date
CN113902443A true CN113902443A (en) 2022-01-07

Family

ID=79192887

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111219196.XA Pending CN113902443A (en) 2021-10-20 2021-10-20 Data processing method and device and server

Country Status (1)

Country Link
CN (1) CN113902443A (en)

Similar Documents

Publication Publication Date Title
CN111428887B (en) Model training control method, device and system based on multiple computing nodes
CN111131412B (en) Method, system, mobile terminal and cloud server for realizing 5G mobile terminal calculation
CN110689349A (en) Transaction hash value storage and search method and device in block chain
Jayapandian et al. Secure and efficient online data storage and sharing over cloud environment using probabilistic with homomorphic encryption
CN109687952A (en) Data processing method and its device, electronic device and storage medium
CN109040076A (en) A kind of data processing method, system, device, equipment and medium
CN111144576A (en) Model training method and device and electronic equipment
CN110391895B (en) Data preprocessing method, ciphertext data acquisition method, device and electronic equipment
CN113505882A (en) Data processing method based on federal neural network model, related equipment and medium
CN113468601B (en) Data privacy fusion method and device
CN111143862B (en) Data processing method, query method, device, electronic equipment and system
CN113537633A (en) Prediction method, device, equipment, medium and system based on longitudinal federal learning
CN114255037A (en) Multi-party combined sorting method and data processing method under privacy protection
CN115694777A (en) Privacy set intersection method, device, equipment and medium based on homomorphic encryption
WO2023004007A1 (en) Hybrid public-key and private-key cryptographic systems based on iso-rsa encryption scheme
CN114039785A (en) Data encryption, decryption and processing method, device, equipment and storage medium
CN114187000A (en) Signature method, device, storage medium and processor for dispersing private key
CN111475690B (en) Character string matching method and device, data detection method and server
CN113434906A (en) Data query method and device, computer equipment and storage medium
CN111046431B (en) Data processing method, query method, device, electronic equipment and system
CN108900310A (en) Block chain signature processing method and block chain signature processing unit
CN115952526B (en) Ciphertext ordering method, equipment and storage medium
CN111159730B (en) Data processing method, query method, device, electronic equipment and system
US10361855B2 (en) Computing a secure elliptic curve scalar multiplication using an unsecured and secure environment
CN113254989B (en) Fusion method and device of target data and server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination