WO2020177475A1 - 一种安全的特征工程方法和装置 - Google Patents
一种安全的特征工程方法和装置 Download PDFInfo
- Publication number
- WO2020177475A1 WO2020177475A1 PCT/CN2020/070303 CN2020070303W WO2020177475A1 WO 2020177475 A1 WO2020177475 A1 WO 2020177475A1 CN 2020070303 W CN2020070303 W CN 2020070303W WO 2020177475 A1 WO2020177475 A1 WO 2020177475A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data set
- ciphertext
- subset
- feature engineering
- feature
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
Definitions
- the present disclosure relates to feature engineering, and in particular to a safe feature engineering method and device.
- Feature engineering refers to the process of converting original data into feature vectors. Feature engineering is the most important initial step in machine learning, which directly affects the effect of machine learning and usually requires a lot of time. Typical feature engineering includes data cleaning, feature discretization, feature extraction, feature selection and other processes.
- data is usually stored in a distributed manner, and feature engineering processing needs to fuse modeling sample data from all parties. For example, when data binning is performed, feature data and label information are required to complete.
- a joint modeling scenario there is generally a situation where one party has feature data and the other party has label information but no or a small amount of incomplete feature data.
- Another solution in the prior art to solve the above problems is to find a safe and trusted third party, import data from all parties in a secure environment, and perform data fusion in a public cloud/third-party environment in a secure sandbox environment.
- Concentrate on feature engineering processing The disadvantage of this scheme is that the data plaintext still needs to be output externally, which cannot completely prevent the leakage of private data, nor can it solve its own data trust problem.
- it is difficult to obtain a fully trusted third party and the transmission of data/models into a trusted third party also poses data transmission security risks.
- the granularity of security checks for data access is difficult to control, and the results of feature engineering processing may also be leaked.
- the first device may transmit a first data set to the second device, and the first data set contains ciphertext of tag information of multiple data objects.
- the second device may perform feature engineering processing on the second data set containing the feature data of the multiple data objects to generate a subset of the second data set.
- the second device may generate the ciphertext subset of the label information of the corresponding data object in the first data set according to the subset of the second data set, and send the ciphertext of the ciphertext subset to the first device.
- the first device can decrypt the ciphertext subset and generate statistical information, and send the statistical information to the second device.
- the second device can use the statistical information to calculate feature engineering indicators.
- a feature engineering method which includes: receiving a first data set, the first data set containing ciphertext of tag information of multiple data objects; performing feature engineering processing on the second data set To generate a subset of the second data set, the second data set includes the characteristic data of the multiple data objects; generate corresponding data in the first data set according to the data objects included in the subset of the second data set The ciphertext subset of the tag information of the object; sending the ciphertext of the ciphertext subset to the first device; receiving from the first device statistical information generated after decrypting the ciphertext of the ciphertext subset; and using the statistics Information to calculate the feature engineering index of the feature engineering process performed on the second data set.
- the method further includes: generating a feature engineering result according to the feature engineering index; and sending the feature engineering result to the first device.
- the feature engineering processing includes performing feature selection on a second data set to generate a feature data subset of the second data set, wherein calculating the feature engineering index includes using the feature data subset and the statistical information to calculate Feature selection index.
- the feature engineering processing includes binning a second data set to generate a plurality of binning segments, and the ciphertext subset includes a plurality of ciphertext subsets corresponding to the multiple binning segments, Each ciphertext subset includes the label information ciphertext of the data objects in the corresponding binning segment in the first data set, and calculating the feature engineering index includes using the binning segment of the second data set and the Statistics to calculate binning indicators.
- the ciphertext of the label information of the first data set is generated by encrypting the label information using homomorphic encryption
- the label information is a binary value
- the ciphertext of the ciphertext subset is sent
- Providing the first device includes: performing a homomorphic addition on the ciphertext in the ciphertext subset to obtain a ciphertext sum and sending the ciphertext sum to the first device.
- the data objects in the first data set and the second data set respectively have associated identifiers
- the method further includes comparing the first data set and the second data set before generating a subset of the second data set.
- the two data sets are matched with identifiers, so that the label information of the first data set and the characteristic data of the second data set correspond to the same multiple data objects.
- the statistical information includes the number of positive samples and/or the number of negative samples of the ciphertext subset.
- the feature engineering processing of the second data set occurs before, during, or after receiving the first data set.
- the feature engineering index includes at least one of the following: a positive sample rate of a subset of the second data set, a negative sample rate of a subset of the second data set, and a The correlation between the subset and the tag information in the ciphertext subset, the information value of the subset of the second data set, and the evidence weight of the subset of the second data set.
- a feature engineering method which includes: providing a first data set, the first data set containing a ciphertext of tag information of a plurality of data objects; and receiving a ciphertext subscript of the first data set
- the ciphertext of the set, the ciphertext subset is generated according to feature engineering processing performed on the second data set, the second data set contains the feature data of the multiple data objects, and the feature data performed on the second data set
- the engineering process generates a subset of the second data set, where the ciphertext subset includes the tag information ciphertext of the same data object in the first data set as the subset of the second data set; decrypting the ciphertext sub-set Collecting ciphertexts of the set and generating statistical information of the ciphertext subset; and providing the statistical information for calculating the feature engineering index of the feature engineering processing of the second data set.
- the method further includes: receiving a first feature engineering result generated according to the feature engineering index.
- the method further includes: using the label information of the first data set and the feature data of the third data set to perform the feature engineering process to generate a second feature engineering result; and combining the first feature engineering result And the second feature engineering result to obtain a combined feature engineering result.
- the feature engineering processing includes performing feature selection on a second data set to generate a feature data subset of the second data set, wherein calculating the feature engineering index includes using the feature data subset and the statistical information to calculate Feature selection index.
- the feature engineering processing includes binning a second data set to generate a plurality of binning segments, and the ciphertext subset includes a plurality of ciphertext subsets corresponding to the multiple binning segments, Each ciphertext subset includes the label information ciphertext of the data objects in the corresponding binning segment in the first data set, and the calculation feature engineering index includes using the binning segment and all the binning segments of the second data set. The statistical information is used to calculate the binning index.
- the ciphertext of the tag information of the first data set is generated by encrypting the tag information using homomorphic encryption
- the tag information is a binary value
- the ciphertext of the ciphertext subset includes The sum of ciphertexts obtained by homomorphic addition of ciphertexts in the ciphertext subset.
- the data objects in the first data set and the second data set respectively have associated identifiers
- the method further includes comparing the first data set and the second data set before generating a subset of the second data set.
- the two data sets are matched with identifiers, so that the label information of the first data set and the characteristic data of the second data set correspond to the same multiple data objects.
- the statistical information includes the number of positive samples and/or the number of negative samples of the ciphertext subset.
- the feature engineering index includes at least one of the following: a positive sample rate of a subset of the second data set, a negative sample rate of a subset of the second data set, and a The correlation between the subset and the tag information in the ciphertext subset, the information value of the subset of the second data set, and the evidence weight of the subset of the second data set.
- a feature engineering device which includes: a transmission module that receives a first data set, the first data set containing ciphertext of tag information of multiple data objects; a feature engineering processing module , Which performs feature engineering processing on the second data set to generate a subset of the second data set, the second data set contains the feature data of the multiple data objects; and a ciphertext subset generation module, which is based on the second data
- the data objects contained in the subset of the set are used to generate the ciphertext subset of the tag information of the corresponding data object in the first data set; wherein the transmission module sends the ciphertext of the ciphertext subset to the first device and from the first data set.
- a device receives statistical information generated after decrypting the ciphertext of the ciphertext subset; and the feature engineering processing module uses the statistical information to calculate feature engineering indicators for feature engineering processing performed on the second data set.
- the feature engineering processing module generates a feature engineering result according to the feature engineering index; and the transmission module sends the feature engineering result to the first device.
- the feature engineering process includes feature selection or binning.
- the statistical information includes the number of positive samples and/or the number of negative samples of the ciphertext subset.
- a feature engineering device which includes: a transmission module that provides a first data set to a second device, the first data set containing ciphertext of tag information of multiple data objects, The transmission module also receives the ciphertext of the ciphertext subset of the first data set from the second device, the ciphertext subset is generated according to feature engineering processing performed on the second data set, and the second data set contains the Feature data of a plurality of data objects, where feature engineering processing on the second data set generates a subset of the second data set, wherein the ciphertext subset includes the difference between the first data set and the second data set
- the tag information ciphertext of the same subset of data objects an encryption and decryption module, which decrypts the ciphertext of the ciphertext subset; and a processing module, which generates statistical information of the ciphertext subset, wherein the transmission module sends the second
- the device provides the statistical information for the second device to use to calculate feature
- the transmission module receives the first feature engineering result generated according to the feature engineering index from the second device, and the feature engineering device further includes: a feature engineering processing module that uses the first data set To perform the feature engineering process to generate a second feature engineering result, and to combine the first feature engineering result and the second feature engineering result to obtain a combined feature engineering result.
- the feature engineering process includes feature selection or binning.
- the statistical information includes the number of positive samples and/or the number of negative samples of the ciphertext subset.
- a feature engineering system which includes: a processor; a memory for storing processor-executable instructions, wherein the processor is configured to execute the processor-executable instructions To achieve the method described above.
- the partners do not need to leak their own private data plaintext, but can finally complete the feature engineering processing, thereby improving the security of the feature engineering processing.
- Fig. 1 is a flowchart of a feature engineering method according to an embodiment of the present disclosure
- Figure 2 is a schematic diagram of a feature engineering method according to an embodiment of the present disclosure
- Fig. 3 is a schematic diagram of a feature engineering method according to another embodiment of the present disclosure.
- Fig. 4 is a schematic diagram of a feature engineering method according to another embodiment of the present disclosure.
- Fig. 5 is a block diagram of a feature engineering device according to an embodiment of the present disclosure.
- the present disclosure provides safe feature engineering methods and devices.
- a joint modeling scenario there is generally a situation where one party has feature data and the other party has label information but no or a small amount of incomplete feature data. This requires the collaboration of the sample data of the modeling partners to complete feature engineering processing .
- the first device may transmit a first data set to the second device, and the first data set contains ciphertext of tag information of multiple data objects.
- the second device may perform feature engineering processing on the second data set containing the feature data of the multiple data objects to generate a subset of the second data set.
- the second device may generate the ciphertext subset of the label information of the corresponding data object in the first data set according to the subset of the second data set, and send the ciphertext of the ciphertext subset to the first device.
- the first device can decrypt the ciphertext subset and generate statistical information, and send the statistical information to the second device.
- the second device can use the statistical information to calculate feature engineering indicators.
- the distributed feature engineering and index calculation of the present disclosure make it unnecessary for the cooperating parties to leak the plaintext of their own private data, but can finally complete feature engineering processing, and realize a secure feature engineering method and device.
- Fig. 1 is a flowchart of a feature engineering method according to an embodiment of the present disclosure. The method may be executed at the second device, for example.
- Step 102 The second device receives a first data set, where the first data set contains ciphertexts of tag information of multiple data objects.
- the first device can request the second device to perform feature engineering processing, and the first device can send the first data set to the second device, where the sent first data set contains the ciphertext of the tag information of multiple data objects .
- the second device needs to perform feature engineering processing and may request the first device to provide a first data set containing tag information.
- the second device can have a second data set containing feature data, and can combine the first data set and the second data set to perform feature engineering processing, such as feature selection, feature extraction, and feature discretization (Such as binning) etc.
- Feature data can represent information such as the characteristics or behavior of the object, such as the user's age, height, and consumption history.
- the label information can identify the category of the object, such as whether the user is a student, whether the user is a dishonest person, and so on.
- the label information can be a binary value, for example, 1 and 0 are used to represent positive samples and negative samples, or 0 and -1 are used to represent positive samples and negative samples, or to distinguish between positive samples and negative samples in other ways. sample.
- the second device may combine the label information of the first data set with the feature data of the second data set to perform feature engineering processing
- the first device that owns the first data set may not want to transfer the first data set.
- the specific value of the tag information of the data set is leaked to the second device.
- the first data set sent by the first device to the second device contains the cipher text of the tag information of the multiple data objects, instead of the plain text information of the tag information.
- the first device can use the key to encrypt the label information of each data object in the first data set one by one to generate the ciphertext of the label information, or the first device can receive the ciphertext of the label information encrypted by a third party The first data set.
- the first device can decrypt the ciphertext of the first data set, while the second device cannot decrypt the ciphertext of the first data set. Therefore, even if the first device sends the tag information ciphertext of the first data set to the second device, the second device does not know the specific tag information value of each data object.
- the first device may directly send the first data set containing the ciphertext to the second device, or may forward the first data set to the second device via the intermediate device.
- the first device may upload the first data set to the cloud (such as Ali OSS or open source sftp, etc.) for the second device to download, or it may perform point-to-point transmission of large files through the network and provide it to the second device.
- the second device may receive the first data set from the intermediate device (for example, the cloud), or receive the first data set from the anonymous party, or obtain the first data set containing the ciphertext in other ways.
- Step 104 The second device performs feature engineering processing on the second data set to generate a subset of the second data set.
- the second data set may contain characteristic data of multiple data objects.
- the second device can perform feature engineering processing such as data cleaning, data filtering, feature discretization, feature extraction, and feature selection on the feature data of multiple data objects contained in the second data set to generate a subset of the second data set.
- the subset may include characteristic data of some data objects in the second data set.
- the feature engineering processing of the second data set may be performed before or after step 102.
- the second device with the second data set can autonomously perform feature engineering processing on the second data set at any time, or after receiving a feature engineering processing request (and/or the first data set) from the first device Perform feature engineering processing on the second data set.
- Step 106 The second device generates a ciphertext subset of the label information of the corresponding data object in the first data set according to the data objects contained in the subset of the second data set.
- the first data set (e.g., containing tag information) can be used in combination with the second data set (e.g., containing feature data) for feature engineering processing.
- the tag information in the first data set received by the second device is encrypted (that is, in the form of ciphertext), and the second device may not be able to decrypt the ciphertext of the first data set.
- the specific value of the label information of the first data set is not known. Take characteristic data and encrypted label information as an example. Because the second device does not know the specific value of the label information, it cannot directly use the characteristic data of the second data set and the encrypted label information in the first data set to combine Perform feature engineering processing.
- the tag information of the first data set and the feature data of the second data set may correspond to the same multiple data objects.
- the tag information possessed by the first device and the characteristic data possessed by the second device may each have an identifier (id), and the first device and the second device may perform identifier matching to generate respectively at the first device
- the first data set and the second data set are generated at the second device, so that the label information of the first data set and the feature data of the second data set correspond to the same multiple data objects.
- the first device may send the first data set to the second data set in step 102, and the first data set may include the ciphertext of the tag information of the plurality of data objects and the associated identifier.
- the second device may generate the ciphertext subset of the label information of the corresponding data object in the first data set according to the identifiers according to the data objects contained in the subset of the second data set.
- the two data sets can be arranged in the same order according to the identifiers.
- the data for example, makes each piece of data of the first data set and the second data set correspond to each other, wherein each piece of data may correspond to a different object. If the data objects of the first data set and the second data set are sorted in the same way, the first data set sent by the first device to the second device may not necessarily include an identifier.
- the second device may generate the ciphertext subset of the label information of the corresponding data object in the first data set according to the corresponding relationship between the two data sets and according to the data objects contained in the subset of the second data set.
- the second device may generate a ciphertext subset of the label information of the corresponding data object in the first data set according to the data objects contained in the subset of the second data set in step 106.
- the feature engineering processing of the second data set may include selecting a feature data subset of the second data set, and the second device may generate a first data object corresponding to the data objects contained in the feature data subset.
- the feature engineering processing of the second data set may include binning the feature data to generate multiple binning segments, so that the second device can generate the first data set corresponding to the multiple binning segments.
- the second device can determine which binning segment the corresponding data object in the first data set falls in according to the binning of the feature data of the second data set, and generate the first data set according to the binning segment.
- the second device may generate a ciphertext subset of the label information in the first data set, and may know the total number of label information in the ciphertext subset.
- the label information of the first data set is encrypted, and the second device does not know the value of the label information, so that the index calculation of the feature engineering process cannot be completed.
- the second device does not know which label information in the ciphertext subset is a positive sample and which label information is a negative sample, so it does not know the number of positive samples and negative samples of label information in each binning segment.
- the number of samples, the binning index cannot be calculated, such as IV (Information Value), Woe (Weight of Evidence, weight of evidence), etc.
- Step 108 The second device sends the ciphertext of the ciphertext subset to the first device, and receives from the first device the statistical information generated after decrypting the ciphertext of the ciphertext subset.
- the ciphertext of the ciphertext subset sent by the second device to the first device may be the ciphertext set of each tag information in the ciphertext subset, or a certain operation or operation (for example, combination, The ciphertext obtained after cascading, algebraic operations, etc.).
- the first device may be the owner of the first data set and can decrypt the ciphertext of the tag information.
- the first device can decrypt the ciphertext of the ciphertext subset and generate statistical information (for example, the number of positive samples and/or the number of negative samples of the ciphertext subset), and can send the statistical information to the second equipment.
- the statistical information sent by the first device is different from the decrypted value of the tag information ciphertext of the first data set, so that the tag information value of the first data set will not be disclosed.
- the second device may send multiple ciphertext subsets corresponding to multiple binning segments to the first device, and the ciphertext of each ciphertext subset may include the ciphertext in the first data set.
- the first device can decrypt the ciphertext of the label information corresponding to each binning segment, and obtain the statistical information of the label information corresponding to each binning segment (for example, the number of positive samples and/or the label information corresponding to each binning segment). Or negative sample number) as the above statistical information sent to the second device.
- the first device can similarly decrypt the ciphertext of each ciphertext subset and generate statistical information required for feature engineering processing to send to the second device.
- the ciphertext of the tag information of the first data set may be generated by encrypting the tag information using Homomorphic Encryption.
- Homomorphic encryption allows specific algebraic operations to be performed on the ciphertext after homomorphic encryption to obtain the result of the operation that is still encrypted, and the operation result obtained by decrypting it is the same as the operation result obtained by performing the same operation on the plaintext.
- this technology allows people to perform operations such as retrieval and comparison in the encrypted data to get the correct result without decrypting the data during the entire processing.
- the second device may perform homomorphic addition on the ciphertext in the ciphertext subset to obtain the ciphertext sum, and send the ciphertext sum to the first device.
- the value obtained by the first device decrypting the ciphertext sum is equivalent to the value obtained by the first device decrypting and summing each tag information ciphertext in the ciphertext subset.
- the first device can decrypt the ciphertext sum, and the decryption result can indicate the number of positive samples and/or the number of negative samples.
- Step 110 The second device uses the statistical information to calculate the feature engineering index of the feature engineering process of the second data set.
- Feature engineering indicators can be used to evaluate the results of feature engineering processing.
- Feature engineering indicators can be selected according to specific feature engineering processing, such as the positive sample rate of the subset of the second data set, the negative sample rate of the subset of the second data set, the subset of the second data set and the ciphertext subset The relevance of the label information, the information value of the subset of the second data set, the weight of evidence of the subset of the second data set, etc.
- the second device can obtain the feature engineering index of the subset according to the subset of the second data set and corresponding statistical information.
- the statistical information can be the statistical value of label information for each binning segment.
- the second device can use the statistical value received from the first device and combine it with the second device when binning the characteristic data.
- the obtained binning segment information is used for binning index calculation. If the feature engineering index meets the requirement (for example, the threshold), the second device can generate the feature engineering processing result and complete the feature engineering processing.
- the generated feature engineering processing results (for example, feature data subsets) can be used for various purposes, such as model training, target prediction, and so on.
- the second device may send the feature engineering result to the first device.
- the second device may repeat steps 104-110 until the required feature engineering index is obtained or the condition for terminating the feature engineering process is reached.
- the partners do not need to disclose the plaintext of their private data, but can finally complete the feature engineering processing.
- the following describes the application scenarios of the present disclosure in further detail with reference to FIGS. 2-4.
- Fig. 2 is a schematic diagram of a feature engineering method according to an embodiment of the present disclosure.
- a feature selection scenario in which the first device has tag information Y (first data set) and the second device has feature data X (second data set) is taken as an example for description.
- tag information Y (first data set) and the feature data X (second data set) correspond to the same multiple data objects (for example, by performing identifier matching).
- the goal of feature selection is to find the optimal feature subset.
- Feature selection can eliminate irrelevant or redundant features, so as to reduce the number of features, reduce the dimensionality of the data set, improve model accuracy, and reduce running time.
- feature selection can be used to select a simplified model of truly relevant features to help understand the process of data generation.
- the first device may encrypt Y samples in the first data set and generate encrypted Y'samples.
- the first device may send the encrypted Y'sample to the second device.
- the first device may further compress the encrypted Y'sample before sending, and send the compressed encrypted Y'sample to the second device. If the amount of Y'sample data is large, consider uploading the ciphertext file to a secure cloud accessible by both parties (such as oss, etc.).
- the first device may encrypt the Y samples in the first data set one by one to generate the ciphertext Y'of the Y samples.
- the first device can use the key to encrypt the Y samples in the first data set one by one with any suitable encryption algorithm, and send the Y'samples (for example, uncompressed or compressed) to the second device.
- homomorphic encryption Homomorphic Encryption
- homomorphic Encryption may be used to perform full homomorphic encryption on the Y samples in the first data set one by one.
- the second device may receive the encrypted Y'sample.
- the second device may obtain the encrypted Y'sample from the first device or other intermediate parties (for example, cloud such as oss). If the Y'sample is compressed, the second device can decompress the Y'sample.
- the second device may select a subset of X samples (e.g., characteristic data) that are locally owned. It should be understood that the second device may select the X sample subset according to various criteria or combinations. In addition, the second device may select one or more X sample subsets and evaluate the one or more X sample subsets sequentially or in parallel.
- X samples e.g., characteristic data
- step 208 is executed after step 206, it should be understood that step 208 can be executed before or after any of steps 202-206, or concurrently with any of steps 202-206. To execute.
- the second device may read the corresponding Y'sample subset according to the selected X sample subset. Similar to the above, the id of the X sample and the id of the Y sample can match, so that the X sample and the Y sample have a corresponding relationship. Thus, the second device can read the Y'sample subset of the corresponding id according to the selected X sample subset. As described above, since the Y'samples are encrypted, the second device does not know the value of the Y'samples, so the Y'sample subset may include encrypted Y'samples (including ciphertext).
- the second device may send the ciphertext of the Y'sample subset to the first device for decryption.
- the ciphertext of the Y'sample subset sent in step 212 may include each set of Y'samples included in the Y'sample subset.
- the first device decrypts the ciphertext of the Y'sample subset. For example, the first device may decrypt each Y'sample included in the subset to obtain a decrypted Y sample.
- the first device may generate statistical information about feature selection after decrypting the ciphertext of the Y'sample subset. For example, the first device can decrypt the value of each Y'sample, and thereby obtain statistical information (such as the number of positive samples, the number of negative samples, etc.) for evaluating the feature selection subset.
- the second device can perform homomorphic addition on each Y'sample of the Y'sample subset to obtain the ciphertext sum, And in step 212, the ciphertext sum is sent to the first device, instead of sending the Y′ sample subset to the first device in its entirety.
- the first device can decrypt the ciphertext sum in step 214 and directly generate statistical information.
- the sum of homomorphic ciphertexts of the Y'sample subset is the sum of ciphertexts of all 1, and the sum of ciphertexts is the number of all positive samples after being decrypted .
- the sum of homomorphic ciphertexts of the Y'sample subset can be decrypted to obtain the number of negative samples.
- the first device may send the statistical information of the Y'sample subset to the second device. It should be understood that the statistical information of the sample subset of Y'sent by the first device will not reveal the value of sample Y.
- the second device may calculate feature selection indicators based on the statistical information, such as the positive sample rate of the X sample subset, the negative sample rate of the X sample subset, the X sample subset and the prediction target (for example, the Y sample is Positive or negative) correlation degree, information value of X sample subset, evidence weight of X sample subset, etc.
- the second device may return from step 220 to step 208 to select one or more subsets of X samples of the next group for evaluation.
- the second device may generate a feature selection result and complete the feature selection.
- the second device may send the feature selection result to the first device. Accordingly, in optional step 226, the first device may receive the feature selection result from the second device.
- Fig. 3 is a schematic diagram of a feature engineering method according to another embodiment of the present disclosure.
- a binning scenario in which the first device (for example, the demander) has label information Y (first data set), and the second device (for example, the data party) has characteristic data X (second data set) Take an example.
- the label information Y (first data set) and the feature data X (second data set) correspond to the same multiple data objects.
- Binning is a commonly used method of data preprocessing, which is divided into sub-intervals according to attribute values. If an attribute value is within a certain sub-interval range, it is said that the data to be processed (a column of attribute values) should be processed according to a certain Put the rules in some boxes, examine the data in each box, and use a certain method to process the data in each box separately.
- the binning can include equal depth binning method, equal width binning method, minimum entropy method and user-defined interval method.
- Steps 302-306 in FIG. 3 are similar to steps 202-206 in FIG. 2 and will not be repeated here.
- the second device may bin the locally owned X samples (for example, characteristic data).
- FIG. 3 shows that step 308 is performed after step 306, it should be understood that the binning of step 308 can be performed before or after any one of steps 302-306, or it can be combined with any of steps 302-306.
- One step is executed concurrently.
- the binning of X samples at step 308 may be performed in advance (for example, before step 302). In other embodiments, the binning of X samples may be performed after step 306 (or after receiving a binning request from the first device).
- step 310 the second device reads the corresponding Y'sample subset in units of binning segments of X samples.
- the id of the X sample and the id of the Y sample can be matched at any time before step 308, so that the X sample and the Y sample have a corresponding relationship.
- the encrypted Y'sample sent by the first device to the second device has an associated identifier (id)
- the local X sample of the second device has an associated identifier.
- the identifiers are matched (for example, corresponding to the same set of objects).
- the second device can determine which binning segment the corresponding id falls in according to the binning of the X samples, and read the Y'samples corresponding to each id according to the binning segment.
- the identifier of the encrypted Y'sample sent by the first device to the second device may be encrypted (e.g., hashed) or not.
- the first device and the second device are matched first, so that the X samples and Y'samples are sorted in a specific way (for example, each item of data corresponds to one to one)
- the first device sends the The encrypted Y'sample of the second device may not include id information, and the second device can directly read the corresponding Y'sample according to the binning of the X sample.
- the second device may send the ciphertext of the Y'sample subset corresponding to each binning segment to the first device.
- the ciphertext of a plurality of Y'sample subsets may be sent in step 312, wherein the ciphertext of each Y'sample subset may include a set of Y'samples corresponding to the corresponding binning segment.
- the ciphertext of each Y'sample subset sent in step 312 may include performing the same procedure on the Y'sample corresponding to the bin segment. The sum of ciphertexts obtained by state addition.
- the first device decrypts the ciphertext of the Y'sample subset corresponding to each bin segment.
- the first device may be the device that encrypted Y and can decrypt Y', or even if the encryption is not performed by the first device, the first device has key authority and can thus decrypt Y'.
- the first device may decrypt each Y'sample included in the Y'sample subset, or decrypt the homomorphic ciphertext sum if the subset contains the homomorphic ciphertext sum. If the Y'sample is a binary value and is encrypted by homomorphic encryption, decrypting the ciphertext sum can directly obtain the number of positive samples or the number of negative samples.
- the first device may generate statistical information about each binning segment after decrypting the ciphertext of the Y'sample subset corresponding to each binning segment. For example, the first device can decrypt the value of each Y'sample of each bin segment, and thereby obtain parameters such as the number of positive samples, the number of negative samples, and/or the total number of samples in each bin segment.
- the ciphertext of the Y'sample subset sent at step 312 contains the sum of homomorphic ciphertext
- decrypting the sum of homomorphic ciphertext provides the number of positive samples or the number of negative samples of each bin segment. . For example, if 1 and 0 are used to represent positive samples and negative samples, the sum of homomorphic ciphertexts is the number of all positive samples.
- the first device may send statistical information of each bin segment (for example, Y sample statistical information, such as the number of positive samples, the number of negative samples, and/or the total number of samples, etc.) to the second device. It should be understood that the statistical information of each bin segment sent by the first device will not reveal the value of sample Y.
- Y sample statistical information such as the number of positive samples, the number of negative samples, and/or the total number of samples, etc.
- the second device may calculate a binning index based on the statistical information. For example, the second device may use the statistical value of each binning segment received from the first device to perform binning index calculation in combination with other information obtained by the second device when binning the characteristic data X, such as each X
- step 322 in the case that the binning index is valid (for example, reaching a threshold), the second device may generate a binning result and complete binning. In the case that the binning index is not ideal, the second device may repeat steps 308-320 to perform binning again and perform binning index calculation.
- the second device may send the binning result to the first device.
- the first device may receive the binning result from the second device.
- Fig. 4 is a schematic diagram of a feature engineering method according to another embodiment of the present disclosure.
- one party for example, the first device
- the other party for example, the second device
- the feature data X1 and the feature data X2 may be the same as each other, partially the same, or different from each other.
- the tag information Y first data set
- the feature data X1 second data set
- the feature data X2 third data set
- the first device may send the encrypted label information Y'to the second device as shown in FIG. 3 to combine the characteristic data X1 for binning, and may also perform local binning for the characteristic data X2 and the label information Y locally.
- the first device and the second device may perform binning according to the characteristic data X1 and the label information Y'as described with reference to steps 302-322 in FIG. 3 and generate the first binning result.
- the second device may send the first binning result to the first device.
- the first device may perform binning on the feature data X2 and the unencrypted tag information Y locally to obtain a second binning result. It should be noted that the local binning performed by the first device in step 426 may be performed before or after any of steps 402-424, or in parallel with any of the steps.
- the first device may combine the first binning result and the second binning result to obtain a combined binning result.
- the feature selection and binning in feature engineering processing are used as examples to introduce distributed feature engineering and index calculation, so that the partners do not need to leak their own private data plaintext, but can finally complete the feature engineering processing.
- Those skilled in the art can widely apply the distributed feature engineering method and device of the present disclosure to occasions where the modeling sample data of all parties need to be fused together for processing, such as data cleaning and feature discreteness. Transformation, feature extraction, feature selection, etc.
- Fig. 5 shows a block diagram of a feature engineering device according to an embodiment of the present disclosure.
- the first device 510 may perform the above-described operations on the first device
- the second device 520 may perform the above-described operations on the second device.
- the first device 510 may include an encryption and decryption module 512, a transmission module 514, and a processing module 516.
- the encryption and decryption module 512 can encrypt the tag information of the first data set to generate a ciphertext.
- the transmission module 514 may transmit the first data set containing the cipher text of the tag information to the second device 520 or other devices or the cloud.
- the second device 520 may include a transmission module 522, a feature engineering processing module 524, and a ciphertext subset generation module 526.
- the transmission module 522 may receive the first data set containing the ciphertext of the tag information.
- the second device 520 may have a second data set (for example, stored in a memory), and the second data set includes characteristic data of a plurality of data objects.
- the feature engineering processing module 524 may perform feature engineering processing on the second data set to generate a subset of the second data set.
- the label information of the first data set and the feature data of the second data set may correspond to the same multiple data objects.
- the ciphertext subset generating module 526 may generate the ciphertext subset of the label information of the corresponding data object in the first data set according to the data objects contained in the subset of the second data set.
- the transmission module 522 may further send the ciphertext of the ciphertext subset to the first device.
- the transmission module 514 can receive the ciphertext of the ciphertext subset and pass it to the encryption and decryption module 512, and the encryption and decryption module 512 can decrypt the ciphertext of the ciphertext subset.
- the processing module 516 may generate statistical information for feature engineering processing, such as the number of positive samples, the number of negative samples, and the total number of samples, according to the decrypted data of the ciphertext of the ciphertext subset.
- the transmission module 514 can provide the statistical information to the second device 520.
- the transmission module 522 receives the statistical information and provides it to the feature engineering processing module 524.
- the feature engineering processing module 524 can use the statistical information to calculate the feature engineering index of the feature engineering process performed on the second data set and complete the feature engineering process.
- the transmission module 522 may also send the feature engineering process result to the first device 510.
- the first device 510 may optionally include a feature engineering processing module 518, which may use the unencrypted label information of the first data set and the third data set (for example, containing the feature data X2) to execute Feature engineering processing to generate a second feature engineering result.
- the label information of the first data set and the feature data of the third data set may correspond to the same multiple data objects.
- the first device 510 may also combine the above-mentioned feature engineering result generated by the second device 520 and the second feature engineering result to obtain a combined feature engineering result.
- the processing module 516 and the feature engineering processing module 518 may be implemented together or separately.
- the data cooperation parties of the joint modeling do not output the private data plaintext, but finally obtain the feature engineering processing result, which prevents the leakage of private data and solves the data cooperation Privacy data leakage and data trust issues in the process.
- the steps and modules of the feature engineering method and device described above can be implemented by hardware, software, or a combination thereof. If implemented in hardware, the various illustrative steps, modules, and circuits described in this disclosure can be used with general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), Or other programmable logic components, hardware components, or any combination thereof to realize or execute.
- DSP digital signal processors
- ASIC application-specific integrated circuits
- FPGA field programmable gate arrays
- a general-purpose processor may be a processor, microprocessor, controller, microcontroller, or state machine, etc. If implemented in software, various illustrative steps and modules described in conjunction with the present disclosure can be stored on a computer-readable medium or transmitted as one or more instructions or codes.
- the software modules that implement various operations of the present disclosure may reside in storage media, such as RAM, flash memory, ROM, EPROM, EEPROM, registers, hard disks, removable disks, CD-ROM, cloud storage, and so on.
- the storage medium may be coupled to the processor so that the processor can read and write information from/to the storage medium, and execute corresponding program modules to implement various steps of the present disclosure.
- the software-based embodiments can be uploaded, downloaded or remotely accessed through appropriate communication means.
- suitable communication means include, for example, the Internet, World Wide Web, Intranet, software applications, cables (including fiber optic cables), magnetic communication, electromagnetic communication (including RF, microwave, and infrared communication), electronic communication, or other such communication means.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Bioethics (AREA)
- Testing And Monitoring For Control Systems (AREA)
- Storage Device Security (AREA)
Abstract
本公开提供了一种安全的特征工程方法和装置。第一设备可向第二设备传送第一数据集,第一数据集包含多个数据对象的标签信息的密文。第二设备可对包含该多个数据对象的特征数据的第二数据集进行特征工程处理以生成第二数据集的子集。第二设备可根据第二数据集的子集来生成第一数据集之中相应数据对象的标签信息的密文子集,将密文子集的密文发送给第一设备。第一设备可解密该密文子集并生成统计信息,将该统计信息发送给第二设备。第二设备可使用该统计信息来计算特征工程指标。本公开还提供了相应的特征工程装置。
Description
本公开涉及特征工程,尤其涉及一种安全的特征工程方法和装置。
建模过程需要对样本数据先进行基本的特征工程处理,然后用经过特征工程处理的数据集进行模型训练。特征工程是指从原始数据转换为特征向量的过程。特征工程是机器学习中最重要的起始步骤,会直接影响机器学习的效果,并通常需要大量的时间。典型的特征工程包括数据清理、特征离散化、特征提取、特征选择等过程。在大数据场景下,数据通常是分布式存储的,而特征工程处理需要把各方的建模样本数据融合在一起。例如,在进行数据分箱时,需要特征数据和标签信息配合才能完成。而在联合建模场景中,一般存在其中一方拥有特征数据,另一方拥有标签信息而没有或有少量不齐全的特征数据的情况,这就需要建模合作方的样本数据共同协作来完成特征工程处理,例如分箱及分箱指标统计。因此,在进行联合建模的场景中,数据合作双方需要把建模的样本数据融合在一起,才能进行特征工程处理。但这样做,数据合作双方的样本数据需要对外输出,存在隐私数据泄漏问题。
现有技术中解决上述问题的一种方案是将数据集中到其中一方进行数据融合,并进一步做特征工程处理。这种方案的缺点是不安全,完全暴露了隐私数据明文,泄漏了数据隐私,而且还存在数据被恶意传播或售卖等风险。
现有技术中解决上述问题的另一种方案是寻找一个安全可信的第三方,在安全环境中导入各方数据,在一个安全沙箱环境的公有云/第三方等环境中进行数据融合,集中进行特征工程处理。这种方案的缺点是数据明文仍然需要对外输出,不能完全杜绝隐私数据的泄漏问题,也不能解决本身的数据信任问题。此外,完全可信的第三方难求,数据/模型导入到可信第三方的传输过程中也有数据传输安全隐患。不仅如此,在可信第三方存在操作权限问题,对数据出入的安全检查粒度难把控,特征工程处理结果也可能被泄漏。
因此,本领域需要一种安全的特征工程方法和装置。
发明内容
本公开提供了安全的特征工程方法和装置,使得合作方均不必泄漏自己的隐私数据明文,但最终能完成特征工程处理。例如,第一设备可向第二设备传送第一数据集,第一数据集包含多个数据对象的标签信息的密文。第二设备可对包含该多个数据对象的特征数据的第二数据集进行特征工程处理以生成第二数据集的子集。第二设备可根据第二数据集的子集来生成第一数据集之中相应数据对象的标签信息的密文子集,将密文子集的密文发送给第一设备。第一设备可解密该密文子集并生成统计信息,将该统计信息发送给第二设备。第二设备可使用该统计信息来计算特征工程指标。
根据本公开的一个实施例,提供了一种特征工程方法,其包括:接收第一数据集,第一数据集包含多个数据对象的标签信息的密文;对第二数据集进行特征工程处理以生成第二数据集的子集,第二数据集包含所述多个数据对象的特征数据;根据所述第二数据集的子集中所包含的数据对象来生成第一数据集之中相应数据对象的标签信息的密文子集;将所述密文子集的密文发送给第一设备;从第一设备接收在解密所述密文子集的密文后生成的统计信息;以及使用所述统计信息来计算对第二数据集进行的特征工程处理的特征工程指标。
在一方面,该方法还包括:根据所述特征工程指标来生成特征工程结果;以及将所述特征工程结果发送给第一设备。
在一方面,所述特征工程处理包括对第二数据集进行特征选择以生成第二数据集的特征数据子集,其中计算特征工程指标包括利用所述特征数据子集与所述统计信息来计算特征选择指标。
在一方面,所述特征工程处理包括对第二数据集进行分箱以生成多个分箱段,并且所述密文子集包括与所述多个分箱段相对应的多个密文子集,其中每个密文子集包括第一数据集之中的落在相应分箱段中的数据对象的标签信息密文,其中计算特征工程指标包括利用所述第二数据集的分箱段与所述统计信息来计算分箱指标。
在一方面,第一数据集的标签信息的密文是使用同态加密对所述标签信息进行加密来生成的,所述标签信息为二元值,并且将所述密文子集的密文发送给第一设备包括:对所述密文子集中的密文进行同态加法以得到密文总和并将所述密文总和发送给第一设备。
在一方面,第一数据集和第二数据集之中的数据对象分别具有相关联的标识符,所 述方法还包括在生成所述第二数据集的子集之前对第一数据集和第二数据集进行标识符匹配,以使得第一数据集的标签信息与第二数据集的特征数据对应于相同的多个数据对象。
在一方面,所述统计信息包括所述密文子集的正样本数、和/或负样本数。
在一方面,对第二数据集进行特征工程处理是在接收第一数据集之前、之时、或之后发生的。
在一方面,所述特征工程指标包括以下至少一者:所述第二数据集的子集的正样本率、所述第二数据集的子集的负样本率、所述第二数据集的子集与所述密文子集中的标签信息的相关度、所述第二数据集的子集的信息价值、所述第二数据集的子集的证据权重。
根据本公开的另一个实施例,提供了一种特征工程方法,其包括:提供第一数据集,第一数据集包含多个数据对象的标签信息的密文;接收第一数据集的密文子集的密文,所述密文子集是根据对第二数据集进行的特征工程处理来生成的,第二数据集包含所述多个数据对象的特征数据,其中对第二数据集进行的特征工程处理生成第二数据集的子集,其中所述密文子集包含第一数据集之中的与所述第二数据集的子集相同的数据对象的标签信息密文;解密所述密文子集的密文并生成所述密文子集的统计信息;以及提供所述统计信息以用于计算对第二数据集的特征工程处理的特征工程指标。
在一方面,所述方法还包括:接收根据所述特征工程指标生成的第一特征工程结果。
在一方面,所述方法还包括:使用所述第一数据集的标签信息和第三数据集的特征数据来执行所述特征工程处理以生成第二特征工程结果;以及组合第一特征工程结果和第二特征工程结果以获得组合的特征工程结果。
在一方面,所述特征工程处理包括对第二数据集进行特征选择以生成第二数据集的特征数据子集,其中计算特征工程指标包括利用所述特征数据子集与所述统计信息来计算特征选择指标。
在一方面,所述特征工程处理包括对第二数据集进行分箱以生成多个分箱段,并且所述密文子集包括与所述多个分箱段相对应的多个密文子集,其中每个密文子集包括第一数据集之中的落在相应分箱段中的数据对象的标签信息密文,所述计算特征工程指标包括利用所述第二数据集的分箱段与所述统计信息来计算分箱指标。
在一方面,第一数据集的标签信息的密文是使用同态加密对所述标签信息进行加密 来生成的,所述标签信息为二元值,所述密文子集的密文包括将所述密文子集中的密文进行同态加法得到的密文总和。
在一方面,第一数据集和第二数据集之中的数据对象分别具有相关联的标识符,所述方法还包括在生成所述第二数据集的子集之前对第一数据集和第二数据集进行标识符匹配,以使得第一数据集的标签信息与第二数据集的特征数据对应于相同的多个数据对象。
在一方面,所述统计信息包括所述密文子集的正样本数、和/或负样本数。
在一方面,所述特征工程指标包括以下至少一者:所述第二数据集的子集的正样本率、所述第二数据集的子集的负样本率、所述第二数据集的子集与所述密文子集中的标签信息的相关度、所述第二数据集的子集的信息价值、所述第二数据集的子集的证据权重。
根据本公开的另一个实施例,提供了一种特征工程装置,其包括:传输模块,其接收第一数据集,第一数据集包含多个数据对象的标签信息的密文;特征工程处理模块,其对第二数据集进行特征工程处理以生成第二数据集的子集,第二数据集包含所述多个数据对象的特征数据;以及密文子集生成模块,其根据所述第二数据集的子集中所包含的数据对象来生成第一数据集之中相应数据对象的标签信息的密文子集;其中所述传输模块将所述密文子集的密文发送给第一设备并从第一设备接收在解密所述密文子集的密文后生成的统计信息;并且所述特征工程处理模块使用所述统计信息来计算对第二数据集进行的特征工程处理的特征工程指标。
在一方面,所述特征工程处理模块根据所述特征工程指标来生成特征工程结果;以及所述传输模块将所述特征工程结果发送给第一设备。
在一方面,所述特征工程处理包括特征选择或分箱。
在一方面,所述统计信息包括所述密文子集的正样本数、和/或负样本数。
根据本公开的另一个实施例,提供了一种特征工程装置,其包括:传输模块,其向第二设备提供第一数据集,第一数据集包含多个数据对象的标签信息的密文,所述传输模块还从第二设备接收第一数据集的密文子集的密文,所述密文子集是根据对第二数据集进行的特征工程处理来生成的,第二数据集包含所述多个数据对象的特征数据,其中对第二数据集进行的特征工程处理生成第二数据集的子集,其中所述密文子集包含第一数据集之中的与所述第二数据集的子集相同的数据对象的标签信息密文;加解密模块, 其解密所述密文子集的密文;以及处理模块,其生成所述密文子集的统计信息,其中所述传输模块向第二设备提供所述统计信息以供第二设备用于计算对第二数据集的特征工程处理的特征工程指标。
在一方面,其中所述传输模块从第二设备接收根据所述特征工程指标生成的第一特征工程结果,并且所述特征工程装置还包括:特征工程处理模块,其使用所述第一数据集的标签信息和第三数据集的特征数据来执行所述特征工程处理以生成第二特征工程结果,以及组合第一特征工程结果和第二特征工程结果以获得组合的特征工程结果。
在一方面,所述特征工程处理包括特征选择或分箱。
在一方面,所述统计信息包括所述密文子集的正样本数、和/或负样本数。
根据本公开的另一个实施例,提供了一种特征工程系统,其包括:处理器;用于存储处理器可执行指令的存储器,其中所述处理器被配置成执行所述处理器可执行指令以实现如上所述的方法。
根据本公开,合作方均不必泄漏自己的隐私数据明文,但最终能完成特征工程处理,从而提高了特征工程处理的安全性。
图1为根据本公开一个实施例的特征工程方法的流程图;
图2为根据本公开一个实施例的特征工程方法的示意图;
图3为根据本公开另一个实施例的特征工程方法的示意图;
图4为根据本公开另一个实施例的特征工程方法的示意图;以及
图5为根据本公开一个实施例的特征工程装置的框图。
下面结合具体实施例和附图对本公开作进一步说明,但不应以此限制本公开的保护范围。
本公开提供了安全的特征工程方法和装置。在联合建模场景中,一般存在其中一方拥有特征数据,另一方拥有标签信息而没有或有少量不齐全的特征数据的情况,这就需要建模合作方的样本数据共同协作来完成特征工程处理。根据本公开的一个实施例,第 一设备可向第二设备传送第一数据集,第一数据集包含多个数据对象的标签信息的密文。第二设备可对包含该多个数据对象的特征数据的第二数据集进行特征工程处理以生成第二数据集的子集。第二设备可根据第二数据集的子集来生成第一数据集之中相应数据对象的标签信息的密文子集,将密文子集的密文发送给第一设备。第一设备可解密该密文子集并生成统计信息,将该统计信息发送给第二设备。第二设备可使用该统计信息来计算特征工程指标。
本公开的分布式特征工程和指标计算使得合作方均不必泄漏自己的隐私数据明文,但最终能完成特征工程处理,实现了安全的特征工程方法和装置。
图1为根据本公开一个实施例的特征工程方法的流程图。该方法可以是在例如第二设备处执行的。
步骤102:第二设备接收第一数据集,第一数据集包含多个数据对象的标签信息的密文。例如,第一设备可请求第二设备进行特征工程处理,并且第一设备可将第一数据集发送给第二设备,其中所发送的第一数据集包含多个数据对象的标签信息的密文。在另一示例中,第二设备需要进行特征工程处理并且可请求第一设备提供包含标签信息的第一数据集。在任一种情形中,第二设备可具有包含特征数据的第二数据集,并且可将第一数据集和第二数据集相结合地进行特征工程处理,例如特征选择、特征提取、特征离散化(如分箱)等。
特征数据可以表示对象的特性或行为等信息,例如用户的年龄、身高、消费记录等。标签信息可以标识对象的类别,例如用户是否为学生、用户是否为失信者等等。作为示例而非限定,标签信息可以为二元值,例如用1、0分别表示正样本和负样本,或者用0、-1分别表示正样本和负样本,或以其他方式区分正样本和负样本。
在一些情形中,虽然第二设备可将第一数据集的标签信息和第二数据集的特征数据相结合地进行特征工程处理,但拥有第一数据集的第一设备可能不希望将第一数据集的标签信息的具体值泄露给第二设备。由此,根据一个实施例,第一设备发送给第二设备的第一数据集包含多个数据对象的标签信息的密文,而不是这些标签信息的明文信息。
第一设备可以利用密钥对第一数据集之中的各个数据对象的标签信息逐个进行加密以生成标签信息的密文,或者第一设备可以接收包含由第三方加密后的标签信息密文的第一数据集。优选地,第一设备能够解密第一数据集的密文,而第二设备不能解密第一数据集的密文。因此,即使第一设备将第一数据集的标签信息密文发送给第二设备,第 二设备也不知晓每个数据对象的具体标签信息值。第一设备可以直接将包含密文的第一数据集发送给第二设备,也可以经由中间设备将第一数据集转发给第二设备。例如,第一设备可以将第一数据集上传到云端(比如阿里oss或者开源sftp等)供第二设备下载,也可以通过网络进行大文件的点对点传输提供给第二设备。第二设备可以从中间设备(例如,云端)接收第一数据集,或者接收来自匿名方的第一数据集,或者以其他方式获得包含密文的第一数据集。
步骤104:第二设备对第二数据集进行特征工程处理以生成第二数据集的子集。如上所述,第二数据集可包含多个数据对象的特征数据。第二设备可以对第二数据集之中所包含的多个数据对象的特征数据进行数据清理、数据筛选、特征离散化、特征提取、特征选择等特征工程处理,以生成第二数据集的子集,该子集可包括第二数据集之中的一些数据对象的特征数据。
对第二数据集的特征工程处理可以在步骤102之前或之后执行。例如,拥有第二数据集的第二设备可以在任何时间自主地对第二数据集进行特征工程处理,也可以在从第一设备接收到特征工程处理请求(和/或第一数据集)之后对第二数据集进行特征工程处理。
步骤106:第二设备根据第二数据集的子集中所包含的数据对象来生成第一数据集之中相应数据对象的标签信息的密文子集。
如上所述,第一数据集(例如,包含标签信息)可与第二数据集(例如,包含特征数据)联合地用于特征工程处理。然而,第二设备所接收到的第一数据集之中的标签信息是经加密的(即,为密文形式),并且第二设备可能无法对第一数据集的密文进行解密,由此不知晓第一数据集的标签信息的具体值。以特征数据和经加密的标签信息为例,第二设备由于不知晓标签信息的具体值,因此不能直接用第二数据集的特征数据和第一数据集之中的经加密的标签信息来联合地进行特征工程处理。
根据本公开的一个实施例,第一数据集的标签信息与第二数据集的特征数据可对应于相同的多个数据对象。作为示例而非限定,第一设备拥有的标签信息和第二设备拥有的特征数据可各自具有标识符(id),第一设备和第二设备可进行标识符匹配以分别在第一设备处生成第一数据集并在第二设备处生成第二数据集,使得第一数据集的标签信息与第二数据集的特征数据对应于相同的多个数据对象。此后,第一设备可在步骤102将第一数据集发送给第二数据集,第一数据集可包括该多个数据对象的标签信息的密文和相关联的标识符。第二设备可以根据第二数据集的子集中所包含的数据对象按照标识 符来生成第一数据集之中相应数据对象的标签信息的密文子集。
作为进一步示例,如果在第一设备处生成的第一数据集和在第二设备处生成的第二数据集针对相同的多个数据对象,则还可以例如根据标识符按相同顺序来排列双方的数据,例如使得第一数据集和第二数据集的每条数据彼此对应,其中每条数据可对应于不同的对象。如果第一数据集和第二数据集的数据对象按相同的方式排序,则第一设备发送给第二设备的第一数据集可以不必包含标识符。第二设备可以按照两个数据集之间的对应关系,根据第二数据集的子集中所包含的数据对象来生成第一数据集之中相应数据对象的标签信息的密文子集。
在另一实施例中,如果第二设备在接收第一数据集之前没有与第一设备进行标识符匹配,即,第一数据集可能包含与第二数据集不同的数据对象,则第二设备可在接收第一数据集之后对第一数据集和第二数据集进行标识符匹配,由此剔除一方独有的数据对象,以使得第一数据集的标签信息和第二数据集的特征数据对应于相同的多个数据对象。此后,第二设备可在步骤106根据第二数据集的子集中所包含的数据对象来生成第一数据集之中相应数据对象的标签信息的密文子集。
以特征选择作为示例,对第二数据集的特征工程处理可包括选择第二数据集的特征数据子集,并且第二设备可生成与该特征数据子集中所包含的数据对象相对应的第一数据集之中的标签信息的密文子集。作为另一示例,对第二数据集的特征工程处理可包括对特征数据进行分箱以生成多个分箱段,由此第二设备可以生成第一数据集的与该多个分箱段相对应的多个密文子集,其中每个密文子集包括第一数据集之中的落在相应分箱段中的数据对象的标签信息密文。即,第二设备可以根据对第二数据集的特征数据的分箱来确定第一数据集之中相应的数据对象分别落在哪个分箱段中,并按分箱段来生成第一数据集之中的标签信息的密文子集。在步骤106中,第二设备可以生成第一数据集之中的标签信息的密文子集,并且可以知晓该密文子集中的标签信息的总数。然而如上所述,第一数据集的标签信息是加密的,第二设备不知晓这些标签信息的值,由此无法完成特征工程处理的指标计算。例如,以分箱为例,第二设备不知道该密文子集中哪些标签信息为正样本,哪些标签信息为负样本,由此不知晓每个分箱段中的标签信息的正样本数和负样本数,无法计算分箱指标,如IV(Information Value,信息价值)、Woe(Weight of Evidence,证据权重)等。
步骤108:第二设备将该密文子集的密文发送给第一设备,并从第一设备接收在解密该密文子集的密文后生成的统计信息。第二设备发送给第一设备的该密文子集的密文 可以是该密文子集中的各个标签信息的密文集合,或者对这些标签信息的密文进行某种操作或运算(例如,组合、级联、代数运算等)之后得到的密文。
第一设备可以是第一数据集的拥有方并且能够对标签信息的密文进行解密。由此,第一设备可以对该密文子集的密文进行解密并生成统计信息(例如,该密文子集的正样本数和/或负样本数),并且可以将该统计信息发送给第二设备。应理解,第一设备发送的统计信息不同于第一数据集的标签信息密文的解密值,由此不会泄露第一数据集的标签信息值。
以分箱为例,第二设备可以将与多个分箱段相对应的多个密文子集发送给第一设备,每个密文子集的密文可包括第一数据集之中的落在相应分箱段中的标签信息密文的集合。第一设备可以解密出每个分箱段对应的标签信息密文,并获得每个分箱段对应的标签信息的统计信息(例如,每个分箱段对应的标签信息的正样本数和/或负样本数)作为上述统计信息发送给第二设备。对于其他特征工程处理(例如,特征选择等),第一设备可类似地解密每个密文子集的密文并生成特征工程处理所需的统计信息发送给第二设备。
在一个示例中,第一数据集的标签信息的密文可以是使用同态加密(Homomorphic Encryption)对标签信息进行加密来生成的。同态加密允许对经同态加密后的密文进行特定的代数运算得到仍然是加密的运算结果,将其解密所得到的运算结果与对明文进行同样的运算得到的运算结果一样。换言之,这项技术令人们可以在经加密的数据中进行诸如检索、比较等操作,得出正确的结果,而在整个处理过程中无需对数据进行解密。如果标签信息为二元值并使用同态加密来加密,则第二设备可以对密文子集中的密文进行同态加法以得到密文总和,并将该密文总和发送给第一设备。第一设备解密该密文总和得到的值等同于第一设备解密该密文子集中的每个标签信息密文并求和得到的值。由此,第一设备可以解密该密文总和,并且解密结果可指示正样本数和/或负样本数。
步骤110:第二设备使用该统计信息来计算对第二数据集的特征工程处理的特征工程指标。特征工程指标可用于评价特征工程处理产生的结果。特征工程指标可根据具体的特征工程处理进行选择,例如第二数据集的子集的正样本率、第二数据集的子集的负样本率、第二数据集的子集与密文子集中的标签信息的相关度、第二数据集的子集的信息价值、第二数据集的子集的证据权重等。由此,第二设备可以根据第二数据集的子集和对应的统计信息来获得该子集的特征工程指标。以分箱为例,该统计信息可以是每个分箱段的关于标签信息的统计值,第二设备可以利用从第一设备接收的统计值并结合第 二设备在对特征数据进行分箱时获得的分箱段信息一起进行分箱指标计算。如果特征工程指标达到要求(例如,阈值),则第二设备可以生成特征工程处理结果并完成该特征工程处理。所生成的特征工程处理结果(例如,特征数据子集)可用于各种目的,例如模型训练、目标预测等。在可选的实施例中,第二设备可以将特征工程结果发送给第一设备。在进一步的实施例中,如果特征工程指标不理想(例如,未达到阈值),第二设备可重复步骤104-110,直到获得符合要求的特征工程指标或者直到达成终止特征工程处理的条件。
根据上述方法,合作方均不必泄漏自己的隐私数据明文,但最终能完成特征工程处理。以下结合图2-4进一步详细描述本公开的应用场景。
图2为根据本公开一个实施例的特征工程方法的示意图。作为示例而非限定,以第一设备拥有标签信息Y(第一数据集),第二设备拥有特征数据X(第二数据集)的特征选择场景为例进行说明。为简化描述,假设标签信息Y(第一数据集)和特征数据X(第二数据集)对应于相同的多个数据对象(例如,通过进行标识符匹配)。特征选择的目标是寻找最优特征子集。特征选择能剔除不相关(irrelevant)或冗余(redundant)的特征,从而达到减少特征个数、降低数据集维度、提高模型精确度、减少运行时间的目的。另一方面,特征选择可用于选取出真正相关的特征简化模型,协助理解数据产生的过程。
在步骤202,第一设备可加密第一数据集之中的Y样本并生成经加密的Y’样本。在步骤204,第一设备可将经加密的Y’样本发送给第二设备。作为示例而非限定,第一设备可在发送之前进一步压缩经加密的Y’样本,并将压缩后的加密Y’样本发送给第二设备。若Y’样本数据量大,可考虑将密文文件上传到双方可访问的安全云端(例如oss等)。
在一个实施例中,第一设备可对第一数据集之中的Y样本进行逐个加密以生成Y样本的密文Y’。第一设备可以利用密钥以任何合适的加密算法对第一数据集之中的Y样本逐个进行加密,并将Y’样本(例如,不压缩或压缩后)发送给第二设备。作为示例而非限定,可以采用同态加密(Homomorphic Encryption)来对第一数据集之中的Y样本进行逐个全量同态加密。
在步骤206,第二设备可接收经加密的Y’样本。例如,第二设备可从第一设备或其他中间方(例如,oss等云端)获取经加密的Y’样本。如果Y’样本是经压缩的,则第二设备可解压Y’样本。
在步骤208,第二设备可选择本地拥有的X样本(例如,特征数据)的子集。应理解,第二设备可以按各种准则或组合来选择X样本子集。此外,第二设备可以选择一个或多个X样本子集并依次或并行地评价这一个或多个X样本子集。
虽然图2中示出了步骤208在步骤206之后执行,但是应理解,步骤208可以在步骤202-206中的任一个步骤之前或之后执行,也可以与步骤202-206中的任一个步骤并发地执行。
在步骤210,第二设备可根据所选择的X样本子集来读取相对应的Y’样本子集。类似于以上所述,X样本的id和Y样本的id可以相匹配,以使得X样本和Y样本具有对应关系。由此,第二设备可根据所选择的X样本子集来读取相对应id的Y’样本子集。如上所述,由于Y’样本是加密的,因此第二设备不知晓Y’样本的值,从而该Y’样本子集可包括经加密的Y’样本(包含密文)。
在步骤212,第二设备可以将Y’样本子集的密文发送给第一设备进行解密。在一个示例中,在步骤212发送的Y’样本子集的密文可包括Y’样本子集所包含的各个Y’样本的集合。
在步骤214,第一设备解密Y’样本子集的密文。例如,第一设备可解密该子集中包含的每个Y’样本以获得经解密的Y样本。
在步骤216,第一设备在解密Y’样本子集的密文之后可以生成关于特征选择的统计信息。例如,第一设备可解密出各个Y’样本的值,并由此获得用于评价特征选择子集的统计信息(例如正样本数、负样本数等)。
在另一个示例中,如果Y样本为二元值并使用同态加密来生成Y’样本,则第二设备可以对Y’样本子集的各个Y’样本进行同态加法以得到密文总和,并在步骤212将该密文总和发送给第一设备,而不必将该Y’样本子集完整地发送给第一设备。第一设备可在步骤214解密该密文总和并直接生成统计信息。例如,如果用1、0分别表示正样本和负样本,则Y’样本子集的同态密文总和即为所有1的密文总和,该密文总和被解密后即为所有正样本的数量。反之,如果用1、0分别表示负样本和正样本,则解密Y’样本子集的同态密文总和可以得到负样本数量。
在步骤218,第一设备可将Y’样本子集的统计信息发送给第二设备。应理解,第一设备发送Y’样本子集的统计信息不会泄露样本Y的值。
在步骤220,第二设备可根据该统计信息来计算特征选择指标,如X样本子集的正 样本率、X样本子集的负样本率、X样本子集与预测目标(例如,Y样本为正或负)的相关度、X样本子集的信息价值、X样本子集的证据权重等。作为示例而非限定,第二设备可从步骤220返回到步骤208以选择下一组的一个或多个X样本子集进行评价。
在步骤222,在获得了符合要求的(例如,最优的)特征子集的情况下,第二设备可以生成特征选择结果并完成特征选择。
在可选步骤224,第二设备可将特征选择结果发送给第一设备。相应地,在可选步骤226,第一设备可从第二设备接收特征选择结果。
图3为根据本公开另一个实施例的特征工程方法的示意图。作为示例而非限定,以第一设备(例如,需求方)拥有标签信息Y(第一数据集),第二设备(例如,数据方)拥有特征数据X(第二数据集)的分箱场景为例进行说明。为简化描述,假设标签信息Y(第一数据集)和特征数据X(第二数据集)对应于相同的多个数据对象。
分箱是一种常用的数据预处理方法,其按照属性值划分的子区间,如果一个属性值处于某个子区间范围内,就称把该把待处理的数据(某列属性值)按照一定的规则放进一些箱子中,考察每一个箱子中的数据,采用某种方法分别对各个箱子中的数据进行处理。分箱可包括等深分箱法、等宽分箱法、最小熵法和用户自定义区间法等。
图3中的步骤302-306与图2中的步骤202-206相似并且不再赘述。
在步骤308,第二设备可对本地拥有的X样本(例如,特征数据)进行分箱。虽然图3中示出了步骤308在步骤306之后执行,但是应理解,步骤308的分箱可以在步骤302-306中的任一个步骤之前或之后执行,也可以与步骤302-306中的任一个步骤并发地执行。例如,步骤308处对X样本的分箱可以是预先(例如,在步骤302之前)执行的。在其他实施例中,对X样本的分箱可以在步骤306之后(或者,在接收到来自第一设备的分箱请求之后)执行。
在步骤310,第二设备以X样本的分箱段为单位读取相应的Y’样本子集。
根据本公开的一个实施例中,可在步骤308之前的任何时间对X样本的id和Y样本的id进行匹配,以使得X样本和Y样本具有对应关系。作为示例而非限定,第一设备发送给第二设备的加密Y’样本具有相关联的标识符(id),第二设备本地的X样本具有相关联的标识符,其中X样本和Y样本的标识符是匹配的(例如,对应于相同的一组对象)。由此,第二设备可以根据X样本的分箱来确定相应的id分别落在哪个分箱段中,并按分箱段来读取各id对应的Y’样本。在一个实施例中,第一设备发送给第 二设备的加密Y’样本的标识符可以被加密(例如,进行哈希散列)或不被加密。在另一实施例中,如果第一设备和第二设备先进行了匹配,以使得X样本和Y’样本按特定方式排序(例如使得每项数据一一对应),则第一设备发送给第二设备的加密Y’样本可以不必包括id信息,第二设备可以直接根据X样本的分箱来读取相对应的Y’样本。
在步骤312,第二设备可以将各个分箱段对应的Y’样本子集的密文发送给第一设备。在一个实施例中,可在步骤312发送多个Y’样本子集的密文,其中每个Y’样本子集的密文可包括相应分箱段对应的Y’样本的集合。在另一个实施例中,如果Y’样本是采用同态加密来加密的,则在步骤312发送的每个Y’样本子集的密文可包括将该分箱段对应的Y’样本进行同态加法得到的密文总和。
在步骤314,第一设备解密每个分箱段对应的Y’样本子集的密文。第一设备可以是曾对Y进行加密的设备并且能够解密Y’,或者即使加密不是由第一设备执行的,但第一设备具有密钥权限并由此能够解密Y’。例如,第一设备可解密Y’样本子集中包含的每个Y’样本,或者在该子集包含同态密文总和的情况下解密该同态密文总和。如果Y’样本是二元值且采用同态加密来加密,则解密该密文总和可以直接得出正样本数或负样本数。
在步骤316,第一设备在解密每个分箱段对应的Y’样本子集的密文之后可以生成关于每个分箱段的统计信息。例如,第一设备可解密出每个分箱段的各个Y’样本的值,并由此获得每个分箱段的正样本数、负样本数、和/或总样本数等参数。在另一个实施例中,在步骤312处发送的Y’样本子集的密文包含同态密文总和的情况下解密同态密文总和提供了各个分箱段的正样本数或负样本数。例如,如果用1、0分别表示正样本和负样本,则同态密文总和即为所有正样本的数量。
在步骤318,第一设备可将各个分箱段的统计信息(例如Y样本统计信息,如正样本数、负样本数、和/或总样本数等)发送给第二设备。应理解,第一设备发送各个分箱段的统计信息不会泄露样本Y的值。
在步骤320,第二设备可根据该统计信息来计算分箱指标。例如,第二设备可以利用从第一设备接收的关于每个分箱段的统计值并结合第二设备在对特征数据X进行分箱时获得的其他信息一起进行分箱指标计算,如各X样本分箱段的正样本率、各X样本分箱段的负样本率、各X样本分箱段与预测目标(例如,Y样本为正或负)的相关度、各X样本分箱段的IV(Information Value,信息价值)、各X样本分箱段的Woe(Weight of Evidence,证据权重)等。
在步骤322,在分箱指标有效(例如,达到阈值)的情况下,第二设备可以生成分箱结果并完成分箱。在分箱指标不理想的情况下,第二设备可重复步骤308-320以重新执行分箱并进行分箱指标计算。
在可选步骤324,第二设备可将分箱结果发送给第一设备。相应地,在可选步骤326,第一设备可以从第二设备接收分箱结果。
图4为根据本公开另一个实施例的特征工程方法的示意图。在一个实施例中,一方(例如,第一设备)可以具有特征数据X2和标签信息Y,另一方(例如,第二设备)具有特征数据X1。特征数据X1和特征数据X2可以彼此相同、部分相同、或者彼此不同。为简化描述,假设标签信息Y(第一数据集)、特征数据X1(第二数据集)、和特征数据X2(第三数据集)对应于相同的多个数据对象。第一设备可以如图3所述地将经加密的标签信息Y’发送给第二设备以结合特征数据X1进行分箱,还可以在本地针对特征数据X2和标签信息Y进行本地分箱。
在步骤402-422中,第一设备和第二设备可以如参考图3中的步骤302-322所述地根据特征数据X1和标签信息Y’进行分箱并生成第一分箱结果。
在步骤424,第二设备可以将第一分箱结果发送给第一设备。
在步骤426,第一设备可在本地针对特征数据X2和未加密的标签信息Y进行分箱以获得第二分箱结果。应注意,第一设备在步骤426进行的本地分箱可以在步骤402-424中的任一个步骤之前或之后执行,或与其中任一个步骤并行地执行。
在步骤428,第一设备可以组合第一分箱结果和第二分箱结果,以得到组合的分箱结果。
上文以特征工程处理中的特征选择和分箱为例介绍了分布式特征工程和指标计算,使得合作方均不必泄漏自己的隐私数据明文,但最终能完成特征工程处理。本领域技术人员可以将本公开的分布式特征工程方法和装置广泛地应用于需要把各方的建模样本数据融合在一起进行处理而不想泄露样本数据明文信息的场合,比如数据清理、特征离散化、特征提取、特征选择等。
图5示出了根据本公开一个实施例的特征工程装置的框图。例如,第一设备510可执行以上所描述的关于第一设备的操作,第二设备520可执行以上所描述的关于第二设备的操作。
如图5所示,第一设备510可包括加解密模块512、传输模块514、处理模块516。 加解密模块512可对第一数据集的标签信息进行加密以生成密文。传输模块514可将包含标签信息密文的第一数据集传送给第二设备520或其他设备或云端。
第二设备520可包括传输模块522、特征工程处理模块524和密文子集生成模块526。传输模块522可接收包含标签信息密文的第一数据集。此外,第二设备520可具有第二数据集(例如,存储在存储器中),第二数据集包含多个数据对象的特征数据。特征工程处理模块524可对第二数据集进行特征工程处理以生成第二数据集的子集。第一数据集的标签信息与第二数据集的特征数据可对应于相同的多个数据对象。密文子集生成模块526可根据第二数据集的子集中所包含的数据对象来生成第一数据集之中相应数据对象的标签信息的密文子集。传输模块522可进一步将该密文子集的密文发送给第一设备。
在第一设备510中,传输模块514可接收该密文子集的密文并将其传递给加解密模块512,加解密模块512可解密所述密文子集的密文。处理模块516可根据该密文子集的密文被解密后的数据生成用于特征工程处理的统计信息,例如正样本数、负样本数、总样本数等。传输模块514可将所述统计信息提供给第二设备520。
在第二设备520中,传输模块522接收所述统计信息并将其提供给特征工程处理模块524。特征工程处理模块524可使用所述统计信息来计算对第二数据集进行的特征工程处理的特征工程指标并完成所述特征工程处理。可选地,在完成特征工程处理后,传输模块522还可以将特征工程处理结果发送给第一设备510。
在进一步的实施例中,第一设备510可任选地包括特征工程处理模块518,其可使用第一数据集的未加密的标签信息和第三数据集(例如,包含特征数据X2)来执行特征工程处理以生成第二特征工程结果。第一数据集的标签信息与第三数据集的特征数据可对应于相同的多个数据对象。第一设备510还可以组合由第二设备520生成的上述特征工程结果和第二特征工程结果以获得组合的特征工程结果。在一个实施例中,处理模块516和特征工程处理模块518可以一起实现或分开实现。
根据本公开,联合建模的数据合作各方(例如,第一设备510和第二设备520)不对外输出隐私数据明文,但最终得到特征工程处理结果,防止了私有数据泄漏,解决了数据合作过程中的隐私数据泄漏和数据信任问题。
以上描述的特征工程方法和装置的各个步骤和模块可以用硬件、软件、或其组合来实现。如果在硬件中实现,结合本公开描述的各种说明性步骤、模块、以及电路可用通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列 (FPGA)、或其他可编程逻辑组件、硬件组件、或其任何组合来实现或执行。通用处理器可以是处理器、微处理器、控制器、微控制器、或状态机等。如果在软件中实现,则结合本公开描述的各种说明性步骤、模块可以作为一条或多条指令或代码存储在计算机可读介质上或进行传送。实现本公开的各种操作的软件模块可驻留在存储介质中,如RAM、闪存、ROM、EPROM、EEPROM、寄存器、硬盘、可移动盘、CD-ROM、云存储等。存储介质可耦合到处理器以使得该处理器能从/向该存储介质读写信息,并执行相应的程序模块以实现本公开的各个步骤。而且,基于软件的实施例可以通过适当的通信手段被上载、下载或远程地访问。这种适当的通信手段包括例如互联网、万维网、内联网、软件应用、电缆(包括光纤电缆)、磁通信、电磁通信(包括RF、微波和红外通信)、电子通信或者其他这样的通信手段。
还应注意,这些实施例可能是作为被描绘为流程图、流图、结构图、或框图的过程来描述的。尽管流程图可能会把诸操作描述为顺序过程,但是这些操作中有许多操作能够并行或并发地执行。另外,这些操作的次序可被重新安排。
所公开的方法、装置和系统不应以任何方式被限制。相反,本公开涵盖各种所公开的实施例(单独和彼此的各种组合和子组合)的所有新颖和非显而易见的特征和方面。所公开的方法、装置和系统不限于任何具体方面或特征或它们的组合,所公开的任何实施例也不要求存在任一个或多个具体优点或者解决特定或所有技术问题。
上面结合附图对本公开的实施例进行了描述,但是本公开并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本公开的启示下,在不脱离本公开宗旨和权利要求所保护的范围情况下,还可做出很多更改,这些均落在本公开的保护范围之内。
Claims (27)
- 一种特征工程方法,其特征在于,包括:接收第一数据集,第一数据集包含多个数据对象的标签信息的密文;对第二数据集进行特征工程处理以生成第二数据集的子集,第二数据集包含所述多个数据对象的特征数据;根据所述第二数据集的子集中所包含的数据对象来生成第一数据集之中相应数据对象的标签信息的密文子集;将所述密文子集的密文发送给第一设备;从第一设备接收在解密所述密文子集的密文后生成的统计信息;以及使用所述统计信息来计算对第二数据集进行的特征工程处理的特征工程指标。
- 如权利要求1所述的特征工程方法,其特征在于,还包括:根据所述特征工程指标来生成特征工程结果;以及将所述特征工程结果发送给第一设备。
- 如权利要求1所述的特征工程方法,其特征在于,所述特征工程处理包括对第二数据集进行特征选择以生成第二数据集的特征数据子集,其中计算特征工程指标包括利用所述特征数据子集与所述统计信息来计算特征选择指标。
- 如权利要求1所述的特征工程方法,其特征在于,所述特征工程处理包括对第二数据集进行分箱以生成多个分箱段,并且所述密文子集包括与所述多个分箱段相对应的多个密文子集,其中每个密文子集包括第一数据集之中的落在相应分箱段中的数据对象的标签信息密文,其中计算特征工程指标包括利用所述第二数据集的分箱段与所述统计信息来计算分箱指标。
- 如权利要求1所述的特征工程方法,其特征在于,第一数据集的标签信息的密文是使用同态加密对所述标签信息进行加密来生成的,所述标签信息为二元值,并且将所述密文子集的密文发送给第一设备包括:对所述密文子集中的密文进行同态加法以得到密文总和并将所述密文总和发送给第一设备。
- 如权利要求1所述的特征工程方法,其特征在于,第一数据集和第二数据集之中的数据对象分别具有相关联的标识符,所述方法还包括在生成所述第二数据集的子集之前对第一数据集和第二数据集进行标识符匹配,以使得第一数据集的标签信息与第二数据集的特征数据对应于相同的多个数据对象。
- 如权利要求1所述的特征工程方法,其特征在于,所述统计信息包括所述密文子集的正样本数、和/或负样本数。
- 如权利要求1所述的特征工程方法,其特征在于,对第二数据集进行特征工程处理是在接收第一数据集之前、之时、或之后发生的。
- 如权利要求1所述的特征工程方法,其特征在于,所述特征工程指标包括以下至少一者:所述第二数据集的子集的正样本率、所述第二数据集的子集的负样本率、所述第二数据集的子集与所述密文子集中的标签信息的相关度、所述第二数据集的子集的信息价值、所述第二数据集的子集的证据权重。
- 一种特征工程方法,其特征在于,包括:提供第一数据集,第一数据集包含多个数据对象的标签信息的密文;接收第一数据集的密文子集的密文,所述密文子集是根据对第二数据集进行的特征工程处理来生成的,第二数据集包含所述多个数据对象的特征数据,其中对第二数据集进行的特征工程处理生成第二数据集的子集,其中所述密文子集包含第一数据集之中的与所述第二数据集的子集相同的数据对象的标签信息密文;解密所述密文子集的密文并生成所述密文子集的统计信息;以及提供所述统计信息以用于计算对第二数据集的特征工程处理的特征工程指标。
- 如权利要求10所述的特征工程方法,其特征在于,所述方法还包括:接收根据所述特征工程指标生成的第一特征工程结果。
- 如权利要求11所述的特征工程方法,其特征在于,所述方法还包括:使用所述第一数据集的标签信息和第三数据集的特征数据来执行所述特征工程处理以生成第二特征工程结果;以及组合第一特征工程结果和第二特征工程结果以获得组合的特征工程结果。
- 如权利要求10所述的特征工程方法,其特征在于,所述特征工程处理包括对第二数据集进行特征选择以生成第二数据集的特征数据子集,其中计算特征工程指标包括利用所述特征数据子集与所述统计信息来计算特征选择指标。
- 如权利要求10所述的特征工程方法,其特征在于,所述特征工程处理包括对第二数据集进行分箱以生成多个分箱段,并且所述密文子集包括与所述多个分箱段相对应的多个密文子集,其中每个密文子集包括第一数据集之中的落在相应分箱段中的数据对象的标签信息密文,所述计算特征工程指标包括利用所述第二数据集的分箱段与所述统计信息来计算分箱指标。
- 如权利要求10所述的特征工程方法,其特征在于,第一数据集的标签信息的密文是使用同态加密对所述标签信息进行加密来生成的,所述标签信息为二元值,所述 密文子集的密文包括将所述密文子集中的密文进行同态加法得到的密文总和。
- 如权利要求10所述的特征工程方法,其特征在于,第一数据集和第二数据集之中的数据对象分别具有相关联的标识符,所述方法还包括在生成所述第二数据集的子集之前对第一数据集和第二数据集进行标识符匹配,以使得第一数据集的标签信息与第二数据集的特征数据对应于相同的多个数据对象。
- 如权利要求10所述的特征工程方法,其特征在于,所述统计信息包括所述密文子集的正样本数、和/或负样本数。
- 如权利要求10所述的特征工程方法,其特征在于,所述特征工程指标包括以下至少一者:所述第二数据集的子集的正样本率、所述第二数据集的子集的负样本率、所述第二数据集的子集与所述密文子集中的标签信息的相关度、所述第二数据集的子集的信息价值、所述第二数据集的子集的证据权重。
- 一种特征工程装置,其特征在于,包括:传输模块,其接收第一数据集,第一数据集包含多个数据对象的标签信息的密文;特征工程处理模块,其对第二数据集进行特征工程处理以生成第二数据集的子集,第二数据集包含所述多个数据对象的特征数据;以及密文子集生成模块,其根据所述第二数据集的子集中所包含的数据对象来生成第一数据集之中相应数据对象的标签信息的密文子集;其中所述传输模块将所述密文子集的密文发送给第一设备并从第一设备接收在解密所述密文子集的密文后生成的统计信息;并且所述特征工程处理模块使用所述统计信息来计算对第二数据集进行的特征工程处理的特征工程指标。
- 如权利要求19所述的特征工程装置,其特征在于,所述特征工程处理模块根据所述特征工程指标来生成特征工程结果;以及所述传输模块将所述特征工程结果发送给第一设备。
- 如权利要求19所述的特征工程装置,其特征在于,所述特征工程处理包括特征选择或分箱。
- 如权利要求19所述的特征工程装置,其特征在于,所述统计信息包括所述密文子集的正样本数、和/或负样本数。
- 一种特征工程装置,其特征在于,包括:传输模块,其向第二设备提供第一数据集,第一数据集包含多个数据对象的标签信 息的密文,所述传输模块还从第二设备接收第一数据集的密文子集的密文,所述密文子集是根据对第二数据集进行的特征工程处理来生成的,第二数据集包含所述多个数据对象的特征数据,其中对第二数据集进行的特征工程处理生成第二数据集的子集,其中所述密文子集包含第一数据集之中的与所述第二数据集的子集相同的数据对象的标签信息密文;加解密模块,其解密所述密文子集的密文;以及处理模块,其生成所述密文子集的统计信息,其中所述传输模块向第二设备提供所述统计信息以供第二设备用于计算对第二数据集的特征工程处理的特征工程指标。
- 如权利要求23所述的特征工程装置,其特征在于,其中所述传输模块从第二设备接收根据所述特征工程指标生成的第一特征工程结果,并且所述特征工程装置还包括:特征工程处理模块,其使用所述第一数据集的标签信息和第三数据集的特征数据来执行所述特征工程处理以生成第二特征工程结果,以及组合第一特征工程结果和第二特征工程结果以获得组合的特征工程结果。
- 如权利要求23所述的特征工程装置,其特征在于,所述特征工程处理包括特征选择或分箱。
- 如权利要求23所述的特征工程装置,其特征在于,所述统计信息包括所述密文子集的正样本数、和/或负样本数。
- 一种特征工程系统,其特征在于,包括:处理器;用于存储处理器可执行指令的存储器,其中所述处理器被配置成执行所述处理器可执行指令以实现如权利要求1-18中任一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910161715.8A CN110032878B (zh) | 2019-03-04 | 2019-03-04 | 一种安全的特征工程方法和装置 |
| CN201910161715.8 | 2019-03-04 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020177475A1 true WO2020177475A1 (zh) | 2020-09-10 |
Family
ID=67235752
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/070303 Ceased WO2020177475A1 (zh) | 2019-03-04 | 2020-01-03 | 一种安全的特征工程方法和装置 |
Country Status (3)
| Country | Link |
|---|---|
| CN (1) | CN110032878B (zh) |
| TW (1) | TWI719635B (zh) |
| WO (1) | WO2020177475A1 (zh) |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112507349A (zh) * | 2020-10-30 | 2021-03-16 | 深圳市琦迹技术服务有限公司 | 数据加密存储、加密搜索、应用的方法及其相关设备 |
| CN112711765A (zh) * | 2020-12-30 | 2021-04-27 | 深圳前海微众银行股份有限公司 | 样本特征的信息价值确定方法、终端、设备和存储介质 |
| CN114254356A (zh) * | 2021-12-22 | 2022-03-29 | 上海阵方科技有限公司 | 基于隐私保护的数据排序方法和数据处理方法 |
| CN114398671A (zh) * | 2021-12-30 | 2022-04-26 | 翼健(上海)信息科技有限公司 | 基于特征工程iv值的隐私计算方法、系统和可读存储介质 |
| CN114547635A (zh) * | 2020-11-27 | 2022-05-27 | 深圳前海微众银行股份有限公司 | 数据处理方法、装置、设备及存储介质 |
| CN115809473A (zh) * | 2023-02-02 | 2023-03-17 | 富算科技(上海)有限公司 | 一种纵向联邦学习的信息价值的获取方法及装置 |
| EP4216074A4 (en) * | 2021-03-10 | 2024-04-24 | Tencent Technology (Shenzhen) Company Limited | DATA PROCESSING METHOD AND APPARATUS, DEVICE, COMPUTER-READABLE STORAGE MEDIUM AND COMPUTER PROGRAM PRODUCT |
Families Citing this family (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110032878B (zh) * | 2019-03-04 | 2021-11-02 | 创新先进技术有限公司 | 一种安全的特征工程方法和装置 |
| CN110990857B (zh) * | 2019-12-11 | 2021-04-06 | 支付宝(杭州)信息技术有限公司 | 保护隐私安全的多方联合进行特征评估的方法及装置 |
| CN112667608B (zh) * | 2020-04-03 | 2022-01-25 | 华控清交信息科技(北京)有限公司 | 一种数据处理方法、装置和用于数据处理的装置 |
| CN112667741B (zh) * | 2020-04-13 | 2022-07-08 | 华控清交信息科技(北京)有限公司 | 一种数据处理方法、装置和用于数据处理的装置 |
| CN111242244B (zh) * | 2020-04-24 | 2020-09-18 | 支付宝(杭州)信息技术有限公司 | 特征值分箱方法、系统及装置 |
| CN111523679B (zh) * | 2020-04-26 | 2025-07-25 | 深圳前海微众银行股份有限公司 | 特征分箱方法、设备及可读存储介质 |
| CN111563267B (zh) * | 2020-05-08 | 2024-04-05 | 京东科技控股股份有限公司 | 用于联邦特征工程数据处理的方法和装置 |
| CN111369352B (zh) * | 2020-06-01 | 2020-10-02 | 同盾控股有限公司 | 联合建模方法、设备及介质 |
| CN111539009B (zh) * | 2020-06-05 | 2023-05-23 | 支付宝(杭州)信息技术有限公司 | 保护隐私数据的有监督特征分箱方法及装置 |
| CN112100679B (zh) * | 2020-11-16 | 2021-03-02 | 支付宝(杭州)信息技术有限公司 | 基于隐私保护的数据处理方法、装置和服务器 |
| TWI775467B (zh) * | 2021-06-02 | 2022-08-21 | 宏碁智醫股份有限公司 | 機器學習模型檔案解密方法及用戶裝置 |
| CN114301583B (zh) * | 2021-12-22 | 2023-10-24 | 阿里巴巴(中国)有限公司 | 密文压缩方法、装置、设备和存储介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105760932A (zh) * | 2016-02-17 | 2016-07-13 | 北京物思创想科技有限公司 | 数据交换方法、数据交换装置及计算装置 |
| US20170310643A1 (en) * | 2014-10-24 | 2017-10-26 | National Ict Australia Limited | Gradients over distributed datasets |
| CN109241770A (zh) * | 2018-08-10 | 2019-01-18 | 深圳前海微众银行股份有限公司 | 基于同态加密的信息值计算方法、设备及可读存储介质 |
| CN110032878A (zh) * | 2019-03-04 | 2019-07-19 | 阿里巴巴集团控股有限公司 | 一种安全的特征工程方法和装置 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8117644B2 (en) * | 2000-01-07 | 2012-02-14 | Pennar Software Corporation | Method and system for online document collaboration |
| CN105450411B (zh) * | 2014-08-14 | 2019-01-08 | 阿里巴巴集团控股有限公司 | 利用卡片特征进行身份验证的方法、装置及系统 |
| CN108073568B (zh) * | 2016-11-10 | 2020-09-11 | 腾讯科技(深圳)有限公司 | 关键词提取方法和装置 |
| CN108121737B (zh) * | 2016-11-29 | 2022-04-26 | 阿里巴巴集团控股有限公司 | 一种业务对象属性标识的生成方法、装置和系统 |
-
2019
- 2019-03-04 CN CN201910161715.8A patent/CN110032878B/zh active Active
- 2019-09-16 TW TW108133229A patent/TWI719635B/zh not_active IP Right Cessation
-
2020
- 2020-01-03 WO PCT/CN2020/070303 patent/WO2020177475A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20170310643A1 (en) * | 2014-10-24 | 2017-10-26 | National Ict Australia Limited | Gradients over distributed datasets |
| CN105760932A (zh) * | 2016-02-17 | 2016-07-13 | 北京物思创想科技有限公司 | 数据交换方法、数据交换装置及计算装置 |
| CN109241770A (zh) * | 2018-08-10 | 2019-01-18 | 深圳前海微众银行股份有限公司 | 基于同态加密的信息值计算方法、设备及可读存储介质 |
| CN110032878A (zh) * | 2019-03-04 | 2019-07-19 | 阿里巴巴集团控股有限公司 | 一种安全的特征工程方法和装置 |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112507349A (zh) * | 2020-10-30 | 2021-03-16 | 深圳市琦迹技术服务有限公司 | 数据加密存储、加密搜索、应用的方法及其相关设备 |
| CN114547635A (zh) * | 2020-11-27 | 2022-05-27 | 深圳前海微众银行股份有限公司 | 数据处理方法、装置、设备及存储介质 |
| CN112711765A (zh) * | 2020-12-30 | 2021-04-27 | 深圳前海微众银行股份有限公司 | 样本特征的信息价值确定方法、终端、设备和存储介质 |
| EP4216074A4 (en) * | 2021-03-10 | 2024-04-24 | Tencent Technology (Shenzhen) Company Limited | DATA PROCESSING METHOD AND APPARATUS, DEVICE, COMPUTER-READABLE STORAGE MEDIUM AND COMPUTER PROGRAM PRODUCT |
| US12579472B2 (en) | 2021-03-10 | 2026-03-17 | Tencent Technology (Shenzhen) Company Limited | Data processing method, apparatus, and device, computer-readable storage medium, and computer program product |
| CN114254356A (zh) * | 2021-12-22 | 2022-03-29 | 上海阵方科技有限公司 | 基于隐私保护的数据排序方法和数据处理方法 |
| CN114398671A (zh) * | 2021-12-30 | 2022-04-26 | 翼健(上海)信息科技有限公司 | 基于特征工程iv值的隐私计算方法、系统和可读存储介质 |
| CN115809473A (zh) * | 2023-02-02 | 2023-03-17 | 富算科技(上海)有限公司 | 一种纵向联邦学习的信息价值的获取方法及装置 |
| CN115809473B (zh) * | 2023-02-02 | 2023-04-25 | 富算科技(上海)有限公司 | 一种纵向联邦学习的信息价值的获取方法及装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202040397A (zh) | 2020-11-01 |
| CN110032878B (zh) | 2021-11-02 |
| TWI719635B (zh) | 2021-02-21 |
| CN110032878A (zh) | 2019-07-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI719635B (zh) | 安全的特徵工程方法和裝置 | |
| US11196541B2 (en) | Secure machine learning analytics using homomorphic encryption | |
| Wu et al. | Privately evaluating decision trees and random forests | |
| Qiu et al. | Toward practical privacy-preserving frequent itemset mining on encrypted cloud data | |
| CN112182644A (zh) | 一种数据处理方法、装置和电子设备 | |
| Keller et al. | Efficient maliciously secure multiparty computation for RAM | |
| CN107135061B (zh) | 一种5g通信标准下的分布式隐私保护机器学习方法 | |
| Sagar et al. | Confidential machine learning on untrusted platforms: a survey | |
| CN112307513B (zh) | 基于时域共识的上链文档安全管理方法、装置和电子设备 | |
| Liu et al. | Secure three-party computational protocols for triangle area | |
| CN109120606A (zh) | 一种具有隐私保护的特征属性的处理方法及装置 | |
| Dhumal et al. | Confidentiality-conserving multi-keyword ranked search above encrypted cloud data | |
| Xihua et al. | Blockchain‐Based Privacy‐Preserving Approach Using SVML for Encrypted Smart City Data in the Era of IR 4.0 | |
| CN115525922A (zh) | 基于隐私计算的金融隐私数据安全决策方法、装置及设备 | |
| Feng et al. | Efficient and verifiable outsourcing scheme of sequence comparisons | |
| Siabi et al. | Optimally efficient secure scalar product with applications in cloud computing | |
| Zhu et al. | Outsourcing set intersection computation based on bloom filter for privacy preservation in multimedia processing | |
| CN117978356B (zh) | 一种面向数据网格环境的多密钥同态加密认证评估方法 | |
| Algazy et al. | Evaluation of the strength and performance of a new hashing algorithm based on a block cipher | |
| Smyth et al. | NM-CPA secure encryption with proofs of plaintext knowledge | |
| Park et al. | PKIS: practical keyword index search on cloud datacenter | |
| Aburawi | Cryptdb mechanism on graph databases | |
| Patel | Evaluating the use of homomorphic encryption for secure data processing in cloud networks | |
| Fernando et al. | Maliciously secure massively parallel computation for all-but-one corruptions | |
| CN112702159A (zh) | 一种基于区块链的线上专家评分方法和系统 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20766452 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20766452 Country of ref document: EP Kind code of ref document: A1 |