Feature selection methods, devices, readable storage media, and computer program products

By normalizing feature data and engaging in secret sharing interactions during federated learning, the high complexity problem caused by homomorphic encryption is solved, and efficient feature selection is achieved.

CN114638274BActive Publication Date: 2026-03-17WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-15
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In federated learning scenarios, existing technologies use homomorphic encryption for feature selection, but the large amount of ciphertext data leads to high complexity and low efficiency in calculating correlation coefficients.

Method used

By normalizing the selected feature data, correlation auxiliary calculation parameter data is constructed, and feature correlation data is calculated with a second device through secret sharing interaction, avoiding data encryption and directly calculating the correlation coefficient.

Benefits of technology

It improves the efficiency of feature selection, reduces data transmission time and computational complexity, and enhances device performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114638274B_ABST
    Figure CN114638274B_ABST
Patent Text Reader

Abstract

The application discloses a feature selection method, device, readable storage medium and computer program product. The feature selection method comprises the following steps: acquiring to-be-selected feature data, performing normalization processing on the to-be-selected feature data, constructing correlation auxiliary calculation parameter data corresponding to the to-be-selected feature data, then calculating feature correlation data based on the correlation auxiliary calculation parameter data by performing secret sharing interaction with a second device, and then performing feature selection on the to-be-selected feature data based on the feature correlation data to obtain a feature selection result. The application solves the technical problem of low efficiency of feature selection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine learning technology in financial technology (Fintech), and more particularly to a feature selection method, device, readable storage medium, and computer program product. Background Technology

[0002] With the continuous development of fintech, especially internet fintech, more and more technologies (such as distributed systems and artificial intelligence) are being applied in the financial field. However, the financial industry is also placing higher demands on technology, such as on the distribution of tasks to be completed.

[0003] With the continuous development of computer technology, machine learning is being applied more and more widely. Feature engineering is an essential part of machine learning, including features selection and feature crossing. In federated learning scenarios, feature selection is usually required. Currently, when performing feature selection, the participants in federated learning typically send the data to a trusted third party in a homomorphically encrypted manner. The trusted third party then determines the correlation coefficient under homomorphic encryption and feeds it back to the participants for feature selection. However, since the amount of data in the ciphertext is much larger than the original data after homomorphic encryption, the complexity of determining the correlation coefficient under encryption is high, which in turn leads to low efficiency of feature selection. Summary of the Invention

[0004] The main objective of this application is to provide a feature selection method, apparatus, readable storage medium, and computer program product, aiming to solve the technical problem of low efficiency in feature selection in the prior art.

[0005] To achieve the above objectives, this application provides a feature selection method, which is applied to a first device, and the feature selection method includes:

[0006] Obtain the feature data to be selected and normalize the feature data to be selected in order to construct the correlation auxiliary calculation parameter data corresponding to the feature data to be selected;

[0007] Based on the aforementioned correlation-assisted calculation parameter data, feature correlation data is calculated through secret sharing and interaction with the second device.

[0008] Based on the feature correlation data, feature selection is performed on the feature data to be selected, and feature selection results are obtained.

[0009] This application also provides a feature selection device, which is a virtual device and is applied to a first device. The feature selection device includes:

[0010] The normalization processing module is used to obtain the feature data to be selected and to perform normalization processing on the feature data to be selected in order to construct the correlation auxiliary calculation parameter data corresponding to the feature data to be selected.

[0011] The secret sharing module is used to calculate feature correlation data by secretly sharing with the second device based on the correlation auxiliary calculation parameter data;

[0012] The feature selection module is used to select features from the feature data to be selected based on the feature correlation data, and obtain the feature selection result.

[0013] This application also provides a feature selection device, which is a physical device. The feature selection device includes a memory, a processor, and a program of the feature selection method stored in the memory and executable on the processor. When the program of the feature selection method is executed by the processor, it can implement the steps of the feature selection method as described above.

[0014] This application also provides a readable storage medium storing a program implementing a feature selection method, which, when executed by a processor, implements the steps of the feature selection method as described above.

[0015] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the feature selection method described above.

[0016] This application provides a feature selection method, device, readable storage medium, and computer program product. Compared to the existing technology where participants in federated learning send data to a trusted third party using homomorphic encryption, and the trusted third party determines the correlation coefficient under homomorphic encryption and feeds it back to each participant for feature selection, this application, after obtaining the feature data to be selected, normalizes the feature data to construct the correlation auxiliary calculation parameter data corresponding to the feature data to be selected. Then, based on the correlation auxiliary calculation parameter data, it calculates the feature correlation data through secret sharing and interaction with a second device. In other words, by secretly sharing data, the feature correlation coefficient data is calculated jointly with the second device. It should be noted that during the secret sharing process, there is no need to encrypt the data into ciphertext. This achieves the goal of calculating the correlation coefficient without encrypting the original data. Based on the feature correlation data, feature selection is performed on the feature data to be selected, and the feature selection result can be obtained. This overcomes the technical defect that after homomorphic encryption, the amount of data in the ciphertext is much larger than the original data, which leads to high complexity in calculating the correlation coefficient in the encrypted state and thus low efficiency in feature selection. Therefore, the efficiency of feature selection is improved. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating the first embodiment of the feature selection method of this application;

[0020] Figure 2 This is a flowchart illustrating the second embodiment of the feature selection method of this application;

[0021] Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application;

[0022] Figure 4 This is a schematic diagram of the hardware architecture involved in the embodiments of this application.

[0023] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0024] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.

[0025] This application provides a feature selection method. In the first embodiment of the feature selection method of this application, referring to... Figure 1 The feature selection method is applied to the first device, and the feature selection method includes:

[0026] Step S10: Obtain the feature data to be selected and normalize the feature data to be selected in order to construct the correlation auxiliary calculation parameter data corresponding to the feature data to be selected.

[0027] In this embodiment, it should be noted that feature selection can be based on the correlation coefficient between features, wherein the correlation coefficient includes the Pearson correlation coefficient, and the formula for calculating the Pearson correlation coefficient is as follows:

[0028]

[0029] in, The Pearson correlation coefficient between X1 and X2 is... Let σ1 be the covariance between X1 and X2, σ2 be the standard deviation of X1, and σ2 be the standard deviation of X2.

[0030] Additionally, it should be noted that the first device is a participant in the federated learning process that initiates the feature selection request, and there is also a second device that is a participant in the federated learning process. The first device contains first-party features, and the second device contains second-party features. Both the first and second devices need to perform feature selection by calculating the correlation coefficient between the first-party features and the second-party features. Furthermore, the candidate feature data includes at least one candidate feature vector corresponding to a candidate feature. The candidate feature vector is a vector composed of each candidate feature value corresponding to the candidate feature, and the candidate feature vector includes at least one candidate feature value.

[0031] To acquire candidate feature data and normalize it, correlation auxiliary calculation parameter data corresponding to the candidate feature data is constructed. Specifically, candidate feature data is acquired, and a candidate feature vector is selected from the candidate feature data. Then, statistical feature data of each candidate feature value in the candidate feature vector is calculated. The statistical feature data includes mean, standard deviation, and variance. Based on the statistical feature data, the candidate feature values ​​are normalized respectively to generate correlation auxiliary calculation parameters corresponding to each candidate feature value, thus obtaining correlation auxiliary calculation parameter data. The correlation auxiliary calculation parameter data includes at least one correlation auxiliary calculation parameter corresponding to a candidate feature value. The correlation auxiliary calculation parameter is a parameter for assisting in calculating the correlation coefficient. It is used to calculate the secret shared inner product between the correlation auxiliary calculation parameter and the second-party correlation auxiliary calculation parameter in the second device through secret sharing, so as to calculate the correlation coefficient value between the candidate feature value and the second-party candidate feature value corresponding to the second-party correlation auxiliary calculation parameter. The second device generates the second-party correlation auxiliary calculation parameter in the same way as the first device generates the correlation auxiliary calculation parameter.

[0032] The feature data to be selected includes at least one feature vector to be selected.

[0033] The step of normalizing the feature data to be selected in order to construct the correlation auxiliary calculation parameter data corresponding to the feature data to be selected includes:

[0034] Step S11: Calculate the feature mean and the corresponding feature standard deviation for each feature value in the feature vector to be selected;

[0035] In this embodiment, it should be noted that the feature vector to be selected is a vector composed of the feature values ​​corresponding to the feature to be selected. For example, assuming there are samples A, B and C corresponding to the age feature, if the age of sample A is 10 years old, the age of sample B is 15 years old and the age of sample C is 20 years old, then the feature vector corresponding to the age feature is (10, 15, 20).

[0036] Calculate the feature mean and the feature standard deviation corresponding to each feature value in the feature vector to be selected. Specifically, calculate the average value of each feature value in the feature vector to be selected to obtain the feature mean, and then calculate the standard deviation corresponding to each feature value to obtain the feature standard deviation based on the feature mean.

[0037] Step S12: Based on the feature mean and the feature standard deviation, generate initial auxiliary parameters corresponding to each of the selected feature values;

[0038] In this embodiment, based on the feature mean and the feature standard deviation, initial auxiliary parameters corresponding to each of the candidate feature values ​​are generated. Specifically, for each candidate feature value, the following steps are performed:

[0039] The average value of the feature, the standard deviation of the feature, and the feature value to be selected are input into a preset normalization formula to calculate the initial auxiliary parameters. The preset normalization formula is as follows:

[0040]

[0041] Among them, y i Let x be the initial auxiliary parameter. i Let x be the feature value to be selected, mean(x) be the average value of the feature, and σ be the standard deviation of the feature.

[0042] Step S13: Encode each of the initial auxiliary parameters into floating-point numbers to convert each of the initial auxiliary parameters into decimal numbers and obtain the correlation auxiliary calculation parameter data.

[0043] In this embodiment, it should be noted that the correlation auxiliary calculation parameter data includes at least one correlation auxiliary calculation parameter corresponding to the initial auxiliary parameter.

[0044] Each of the initial auxiliary parameters is encoded into a floating-point number to convert it into a decimal number, thereby obtaining the correlation auxiliary calculation parameter data. Specifically, the following steps are performed on each of the initial auxiliary parameters:

[0045] By inputting the initial auxiliary parameters into a preset floating-point encoding formula, the initial auxiliary parameters are encoded into floating-point numbers to convert them into decimal numbers, thereby obtaining the relevant auxiliary calculation parameters. The preset floating-point encoding formula is as follows:

[0046] encode(x) = (x * base frac )%field

[0047] Wherein, encode(x) is the correlation auxiliary calculation parameter, x is the initial auxiliary parameter, base is the base for the number system conversion, frac is the exponent, and field is the field length. It should be noted that converting the original data to decimal data for calculation can avoid calculations between decimals, thereby reducing the computational complexity and improving the computational efficiency.

[0048] The step of obtaining the feature data to be selected includes:

[0049] Step A10: Align the samples with the second device to obtain a sample ID sequence, so that the second device can acquire the sample ID sequence and generate second selectable feature data based on the sample ID sequence;

[0050] In this embodiment, it should be noted that the feature selection method is applied to a vertical federated learning scenario.

[0051] The sample is aligned with the second device to obtain a sample ID sequence, which is then used by the second device to acquire the sample ID sequence. Based on the sample ID sequence, a second set of selectable feature data is generated. Specifically, the sample is aligned with the second device to obtain a sample ID sequence with a sample ID arrangement order, wherein the second device obtains the same sample ID sequence as the first device.

[0052] Step A20: Extract the sample data corresponding to the sample ID sequence, and generate the feature data to be selected based on the arrangement order of the sample ID sequence.

[0053] In this embodiment, it should be noted that the sample data includes at least one sample representation vector corresponding to a sample, and the sample ID sequence includes at least one sample ID. The sample representation vector is a vector composed of the feature values ​​of each selectable feature corresponding to the sample. For example, assuming that user A has a feature value of a corresponding to feature X, a feature value of b corresponding to feature Y, and a feature value of c corresponding to feature Z, then the sample feature vector is (a, b, c).

[0054] Extract sample data corresponding to the sample ID sequence, and generate the feature data to be selected based on the arrangement order of the sample ID sequence. Specifically, extract the sample representation vector corresponding to each sample ID, and combine the sample representation vectors into a sample representation matrix based on the arrangement order of each sample ID in the sample ID sequence. Align the sample representation matrix with the second sample representation matrix generated by the second device. Each row of the sample representation matrix corresponds to a sample, and each column corresponds to a feature to be selected. The second sample representation matrix generated by the second device also has a second feature to be selected, with each row corresponding to a sample and each column corresponding to a second feature to be selected. The second sample representation matrix is ​​generated in the same way as the first sample representation matrix.

[0055] It should be noted that since the sample representation matrix is ​​aligned with the second sample representation matrix generated by the second device, the rows of the sample representation matrix and the second sample representation matrix have the same arrangement order. That is, rows at the same position in the sample representation matrix and the second sample representation matrix correspond to the same sample ID. Therefore, when performing feature correlation, a column is extracted from the sample representation matrix as the candidate feature vector, and a column is extracted from the second sample representation matrix as the second candidate feature vector. The feature values ​​at the same bit positions in the candidate feature vector and the second candidate feature vector correspond to the same sample ID. In other words, the candidate feature vector and the second candidate feature vector are aligned. Therefore, when calculating the feature correlation between the candidate feature and the second candidate feature, for the candidate feature… For each eigenvalue in the eigenvector, only the correlation coefficient between that eigenvalue and the eigenvalue at the same bit position in the second eigenvector to be selected needs to be calculated. There is no need to calculate the correlation coefficient between each pair of eigenvalues ​​in the first eigenvector and each eigenvalue in the second eigenvector to be selected. This reduces the useless calculation process when calculating the correlation coefficient, lowers the computational complexity, and improves the computational efficiency, thereby improving the efficiency of feature selection. For example, when calculating the feature correlation between a eigenvector A of length 3 and a second eigenvector B of length 3, it is usually necessary to perform 9 calculations of the correlation coefficient to generate a 3*3 correlation coefficient matrix. However, if each eigenvalue of A and B is aligned, only 3 calculations of the correlation coefficient are needed to generate a 1*3 correlation coefficient vector.

[0056] Step S20: Based on the correlation auxiliary calculation parameter data, calculate feature correlation data through secret sharing interaction with the second device;

[0057] In this embodiment, it should be noted that the second device will also calculate the second-party correlation auxiliary calculation parameter data corresponding to the second-party feature vector to be selected. The calculation method of the second device calculating the second-party correlation auxiliary calculation parameter data is the same as that of the first device calculating the correlation auxiliary calculation parameter data. The second-party correlation auxiliary calculation parameter data includes at least one second-party correlation auxiliary calculation parameter.

[0058] Based on the aforementioned correlation auxiliary calculation parameter data, feature correlation data is calculated through secret sharing interaction with the second device. Specifically, for each of the aforementioned correlation auxiliary calculation parameters and each of the second-party correlation auxiliary calculation parameters, the following steps are performed:

[0059] Based on secret shared multiplication, the first device and the second device jointly calculate the secret shared inner product between the correlation auxiliary calculation parameter and the second-party correlation auxiliary calculation parameter. Then, through decryption interaction between the first device and the second device, the secret shared inner product is decrypted to obtain the feature correlation coefficient value. It should be noted that there is a feature correlation coefficient value between each of the correlation auxiliary calculation parameters and each of the second-party correlation auxiliary calculation parameters. The feature correlation coefficient values ​​are then combined to form a feature correlation matrix between the selected feature vector and the second-party selected feature vector, and the feature correlation matrix is ​​used as the feature correlation data.

[0060] Furthermore, it should be noted that in existing technologies, the participants in federated learning send data to a trusted third party using homomorphic encryption, and the trusted third party determines the correlation coefficient under homomorphic encryption. Because the amount of homomorphically encrypted data is much larger than the original data (unencrypted data), data transmission between devices becomes time-consuming and has high latency. In contrast, in this embodiment, since data sharing does not require encryption, the amount of data transmitted between devices is smaller, resulting in less data transmission time and lower latency. Moreover, because the amount of secretly shared data is small, the computational load and complexity are low when the first and second devices perform calculations. Therefore, by improving the internal performance of the computers, the first and second devices are made more suitable for feature selection, thereby improving the efficiency of feature selection.

[0061] Step S30: Based on the feature correlation data, perform feature selection on the feature data to be selected to obtain the feature selection result.

[0062] In this embodiment, it should be noted that the feature correlation data includes a feature correlation matrix, which corresponds to a feature to be selected in the first device and a second feature to be selected in the second device.

[0063] Based on the feature correlation data, feature selection is performed on the candidate feature data to obtain feature selection results. Specifically, the feature correlation matrix is ​​input into a preset collinearity feature discrimination model to determine whether the candidate feature and the second candidate feature are collinear features. If so, the feature data corresponding to the collinear feature is removed from the feature correlation data to obtain the removed feature data, and the removed feature data is used as the feature selection result. If not, it is not removed. The collinear feature is a candidate feature whose correlation with the second candidate feature is greater than a preset first correlation threshold.

[0064] Wherein, each of the candidate feature data corresponds to at least one candidate feature, and each candidate feature corresponds to a feature correlation data.

[0065] The step of performing feature selection on the feature data to obtain the feature selection result based on the feature correlation data includes:

[0066] Step S31: Based on the correlation data of each feature, filter collinear features from the features to be selected;

[0067] In this embodiment, collinear features are screened from the selected features based on the correlation data of each feature. Specifically, the correlation data of each feature is input into a preset classification model to classify the correlation data of each feature and obtain classification labels. Then, collinear features are screened from the selected features based on the classification labels.

[0068] Step S32: Perform feature selection on the feature data to be selected, so as to remove the feature data corresponding to the collinearity feature from the feature data to be selected, and obtain the feature selection result.

[0069] In this embodiment, feature selection is performed on the feature data to be selected, so as to remove the feature data corresponding to the collinear features from the feature data to be selected, and obtain the feature selection result. Specifically, the data after removing the feature data corresponding to the collinear features from the feature data to be selected is used as the feature selection result. It should be noted that two collinear features have the same effect on model training. Therefore, removing one feature from two collinear features for model training can reduce the computation process with low contribution to model training, thereby improving the computational efficiency of model training.

[0070] This application provides a feature selection method. Compared to the existing technology where participants in federated learning send data to a trusted third party using homomorphic encryption, and the trusted third party determines the correlation coefficient under homomorphic encryption and feeds it back to each participant for feature selection, this application, after obtaining the feature data to be selected, normalizes the feature data to construct the correlation auxiliary calculation parameter data corresponding to the feature data to be selected. Then, based on the correlation auxiliary calculation parameter data, it calculates the feature correlation data through secret sharing interaction with a second device. That is, it calculates the feature correlation coefficient data together with the second device through secret sharing. It should be noted that during the secret sharing process, there is no need to encrypt the data into ciphertext, thus achieving the purpose of calculating the correlation coefficient without encrypting the original data. Based on the feature correlation data, feature selection is performed on the feature data to be selected to obtain the feature selection result. This overcomes the technical defect that after homomorphic encryption, the amount of ciphertext data is much larger than the original data, which leads to high complexity in calculating the correlation coefficient under encrypted state, resulting in low efficiency of feature selection. Therefore, this method improves the efficiency of feature selection.

[0071] Furthermore, referring to Figure 2 Based on the first embodiment of this application, in another embodiment of this application, the correlation auxiliary calculation parameter data includes at least one correlation auxiliary calculation parameter, and the feature correlation data includes at least one feature correlation value.

[0072] The step of calculating feature correlation data based on the correlation-assisted calculation parameter data and through secret sharing interaction with the second device includes:

[0073] Step S21: Based on the correlation auxiliary calculation parameters, secretly share them with the second device to obtain the secret-shared correlation auxiliary calculation parameters;

[0074] In this embodiment, the secret shared correlation auxiliary calculation parameters include a first shared first-party auxiliary calculation parameter and a second shared second-party auxiliary calculation parameter, and the second device contains the second-party correlation auxiliary calculation parameter.

[0075] Based on the aforementioned correlation auxiliary calculation parameters, a secret sharing is performed with the second device to obtain secret shared correlation auxiliary calculation parameters. Specifically, the first device splits and shares the correlation auxiliary calculation parameters to the second device. Then, the first device uses a portion of the split and shared correlation auxiliary calculation parameters as a first shared first-party auxiliary calculation parameter, and the second device uses another portion of the split and shared correlation auxiliary calculation parameters as a second shared first-party auxiliary calculation parameter. The second device then splits and shares the second-party correlation auxiliary calculation parameters to the first device. Then, the second device uses a portion of the split and shared second-party correlation auxiliary calculation parameters as a first shared second-party auxiliary calculation parameter, and the first device uses another portion of the split and shared second-party correlation auxiliary calculation parameters as a second shared second-party auxiliary calculation parameter.

[0076] The secret sharing correlation auxiliary calculation parameters include first sharing first-party auxiliary calculation parameters and second sharing second-party auxiliary calculation parameters.

[0077] The step of secretly sharing the correlation auxiliary calculation parameters with the second device based on the correlation auxiliary calculation parameters includes:

[0078] Step S211: The correlation auxiliary calculation parameters are split and shared to the second device to obtain the first shared first-party auxiliary calculation parameters, so that the second device can obtain the second shared first-party auxiliary calculation parameters;

[0079] In this embodiment, it should be noted that the first shared first-party auxiliary calculation parameter is the first split part of the correlation auxiliary calculation parameter, and the second shared second-party auxiliary calculation parameter is the second split part of the second-party correlation auxiliary calculation parameter.

[0080] The correlation auxiliary calculation parameters are split and shared to the second device to obtain the first shared first-party auxiliary calculation parameters, so that the second device can obtain the second shared first-party auxiliary calculation parameters. Specifically, the correlation auxiliary calculation parameters are split to obtain a first split part and a second split part of the correlation auxiliary calculation parameters. The first split part of the correlation auxiliary calculation parameters is then used as the first shared first-party auxiliary calculation parameters, and the second split part of the correlation auxiliary calculation parameters is sent to the second device so that the second device can use the second split part of the correlation auxiliary calculation parameters as the second shared first-party auxiliary calculation parameters.

[0081] Step S212: Receive the second shared second-party auxiliary calculation parameters sent by the second device, wherein the second device is used to split and share the acquired second-party correlation auxiliary calculation parameters to the first device to obtain the first shared second-party auxiliary calculation parameters, so that the first device can obtain the second shared second-party auxiliary calculation parameters.

[0082] In this embodiment, the second shared second-party auxiliary calculation parameters sent by the second device are received. The second device is used to split and share the acquired second-party correlation auxiliary calculation parameters to the first device to obtain first shared second-party auxiliary calculation parameters, so that the first device can obtain the second shared second-party auxiliary calculation parameters. Specifically, the second device splits the second-party correlation auxiliary calculation parameters to obtain a first split part and a second split part of the second-party correlation auxiliary calculation parameters. Then, the first split part of the second-party correlation auxiliary calculation parameters is used as the first shared second-party auxiliary calculation parameters, and the second split part of the second-party correlation auxiliary calculation parameters is sent to the second device. Then, the first device receives the second split part of the second-party correlation auxiliary calculation parameters and uses the second split part of the second-party correlation auxiliary calculation parameters as the second shared second-party auxiliary calculation parameters.

[0083] Step S22: Based on the secret sharing correlation auxiliary calculation parameters, perform secret sharing interactive calculation with the second device through preset secret sharing multiplication to obtain the secret sharing feature correlation value;

[0084] In this embodiment, it should be noted that the first device and the second device need to secretly share a multiplication triple, wherein the multiplication triple is an array of three parameters that have a product relationship. For example, assuming the multiplication triple is (a, b, c), then the product relationship is c = a * b.

[0085] Based on the aforementioned secret sharing correlation auxiliary calculation parameters, and through a preset secret sharing multiplication, the first device performs secret sharing interactive calculations with the second device to obtain secret sharing feature correlation values. Specifically, the first device obtains the first split portion of the multiplication triplet as the first shared multiplication triplet, and calculates the first-party shared blinding parameter based on the first shared multiplication triplet, the first shared first-party auxiliary calculation parameters, and the second shared second-party auxiliary calculation parameters. Then, the second device obtains the second split portion of the multiplication triplet as the second shared multiplication triplet, and calculates the second-party shared blinding parameter based on the second shared multiplication triplet, the second shared first-party auxiliary calculation parameters, and the first shared second-party auxiliary calculation parameters. Then, the first device and the second device perform decryption interaction to generate a blinding parameter corresponding to both the first-party shared blinding parameter and the second-party shared blinding parameter. Then, the first device generates a secret sharing feature correlation value based on the blinding parameter and the first shared multiplication triplet, and the second device generates a second-party secret sharing feature correlation value based on the blinding parameter and the second shared multiplication triplet.

[0086] The step of obtaining the secret sharing feature correlation value by performing secret sharing interactive calculation with the second device based on the secret sharing correlation auxiliary calculation parameters and through preset secret sharing multiplication includes:

[0087] Step S221: Generate a multiplication triplet and secretly share the multiplication triplet with the second device to obtain a first shared multiplication triplet, so that the second device can obtain a second shared multiplication triplet.

[0088] In this embodiment, a multiplication triple is generated and secretly shared with the second device to obtain a first shared multiplication triple, which is then used by the second device to obtain a second shared multiplication triple. Specifically, a third-party device generates the multiplication triple and splits each parameter of the multiplication triple into two parts to obtain a first split part and a second split part. The first split part of the multiplication triple is then sent to the first device as the first shared multiplication triple, and the second split part is sent to the second device as the second shared multiplication triple. For example, assuming the multiplication triple is (a, b, c), then the first shared multiplication triple is ([[a]). A ,[[b]] A ,[[c]] A The second shared multiplication triple is ([[a])). B ,[[b]] B ,[[c]] B ), where [[a]] A +[[a]] B=a, [[b]] A +[[b]] B =b,[[c]] A +[[c]] B =c, c = a*b.

[0089] Step S222: Generate first-party shared blinding parameters based on the first shared multiplication triplet and the secret shared correlation auxiliary calculation parameters;

[0090] In this embodiment, it should be noted that the first shared blinding parameter includes a first shared blinding parameter and a second shared blinding parameter.

[0091] Based on the first shared multiplication triplet and the secret shared correlation auxiliary calculation parameters, a first-party shared blinding parameter is generated. Specifically, the difference between the first shared first-party auxiliary calculation parameter and the first shared multiplication triplet parameter in the first shared multiplication triplet is calculated to obtain the first shared blinding parameter. The difference between the second shared second-party auxiliary calculation parameter and the second shared multiplication triplet parameter in the first shared multiplication triplet is then calculated to obtain the second shared blinding parameter. The calculation process for the first and second shared blinding parameters is as follows:

[0092] [[e]] A =[[x]] A -[[a]] A

[0093] [[f]] A =[[y]] A -[[b]] A

[0094] Among them, [[e]] A For the first shared blinding parameter, [[f]] A Given the second shared blinding parameter, the first shared multiplication triple is ([[a]). A ,[[b]] A ,[[c]] A ), [[x]] A For the first shared first-party auxiliary calculation parameters, [[a]] A Let [y] be the parameter of the first shared multiplication triplet in the first shared multiplication triplet. A For the second shared second-party auxiliary calculation parameters, [[b]] A Let [the parameter be] the parameter of the second shared multiplication triple in the first shared multiplication triple. A This indicates that the data belongs to the first device.

[0095] Step S223: Based on the first party shared blinding parameters, perform secret sharing and decryption interaction with the second device to generate blinding parameters in conjunction with the second party shared blinding parameters generated by the second device;

[0096] In this embodiment, it should be noted that the blinding parameters include a first blinding parameter and a second blinding parameter. The calculation process of the second device in calculating the third and fourth shared blinding parameters in the second-party shared blinding parameters is as follows:

[0097] [[e]] B =[[x]] B -[[a]] B

[0098] [[f]] B =[[y]] B -[[b]] B

[0099] Among them, [[e]] B For the third shared blinding parameter, [[f]] B The fourth shared blinding parameter is given, and the second shared multiplication triple is ([[a]). B ,[[b]] B ,[[c]] B ), [[x]] B For the second shared first-party auxiliary calculation parameters, [[y]] B For the first shared second-party auxiliary calculation parameters, [[]] B This indicates that the data belongs to the second device.

[0100] Based on the first-party shared blinding parameters, a secret sharing and decryption interaction is performed with the second device to jointly generate blinding parameters with the second-party shared blinding parameters generated by the second device. Specifically, the first device receives the third and fourth shared blinding parameters sent by the second device, and then calculates the sum of the third and first shared blinding parameters to obtain the first blinding parameter. The first device also calculates the sum of the fourth and second shared blinding parameters to obtain the second blinding parameter. Similarly, the first device sends the first and second shared blinding parameters to the second device for the second device to calculate the first and second blinding parameters. The calculation process for the first and second blinding parameters is as follows:

[0101] e = [[e]] A +[[e]] B =[[x]] A -[[a]] A +[[x]] B-[[a]] B =xa

[0102] f = [[f]] A +[[f]] B =[[y]] B -[[b]] B +[[y]] B -[[b]] B =yb

[0103] Where e is the first blinding parameter, f is the second blinding parameter, and the multiplication triple is (a, b, c), [[x]] A For the first shared first-party auxiliary calculation parameters, [[y]] A For the second shared second-party auxiliary calculation parameters, [[x]] B For the second shared first-party auxiliary calculation parameters, [[y]] B For the first shared second-party auxiliary calculation parameters, [[]] A This indicates that the data belongs to the first device. B This indicates that the data belongs to the second device.

[0104] Step S224: Calculate the correlation value of the secret shared feature based on the blinding parameter and the first shared multiplication triple.

[0105] In this embodiment, the correlation value of the secret shared feature is calculated based on the blinding parameter and the first shared multiplication triple. Specifically, the first blinding parameter, the second blinding parameter, and each parameter in the first shared multiplication triple are substituted into a preset formula for calculating the correlation value of the secret shared feature to calculate the correlation value of the secret shared feature. The preset formula for calculating the correlation value of the secret shared feature is as follows:

[0106] [[x*y]] A =f*[[a]] A +e*[[b]] A +[[c]] A

[0107] Wherein, the first shared multiplication triple is ([[a]) A ,[[b]] A ,[[c]] A ), [[x*y]] A Let e ​​be the correlation value of the secret shared feature, f be the first blinding parameter, and f be the second blinding parameter.

[0108] Additionally, the formula for calculating the correlation value of the second-party secret sharing feature by the second device is as follows:

[0109] [[x*y]] B =e*f+f*[[a]] B +e*[[b]] B +[[c]] B

[0110] The second shared multiplication triple is ([[a])). B ,[[b]] B ,[[c]] B ), [[x*y]] B denoted as the correlation value of the second party's secret sharing feature, e is the first blinding parameter, and f is the second blinding parameter.

[0111] Step S23: Based on the secret shared feature correlation value, perform decryption interaction with the second device to obtain the feature correlation value.

[0112] In this embodiment, based on the secret shared feature correlation value, a decryption interaction is performed with the second device to obtain the feature correlation value. Specifically, the second-party secret shared feature correlation value sent by the second device is received, and the sum of the secret shared feature correlation value and the second-party secret shared feature correlation value is calculated to obtain the feature correlation value. Similarly, the secret shared feature correlation value is sent to the second device for the second device to calculate the feature correlation value. The calculation process of the feature correlation value is as follows:

[0113] [[x*y]] A +[[x*y]] B = e*f + f*a + e*b + c

[0114] Substituting e = xa and f = yb into the above calculation expression, we can obtain [[x*y]]. A +[[x*y]] B =x*y.

[0115] The step of obtaining the feature correlation value by performing decryption interaction with the second device based on the secret sharing feature correlation value includes:

[0116] Step S231: Receive the second-party secret shared feature correlation value sent by the second device, and send the secret shared feature correlation value to the second device so that the second device can calculate the feature correlation value;

[0117] In this embodiment, the system receives a second-party secret sharing feature correlation value sent by the second device and sends the secret sharing feature correlation value to the second device so that the second device can calculate the feature correlation value. Specifically, the system receives a second-party secret sharing feature correlation value sent by the second device and sends the secret sharing feature correlation value to the second device. Then, the second device calculates the sum of the secret sharing feature correlation value and the second-party secret sharing feature correlation value to obtain a decoding result. The decoding result is then converted into a floating-point number to obtain the feature correlation value.

[0118] Step S232: Generate a decoding result based on the correlation value of the secret sharing feature and the correlation value of the second party's secret sharing feature;

[0119] In this embodiment, it should be noted that the decoding result is the sum of the correlation value of the secret sharing feature and the correlation value of the second party's secret sharing feature.

[0120] Step S233: Convert the decoding result into a floating-point number to obtain the feature correlation value.

[0121] In this embodiment, the decoding result is converted into a floating-point number to obtain the feature correlation value. Specifically, based on a preset floating-point conversion formula, the decoding result is converted into a floating-point number to obtain the feature correlation value. The preset floating-point conversion formula is as follows:

[0122]

[0123] Where decode(x) is the feature correlation value, H is the decoding result, base is the base for number system conversion, and frac is the exponent.

[0124] Additionally, it should be noted that when the first device and the second device perform calculations through secret sharing interaction, since both the first device and the second device only possess a portion of the other party's privacy data, neither the first device nor the second device possesses the other party's complete privacy data. Furthermore, during the calculation, secret sharing calculations are still performed based on a portion of the data until the final secret sharing calculation results are exchanged to obtain feature correlation data. Feature correlation data is only related to the statistical characteristic values ​​of the privacy data, such as the mean, variance, and covariance. Neither the first device nor the second device can deduce the other party's privacy data from the feature correlation data, thereby achieving privacy protection during feature selection.

[0125] This application provides a method for calculating feature correlation data based on secret sharing. Specifically, it discloses a method for secretly sharing correlation auxiliary calculation parameters with a second device to obtain these parameters. Then, based on these parameters, a secret sharing multiplication is performed with the second device to obtain a secret sharing feature correlation value. Finally, based on this value, a decryption interaction is performed with the second device to obtain the feature correlation value. It should be noted that during the secret sharing process, there is no need to encrypt the data into ciphertext. This achieves the goal of calculating the correlation coefficient without encrypting the original data. Based on the feature correlation data, feature selection is performed on the selected feature data to obtain the feature selection result. This method overcomes the technical drawback that after homomorphic encryption, the ciphertext data volume is much larger than the original data, leading to high computational complexity of correlation coefficient calculation in the encrypted state and consequently low efficiency in feature selection.

[0126] Reference Figure 3 , Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application.

[0127] like Figure 3 As shown, the feature selection device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to establish communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM or a stable, non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0128] Optionally, the feature selection device may also include a rectangular user interface, a network interface, a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, etc. The rectangular user interface may include a display screen and an input submodule such as a keyboard. Optionally, the rectangular user interface may also include a standard wired interface or a wireless interface. The network interface may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0129] Those skilled in the art will understand that Figure 3 The feature selection device structure shown does not constitute a limitation on the feature selection device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0130] like Figure 3 As shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, and a feature selection program. The operating system is a program that manages and controls the hardware and software resources of the feature selection device, supporting the operation of the feature selection program and other software and / or programs. The network communication module is used to enable communication between the various components within the memory 1005, as well as communication with other hardware and software in the feature selection system.

[0131] exist Figure 3 In the feature selection device shown, the processor 1001 is used to execute the feature selection program stored in the memory 1005 to implement the steps of the feature selection method described above.

[0132] The specific implementation of the feature selection device in this application is basically the same as the embodiments of the feature selection method described above, and will not be repeated here.

[0133] This application embodiment also provides a feature selection device, which is applied to a first device, and the feature selection device includes:

[0134] The normalization processing module is used to obtain the feature data to be selected and to perform normalization processing on the feature data to be selected in order to construct the correlation auxiliary calculation parameter data corresponding to the feature data to be selected.

[0135] The secret sharing module is used to calculate feature correlation data by secretly sharing with the second device based on the correlation auxiliary calculation parameter data;

[0136] The feature selection module is used to select features from the feature data to be selected based on the feature correlation data, and obtain the feature selection result.

[0137] Optionally, the feature selection module is further configured to:

[0138] Based on the correlation data of each feature, collinear features are selected from the features to be selected;

[0139] Feature selection is performed on the feature data to be selected, so as to remove the feature data corresponding to the collinearity feature from the feature data to be selected, and the feature selection result is obtained.

[0140] Optionally, the normalization processing module is further configured to:

[0141] Based on the correlation data of each feature, collinear features are selected from the features to be selected;

[0142] Feature selection is performed on the feature data to be selected, so as to remove the feature data corresponding to the collinearity feature from the feature data to be selected, and the feature selection result is obtained.

[0143] Optionally, the normalization processing module is further configured to:

[0144] Calculate the feature mean and the corresponding feature standard deviation for each feature value in the feature vector to be selected;

[0145] Based on the feature mean and the feature standard deviation, generate initial auxiliary parameters corresponding to each of the feature values ​​to be selected;

[0146] Each of the initial auxiliary parameters is encoded into a floating-point number to convert it into a decimal number, thereby obtaining the correlation auxiliary calculation parameter data.

[0147] Optionally, the secret sharing module is further configured to:

[0148] Based on the aforementioned correlation auxiliary calculation parameters, they are secretly shared with the second device to obtain the secretly shared correlation auxiliary calculation parameters.

[0149] Based on the aforementioned secret sharing correlation auxiliary calculation parameters, secret sharing interaction calculation is performed with the second device through a preset secret sharing multiplication to obtain the secret sharing feature correlation value;

[0150] Based on the secret shared feature correlation value, a decryption interaction is performed with the second device to obtain the feature correlation value.

[0151] Optionally, the secret sharing module is further configured to:

[0152] The correlation auxiliary calculation parameters are split and shared to the second device to obtain the first shared first-party auxiliary calculation parameters, so that the second device can obtain the second shared first-party auxiliary calculation parameters;

[0153] The second device receives the second shared second-party auxiliary calculation parameters sent by the second device, wherein the second device is used to split and share the acquired second-party correlation auxiliary calculation parameters to the first device to obtain the first shared second-party auxiliary calculation parameters, so that the first device can obtain the second shared second-party auxiliary calculation parameters.

[0154] Optionally, the secret sharing module is further configured to:

[0155] Generate a multiplication triplet and secretly share the multiplication triplet with the second device to obtain a first shared multiplication triplet, so that the second device can obtain a second shared multiplication triplet;

[0156] Based on the first shared multiplication triplet and the secret shared correlation auxiliary calculation parameters, a first-party shared blinding parameter is generated.

[0157] Based on the first party's shared blinding parameters, a secret sharing and decryption interaction is performed with the second device to generate blinding parameters in conjunction with the second party's shared blinding parameters generated by the second device.

[0158] Based on the blinding parameters and the first shared multiplication triple, the correlation value of the secret shared feature is calculated.

[0159] Optionally, the secret sharing module is further configured to:

[0160] The system receives a second-party secret-shared feature correlation value sent by the second device and sends the secret-shared feature correlation value to the second device so that the second device can calculate the feature correlation value.

[0161] Based on the correlation value of the secret sharing feature and the correlation value of the second party's secret sharing feature, a decoding result is generated;

[0162] The decoding result is converted into a floating-point number to obtain the feature correlation value.

[0163] The specific implementation of the feature selection device in this application is basically the same as the various embodiments of the feature selection method described above, and will not be repeated here.

[0164] This application provides a readable storage medium that stores one or more programs, which can be executed by one or more processors to implement the steps of the feature selection method described in any of the above claims.

[0165] The specific implementation of the readable storage medium in this application is basically the same as the embodiments of the feature selection method described above, and will not be repeated here.

[0166] This application provides a computer program product, which includes one or more computer programs. The one or more computer programs can be executed by one or more processors to implement the steps of the feature selection method described in any of the above claims.

[0167] The specific implementation of the computer program product in this application is basically the same as the embodiments of the feature selection method described above, and will not be repeated here.

[0168] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.

Claims

1. A feature selection method characterized by, The feature selection method is applied to a first device, and the feature selection method comprises: obtaining to-be-selected feature data, and performing normalization processing on the to-be-selected feature data to construct correlation auxiliary calculation parameter data corresponding to the to-be-selected feature data; based on the correlation auxiliary calculation parameter data, calculating feature correlation data through secret sharing interaction with a second device; based on the feature correlation data, performing feature selection on the to-be-selected feature data to obtain a feature selection result; wherein the step of obtaining to-be-selected feature data and performing normalization processing on the to-be-selected feature data to construct correlation auxiliary calculation parameter data corresponding to the to-be-selected feature data comprises: obtaining to-be-selected feature data, and selecting a to-be-selected feature vector in the to-be-selected feature data, and calculating statistical feature data of each to-be-selected feature value in the to-be-selected feature vector, wherein the statistical feature data comprises mean, standard deviation and variance; based on the statistical feature data, respectively normalizing the to-be-selected feature values to generate correlation auxiliary calculation parameters corresponding to each to-be-selected feature value, and obtaining correlation auxiliary calculation parameter data, wherein the correlation auxiliary calculation parameter data at least comprises a correlation auxiliary calculation parameter corresponding to a to-be-selected feature value; wherein the step of calculating feature correlation data based on the correlation auxiliary calculation parameter data through secret sharing interaction with a second device comprises: based on the correlation auxiliary calculation parameter, performing secret sharing with the second device to obtain secret sharing correlation auxiliary calculation parameters; based on the secret sharing correlation auxiliary calculation parameters, performing secret sharing interaction calculation with the second device through a preset secret sharing multiplication to obtain secret sharing feature correlation values; based on the secret sharing feature correlation values, performing decryption interaction with the second device to obtain the feature correlation values.

2. The feature selection method of claim 1, wherein, The to-be-selected feature data corresponds to at least one to-be-selected feature, and one to-be-selected feature corresponds to a feature correlation data, The step of performing feature selection on the to-be-selected feature data based on the feature correlation data to obtain a feature selection result comprises: based on each feature correlation data, screening collinear features in each to-be-selected feature; performing feature selection on the to-be-selected feature data to eliminate feature data corresponding to the collinear features in the to-be-selected feature data to obtain the feature selection result.

3. The feature selection method of claim 1, wherein, The step of obtaining to-be-selected feature data comprises: performing sample alignment with a second device to obtain a sample ID sequence, so that the second device obtains the sample ID sequence and generates second to-be-selected feature data based on the sample ID sequence; extracting sample data corresponding to the sample ID sequence, and generating the to-be-selected feature data based on the arrangement order of the sample ID sequence.

4. The feature selection method of claim 1, wherein, The secret sharing correlation auxiliary calculation parameters comprise first shared first-party auxiliary calculation parameters and second shared second-party auxiliary calculation parameters, The step of assisting in calculating the parameter based on the correlation includes: splitting and sharing the correlation auxiliary calculation parameter to the second device to obtain the first shared first-party auxiliary calculation parameter for the second device to obtain the second shared first-party auxiliary calculation parameter; receiving the second shared second-party auxiliary calculation parameter sent by the second device, wherein the second device is configured to split and share the obtained second-party correlation auxiliary calculation parameter to the first device to obtain the first shared second-party auxiliary calculation parameter for the first device to obtain the second shared second-party auxiliary calculation parameter.

5. The feature selection method of claim 1, wherein, The step of assisting in calculating the parameter based on the correlation includes: generating a multiplication triple and secret sharing the multiplication triple to the second device to obtain the first shared multiplication triple for the second device to obtain the second shared multiplication triple; generating a first-party shared blinding parameter based on the first shared multiplication triple and the secret sharing correlation auxiliary calculation parameter; decrypting and interacting with the second device based on the first-party shared blinding parameter to jointly generate a second-party shared blinding parameter generated by the second device to generate a blinding parameter; calculating the secret sharing feature correlation value based on the blinding parameter and the first shared multiplication triple.

6. The feature selection method of claim 1, wherein, The step of assisting in calculating the parameter based on the correlation includes: receiving the second-party secret sharing feature correlation value sent by the second device and sending the secret sharing feature correlation value to the second device for the second device to calculate the feature correlation value; generating a decoding result based on the secret sharing feature correlation value and the second-party secret sharing feature correlation value; converting the decoding result into a floating-point number to obtain the feature correlation value.

7. The feature selection method of claim 1, wherein, The to-be-selected feature data at least includes a to-be-selected feature vector, The step of normalizing the to-be-selected feature data to construct the correlation auxiliary calculation parameter data corresponding to the to-be-selected feature data includes: calculating the feature mean value corresponding to each to-be-selected feature value in the to-be-selected feature vector and the corresponding feature standard deviation; generating an initial auxiliary parameter corresponding to each to-be-selected feature value based on the feature mean value and the feature standard deviation; respectively floating-point number encoding each initial auxiliary parameter to convert each initial auxiliary parameter into a decimal number to obtain the correlation auxiliary calculation parameter data.

8. A feature selection device, characterized by The feature selection device includes a memory, a processor, and a program stored in the memory for implementing the feature selection method, The memory is configured to store the program for implementing the feature selection method; The processor is configured to execute the program for implementing the feature selection method to implement the steps of the feature selection method according to any one of claims 1 to 7.

9. A readable storage medium, characterized by, The readable storage medium has stored thereon a program for implementing a feature selection method, and the program for implementing the feature selection method is executed by a processor to implement the steps of the feature selection method according to any one of claims 1 to 7.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by a processor to implement the steps of the feature selection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for feature selection in a support vector machine using feature ranking

    US20080233576A1

  • Security credentials

    WO2018172782A1