Sample Feature Binning Method, Terminal, Device, and Medium Based on Federated Learning

Through the sample feature binning method of federated learning, the first terminal sorts and boxs the sample information of the second terminal, solving the data leakage problem, realizing safe and efficient binning operations, and reducing computing resource consumption.

CN112633367BActive Publication Date: 2025-07-29WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011521194.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-21
Publication Date
2025-07-29
Estimated Expiration
2040-12-21

AI Technical Summary

Technical Problem

The existing sample feature binning method has the problem of data leakage, especially in the process of multi-party data model establishment, the transmission of feature values or labels leads to information leakage.

Method used

Using the sample feature binning method based on federated learning, the first terminal obtains the sample information of the second terminal, sorts and boxs the identifiers, determines the merge value, and sends the identifier to the second terminal when the merge requirements are not met to complete the binning and avoids direct transmission of the feature value.

Benefits of technology

It realizes sample feature binning without leaking real information, improves binning security, reduces the computing resource consumption of the first terminal, and improves the efficiency and security of binning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112633367B_ABST
    Figure CN112633367B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of fintech, and discloses a sample feature binning method, a terminal, a device, a medium, and a computer program product based on federated learning. The sample feature binning method based on federated learning: The first terminal obtains the sample information sent by the second terminal, where the sample information includes the identifiers corresponding to the sample features; sorts the identifiers, and performs binning operations on the sorted identifiers to obtain a plurality of first bins; determines the label value corresponding to each bin according to the identifier, and determines the merging value of adjacent first bins according to the label values corresponding to the first bins; when the merging values do not meet the merging requirements, sends the identifiers corresponding to each first bin to the second terminal for the second terminal to determine the feature values of each identifier belonging to the first bin as the same bin. The present invention avoids data leakage during feature binning and improves the security of sample feature binning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of financial technology (Fintech), and particularly to a sample feature binning method, a terminal, a device, a medium, and a computer program product based on federated learning. Background Art

[0002] With the development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually transforming into financial technology (Fintech). However, due to the security and real-time requirements of the financial industry, higher requirements are also imposed on technologies.

[0003] In the field of financial risk control, models need to be established through data from multiple parties. And the establishment of models requires binning the features of samples. Currently, the features of each sample need to be binned by combining the features of Party A and the labels of Party B. However, this binning method requires sending the feature values or labels to another party, making the true information known to the other party, that is, there is a problem of data leakage in the existing binning of sample features. Summary of the Invention

[0004] The main purpose of the present invention is to provide a sample feature binning method, a terminal, a device, a medium, and a computer program product based on federated learning, aiming to solve the problem of data leakage in the existing binning of sample features.

[0005] To achieve the above purpose, the present invention provides a sample feature binning method based on federated learning. The sample feature binning method based on federated learning includes:

[0006] A first terminal obtains sample information sent by a second terminal, where the sample information includes identifiers corresponding to sample features;

[0007] Sort the identifiers, and perform a binning operation on the sorted identifiers to obtain a plurality of first bins. The first terminal sorts the identifiers according to the data type associated with the identifiers, and the sample information includes the data type corresponding to the feature value of the sample feature;

[0008] Determine the label value corresponding to each bin according to the identifier, and determine the merging value of adjacent first bins according to the label values corresponding to the first bins;

[0009] When the merging values do not meet the merging requirements, send the identifiers corresponding to each first bin to the second terminal for the second terminal to determine the feature values of each identifier belonging to the first bin as the same bin.

[0010] In one embodiment, after the step of determining the merging value of adjacent first bins according to each label value corresponding to the first bin, the method further includes:

[0011] When there is a target merging value that meets the merging requirement, merging the adjacent first bins corresponding to the target merging value to obtain second bins;

[0012] Updating each of the second bins and the first bins that are not merged into respective first bins, and returning to execute the step of determining the merging value of adjacent first bins according to each label value corresponding to the first bin.

[0013] In one embodiment, after the step of updating each of the second bins and the first bins that are not merged into respective first bins, the method further includes:

[0014] Determining the number of updated first bins;

[0015] When the number is greater than the minimum number of bins, returning to execute the step of determining the merging value of adjacent first bins according to each label value corresponding to the first bin;

[0016] When the number is less than or equal to the minimum number of bins, sending each identifier corresponding to the updated first bin to a second terminal, so that the second terminal determines the feature values corresponding to each identifier belonging to the updated first bin as the same bin.

[0017] In one embodiment, the step of sorting each of the identifiers includes:

[0018] Determining the data type of the feature value corresponding to the identifier according to the sample information;

[0019] Sorting each of the identifiers in ascending order according to the data type.

[0020] In one embodiment, the step of sorting each of the identifiers in ascending order according to the data type includes:

[0021] When the data type is a continuous data type, determining the sending order of each of the identifiers;

[0022] Sorting each of the identifiers in ascending order according to the sending order.

[0023] In one embodiment, the step of sorting each of the identifiers in ascending order according to the data type includes:

[0024] When the data type is a discrete data type, determining the label information of the label value corresponding to each identifier;

[0025] Ascendingly sort each of the tag values according to the tag information to obtain the sequence number of each tag value, and ascendingly sort each of the identifiers according to the sequence numbers of each tag value.

[0026] In one embodiment, the step of determining the merging value of adjacent first bins according to each tag value corresponding to the first bin includes:

[0027] Determine the tag category to which the sample corresponding to each identifier in adjacent first bins belongs according to the tag value;

[0028] Determine the merging value of adjacent first bins according to the quantity of each tag category in adjacent first bins.

[0029] To achieve the above object, the present invention further provides a terminal, which includes:

[0030] An acquisition module, configured to acquire, by a first terminal, various sample information sent by a second terminal, where the sample information includes an identifier corresponding to a sample feature;

[0031] A sorting module, configured to sort each of the identifiers, and perform binning operations on the sorted identifiers to obtain a plurality of first bins, where the first terminal sorts each of the identifiers according to the data type associated with the identifier, and the sample information includes the data type corresponding to the feature value of the sample feature;

[0032] A determination module, configured to determine the tag value corresponding to each bin according to the identifier, and determine the merging value of adjacent first bins according to each tag value corresponding to the first bin;

[0033] A sending module, configured to, when each of the merging values does not meet the merging requirements, send each identifier corresponding to each first bin to the second terminal, so that the second terminal determines the feature value of each identifier belonging to the first bin as the same bin.

[0034] To achieve the above object, the present invention further provides a device, which includes a memory, a processor, and a binning program stored in the memory and executable on the processor, and when the binning program is executed by the processor, it implements the above-mentioned sample feature binning method based on federated learning.

[0035] To achieve the above object, the present invention further provides a medium, which stores a binning program, and when the binning program is executed by a processor, it implements the above-mentioned sample feature binning method based on federated learning.

[0036] To achieve the above object, the present invention also provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, it implements the above-mentioned sample feature binning method based on federated learning.

[0037] The present invention provides a sample feature binning method, a terminal, a device, a medium and a computer program product based on federated learning. The first terminal obtains the identifiers of the sample features sent by the second terminal, sorts each identifier, and performs binning operations on the sorted identifiers to obtain multiple bins. Then, based on the identifiers, the label values corresponding to each bin are determined to obtain the merging values of adjacent bins. When the merging requirements are not met for each merging value, each identifier corresponding to the first bin is sent to the second terminal, so that the second terminal determines the feature values corresponding to the identifiers belonging to one bin as the same bin, and further enables the second terminal to complete the binning of each sample feature. The first terminal of the present invention obtains the identifiers of the sample features from the second terminal, and then combines the label values of the sample features in the first terminal to determine the merging values of the bins after the binning operation of the identifiers, so as to merge the bins that can be merged based on the merging values to obtain the final bins, and then send the final bins to the second terminal, thereby enabling the second terminal to complete the binning of the sample features without sending the feature values, avoiding the true information of the sample features from being known by the other party, thus avoiding data leakage, and improving the security of the sample feature binning in the second terminal. At the same time, the first terminal sorts each identifier based on the data type of the feature values of the sample features, enabling the first terminal to flexibly implement the sorting of the identifiers based on the data type of the sample features, and the first terminal has a high degree of intelligence; further, the data type is determined and sent by the second terminal, enabling the second terminal to share the workload of the binning operation of the first terminal, and further enabling the first terminal to quickly implement the binning operation of the sample features while saving computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a schematic diagram of the hardware structure of the terminal / device for the hardware operating environment involved in the solution of the embodiment of the present invention;

[0039] Figure 2 It is a schematic flowchart of the first embodiment of the sample feature binning method based on federated learning of the present invention;

[0040] Figure 3 For Figure 2 It is a detailed flowchart of step S30 in

[0041] Figure 4 It is a schematic flowchart of the second embodiment of the sample feature binning method based on federated learning of the present invention;

[0042] Figure 5This is a flow chart of the third embodiment of the sample feature binning method based on federated learning of the present invention;

[0043] Figure 6 Schematic diagram of the functional modules of the terminal of the present invention.

[0044] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0045] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0046] Reference Figure 1 , Figure 1 This is a schematic diagram of the hardware structure of the hardware operating environment of a terminal or device involved in an embodiment of the present invention.

[0047] like Figure 1 As shown, the terminal / device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

[0048] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the terminal or device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0049] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a binning program.

[0050] exist Figure 1 In the terminal or device shown, the network interface 1004 is mainly used to connect to the backend server and communicate data with the backend server; the user interface 1003 is mainly used to connect to the client and communicate data with the client; and the processor 1001 can be used to call the binning program stored in the memory 1005 and perform the following operations:

[0051] The first terminal obtains each sample information sent by the second terminal, where the sample information includes an identifier corresponding to a sample feature;

[0052] Sort each of the identifiers, and perform a binning operation on the sorted identifiers to obtain a plurality of first bins. Among them, the first terminal sorts each of the identifiers according to the data type associated with the identifier, and the sample information includes the data type corresponding to the feature value of the sample feature;

[0053] Determine the label value corresponding to each bin according to the identifier, and determine the merging value of adjacent first bins according to the label values corresponding to the first bin;

[0054] When each of the merging values does not meet the merging requirement, send each identifier corresponding to the first bin to the second terminal, so that the second terminal determines the feature value of each identifier belonging to the first bin as the same bin.

[0055] In an embodiment, the processor 1001 may call the determination program stored in the memory 1005 and further perform the following operations:

[0056] When there is a target merging value that meets the merging requirement, merge the adjacent first bins corresponding to the target merging value to obtain a second bin;

[0057] Update each of the second bins and the unmerged first bins to each first bin, and return to execute the step of determining the merging value of adjacent first bins according to the label values corresponding to the first bin.

[0058] In an embodiment, the processor 1001 may call the determination program stored in the memory 1005 and further perform the following operations:

[0059] Determine the number of each updated first bin;

[0060] When the number is greater than the minimum number of bins, return to execute the step of determining the merging value of adjacent first bins according to the label values corresponding to the first bin;

[0061] When the number is less than or equal to the minimum number of bins, send each identifier corresponding to each updated first bin to the second terminal, so that the second terminal determines the feature value corresponding to each identifier belonging to the updated first bin as the same bin.

[0062] In an embodiment, the processor 1001 may call the determination program stored in the memory 1005 and further perform the following operations:

[0063] Determine the data type of the feature value corresponding to the identifier according to the sample information;

[0064] Arrange each of the identifiers in ascending order according to the data type.

[0065] In one embodiment, the processor 1001 may call the determination program stored in the memory 1005 and further perform the following operations:

[0066] When the data type is a continuous data type, determine the sending order of each of the identifiers;

[0067] Arrange each of the identifiers in ascending order according to the sending order.

[0068] In one embodiment, the processor 1001 may call the determination program stored in the memory 1005 and further perform the following operations:

[0069] When the data type is a discrete data type, determine the label information of the label value corresponding to each identifier;

[0070] Arrange each of the label values in ascending order according to the label information to obtain the sequence number of each label value, and arrange each of the identifiers in ascending order according to the sequence numbers of each of the label values.

[0071] In one embodiment, the processor 1001 may call the determination program stored in the memory 1005 and further perform the following operations:

[0072] Determine the label category to which the sample corresponding to each identifier in the adjacent first bin belongs according to the label value;

[0073] Determine the merging value of the adjacent first bin according to the quantity of each label category in the adjacent first bin.

[0074] Based on the above hardware structure of the terminal, various embodiments of the sample feature binning method based on federated learning according to the present invention are proposed.

[0075] The present invention provides a sample feature binning method based on federated learning for samples.

[0076] Refer to Figure 2 , Figure 2 which is the first embodiment of the sample feature binning method based on federated learning according to the present invention. The sample feature binning method based on federated learning includes:

[0077] Step S10, the first terminal obtains various sample information sent by the second terminal, where the sample information includes identifiers corresponding to sample features;

[0078] In this embodiment, multiple samples are stored in the first terminal, and multiple samples are also stored in the second terminal. There are overlapping samples between the first terminal and the second terminal. The first terminal and the second terminal send the feature vectors corresponding to their respective samples to the server. The server aligns the obtained samples based on the vertical federated learning scenario, that is, calculates the distances between the feature vectors, determines the feature vectors of the same sample for two feature vectors with a distance less than a preset threshold, and marks them. Then, the marked feature vectors are fed back to the first terminal and the second terminal, so that the first terminal and the second terminal determine the overlapping samples in the samples, and the first terminal and the second terminal set the same identifier for the overlapping samples.

[0079] Each sample in the second terminal with an identifier set has a corresponding eigenvalue for the sample feature, that is, each sample feature in the second terminal corresponds to an identifier and an eigenvalue. The second terminal sends the sample information of each sample feature to the first terminal, and the sample information includes the identifier of the sample feature.

[0080] Step S20: Sort each of the identifiers, and perform a binning operation on the sorted identifiers to obtain a plurality of first bins. Among them, the first terminal sorts each of the identifiers according to the data type associated with the identifier, and the sample information includes the data type corresponding to the eigenvalue of the sample feature.

[0081] The sample information further includes the data type of the eigenvalue of the sample feature. The data type includes a continuous data type and a discrete data type. For example, if the eigenvalue includes a value after the decimal point, the data type of the eigenvalue can be determined as the continuous data type; if the eigenvalue is an integer, the data type of the eigenvalue can be determined as the discrete data type.

[0082] After receiving each identifier, the first terminal sorts each identifier based on the data type. Different data types result in different sorting methods. For example, if the data type is continuous data, the second terminal can perform ascending sorting on the identifiers corresponding to each eigenvalue according to the eigenvalues of the sample features from small to large, so as to obtain the sequence numbers corresponding to each identifier. The second terminal packages the identifier corresponding to the eigenvalue, the sequence number of the identifier, and the data type into sample information. The first terminal parses each sample information to obtain the data type. If the data type is continuous data, it obtains the sequence number corresponding to the identifier, and then performs ascending sorting on each identifier according to the sequence number. If the data type is discrete data, the first terminal determines the value information corresponding to the identifier in the value information of the sample features stored in itself, and then performs ascending sorting on each identifier according to the size of the value information (the value information can be represented by numbers). In this way, the first terminal can flexibly sort each identifier, and the intelligence level of the first terminal is relatively high. In addition, the data type is determined by the second terminal instead of the first terminal, that is, the second terminal shares the workload of the first terminal for binning the sample features, so that the first terminal saves the computing resources required for the binning operation and shortens the duration of the binning operation, that is, the first terminal can quickly implement the binning operation on the sample features.

[0083] After the first terminal performs ascending sorting on each identifier, it then performs a binning operation on the sorted identifiers. The binning operation can be random binning, that is, randomly taking multiple adjacent identifiers as the identifiers within a bin, so as to obtain each successive first bin. The first terminal can also perform a binning operation on each identifier according to a specific binning method. For example, the first terminal uses the chi-square binning method to perform a binning operation on each identifier to obtain multiple successive first bins.

[0084] Step S30: Determine the label value corresponding to each bin according to the identifier, and determine the merge value of adjacent first bins according to the label values corresponding to the first bin.

[0085] The samples in the first terminal have corresponding identifiers and label values. The label values can characterize the sample attributes of the samples, and the sample attributes include negative samples and positive samples. For example, a sample with a label value of 0 is a negative sample, and a sample with a label value of 1 is a positive sample. The second terminal may not perform binning operations on the sample features of all overlapping samples. Therefore, after the first terminal receives each sample information, it obtains the identifiers of the sample features that the second terminal wants to bin, and then determines the label values corresponding to the received identifiers in the relationship table of identifiers and label values stored in the first terminal. Each first bin includes multiple identifiers. After determining the label values corresponding to the identifiers, the label values corresponding to each identifier in the bin can be determined, and then the merging value of adjacent first bins can be determined according to the label values corresponding to the first bin.

[0086] Specifically, the method for determining the merging value of adjacent first bins refers to Figure 3 , that is, step S30 includes:

[0087] Step S31, determining the label category to which the sample corresponding to each identifier in the adjacent first bin belongs according to the label value;

[0088] Step S32, determining the merging value of the adjacent first bin according to the quantity of each label category in the adjacent first bin.

[0089] The first terminal first determines the label category to which the sample corresponding to each identifier in the first bin belongs according to the label value. The label categories are positive samples and negative samples. The terminal determines the quantity of negative samples and positive samples in two adjacent first bins. The first terminal then determines the total quantity of identifiers in two adjacent first bins and the total quantity of identifiers sent by the second terminal, and then obtains the merging value of the adjacent first bin based on the above quantities. Specifically, the formula for the merging value is:

[0090]

[0091] Where A ij is the quantity of identifiers of the j-th category in the i-th interval, E ij is the expected frequency of A ij , N is the total quantity of identifiers sent by the second terminal, N i is the total quantity of identifiers in the i-th group (N i is the total quantity of identifiers in the adjacent first bin), C j is the proportion of the j-th category of samples in the whole, X 2 is the square of the merging value.

[0092] Step S40: When the respective merging values do not meet the merging requirements, send each identifier corresponding to each of the first bins to the second terminal, so that the second terminal determines the feature values of each identifier belonging to the first bin as the same bin.

[0093] The first terminal stores the merging requirements. The merging requirements are determined by the binning method of the binning operation. For example, if the binning method is chi-square binning, then the merging value being greater than the preset threshold is the merging requirement. The preset threshold can be any suitable value. For example, the preset threshold can be 4.6.

[0094] The first terminal sequentially determines whether the merging values corresponding to adjacent first bins meet the merging requirements. If all the merging values do not meet the merging requirements, the obtained respective first bins are the final bins.

[0095] The first terminal then sequentially sends the identifiers included in each first bin to the second terminal. The first terminal sets a binning identifier for each first bin and associates each identifier in the first bin with the binning identifier of the first bin. After receiving the identifier and the binning identifier, the second terminal determines the identifiers with the same binning identifier as the same bin, and the second terminal then determines the feature value corresponding to each identifier in the same bin, that is, determines the respective feature values of the same bin, thereby completing the binning operation of each sample feature.

[0096] In the technical solution provided in this embodiment, the first terminal obtains the identifiers of the sample features sent by the second terminal, sorts each identifier, performs binning operations on the sorted identifiers to obtain multiple bins, and then determines the label values corresponding to each bin based on the identifiers to determine the merging values of adjacent bins. When the merging requirements are not met for each merging value, the first terminal sends each identifier corresponding to the first bin to the second terminal, so that the second terminal determines the feature values corresponding to the identifiers belonging to one bin as the same bin, and further enables the second terminal to complete the binning of each sample feature. The first terminal of the present invention obtains the identifiers of the sample features from the second terminal, and then combines the label values of the sample features in the first terminal to determine the merging values of the bins after the binning operation of the identifiers, so as to merge the bins that can be merged based on the merging values to obtain the final bins, and then sends the final bins to the second terminal, thereby enabling the second terminal to complete the binning of the sample features without sending the feature values, avoiding the real information of the sample features from being known by the other party, thus avoiding data leakage and improving the security of the sample feature binning in the second terminal. At the same time, the first terminal sorts each identifier based on the data type of the feature value of the sample feature, enabling the first terminal to flexibly implement the sorting of the identifiers based on the data type of the sample feature, and the first terminal has a relatively high degree of intelligence; further, the data type is determined and sent by the second terminal, enabling the second terminal to share the workload of the binning operation of the first terminal, and further enabling the first terminal to quickly implement the binning operation of the sample features while saving computing resources.

[0097] Refer to Figure 4 , Figure 4 This is the second embodiment of the sample feature binning method based on federated learning of the present invention. Based on the first embodiment, after step S30, the following steps are further included:

[0098] Step S50, when there is a target merging value that meets the merging requirements, merge the adjacent first bins corresponding to the target merging value to obtain second bins;

[0099] Step S60, update each of the second bins and each of the first bins that have not been merged into each first bin, and return to execute the step of determining the merging values of adjacent first bins according to the label values corresponding to each first bin.

[0100] In this embodiment, when the first terminal determines that there is a target merging value that meets the merging requirements, the adjacent first bins corresponding to the target merging value are merged into a second bin. Merging means that the identifiers in two adjacent first bins are determined to belong to the same bin. After the first terminal merges all adjacent first bins that meet the merging requirements, each second bin is obtained, and the serial number of the second bin obtained after merging is integrated with the serial number of any one of the two first bins before merging. Therefore, the order of the unmerged first bins and each second bin will not change. The first terminal then updates the unmerged first bins and each second bin to first bins, and calculates the merging values of adjacent first bins again to determine whether adjacent bins can continue to be merged, that is, returns to execute the step of determining the merging value of adjacent first bins according to the label value corresponding to the first bin, that is, returns to execute step S30.

[0101] In the technical solution provided in this embodiment, after the first terminal determines the target merging value that meets the merging requirements, it merges the adjacent first bins corresponding to the target merging value, and then updates the merged second bins and the unmerged first bins to first bins to determine again whether adjacent bins can continue to be merged, so as to accurately bin each sample feature.

[0102] In one embodiment, when the first terminal performs bin merging, it will set a minimum number of bins, that is, the number of bins after the first terminal finally merges needs to be less than or equal to a certain value. In this regard, after the first terminal is updated to the first bin again, the first terminal determines the number of updated first bins. If the number is greater than the minimum number of bins, adjacent bins can continue to be merged, that is, return to execute the step of determining the merging value of adjacent first bins according to each label value corresponding to the first bin. When the number is less than or equal to the minimum number of bins, adjacent bins cannot be merged again, and the first terminal sends each identifier corresponding to each updated first bin to the second terminal, so that the second terminal completes the binning of the sample features.

[0103] Refer to Figure 5 , Figure 5 This is the third embodiment of the sample feature binning method based on federated learning of the present invention. Based on the first or second embodiment, the step S20 includes:

[0104] Step S21, determining the data type of the feature value corresponding to the identifier according to the sample information;

[0105] Step S22, sorting each identifier in ascending order according to the data type.

[0106] In this embodiment, the second terminal determines the data type of the feature values corresponding to each identifier. The data types include continuous data types and discrete data types. For example, if the feature value includes a numerical value after the decimal point, the data type of the feature value can be determined as a continuous data type; if the feature value is an integer, the data type of the feature value can be determined as a discrete data type.

[0107] The second terminal sends the data type and the identifier as sample information to the first terminal. The first terminal can then determine the data type of the feature value based on the sample information.

[0108] When the second terminal determines that the data type of each feature value is a continuous data type, it sorts the feature values in ascending order, and then sequentially sends the identifier and the data type corresponding to the feature value to the first terminal in ascending order of the serial number. The first terminal can then sort the identifiers in ascending order based on the sending order of each identifier, that is, the sending order of the identifiers is the sorting order of each identifier.

[0109] If the second terminal determines that the data type of each feature value is a discrete data type, it sends the data type and the identifier to the first terminal. The first terminal then needs to sort the identifiers in ascending order by itself. Specifically, each identifier received by the first terminal has a corresponding tag value in the first terminal, and the tag information is set corresponding to the tag value. The tag information can be information value or evidence weight. That is, the tag information has a numerical value. The first terminal sorts the tag values in ascending order according to the tag information to obtain a serial number, and then sorts the identifiers in ascending order according to the serial number of the tag value.

[0110] In the technical solution provided in this embodiment, the first terminal determines the data type of the feature value corresponding to the identifier according to the sample information, and accurately sorts each identifier in ascending order.

[0111] The present invention also provides a terminal.

[0112] Refer to Figure 6 , Figure 6 which is a schematic diagram of the functional modules of the terminal of the present invention.

[0113] As Figure 6 shown, the terminal includes:

[0114] An acquisition module 10, configured to enable the first terminal to acquire each sample information sent by the second terminal, where the sample information includes an identifier corresponding to a sample feature;

[0115] A sorting module 20, configured to sort each of the identifiers, and perform a binning operation on the sorted identifiers to obtain a plurality of first bins. Wherein, the first terminal sorts each of the identifiers according to the data type associated with the identifier, and the sample information includes the data type corresponding to the feature value of the sample feature;

[0116] A determining module 30, configured to determine a label value corresponding to each bin according to the identifier, and determine a merging value of adjacent first bins according to the label values corresponding to the first bin;

[0117] A sending module 40, configured to, when the merging values do not meet the merging requirements, send each identifier corresponding to the first bin to a second terminal, so that the second terminal determines the feature value of each identifier belonging to the first bin as the same bin.

[0118] In one embodiment, the terminal further includes:

[0119] A merging module, configured to, when there is a target merging value that meets the merging requirements, merge the adjacent first bins corresponding to the target merging value to obtain a second bin;

[0120] An updating module, configured to update each of the second bins and the first bins that have not been merged into each first bin, and return to execute the step of determining the merging value of adjacent first bins according to the label values corresponding to the first bin.

[0121] In one embodiment, the terminal further includes:

[0122] A determining module, configured to determine the number of each updated first bin;

[0123] An execution module, configured to, when the number is greater than the minimum number of bins, return to execute the step of determining the merging value of adjacent first bins according to the label values corresponding to the first bin;

[0124] A sending module, configured to, when the number is less than or equal to the minimum number of bins, send each identifier corresponding to each updated first bin to a second terminal, so that the second terminal determines the feature value corresponding to each identifier belonging to the updated first bin as the same bin.

[0125] In one embodiment, the terminal further includes:

[0126] A determining module, configured to determine the data type of the feature value corresponding to the identifier according to the sample information;

[0127] An arranging module, configured to arrange each of the identifiers in ascending order according to the data type.

[0128] In one embodiment, the terminal further includes:

[0129] A determination module, configured to determine the sending order of each of the identifiers when the data type is a continuous data type;

[0130] An arrangement module, configured to perform ascending order arrangement on each of the identifiers according to the sending order.

[0131] In one embodiment, the terminal further includes:

[0132] A determination module, configured to determine the label information of the label value corresponding to each identifier when the data type is a discrete data type;

[0133] An arrangement module, configured to perform ascending order arrangement on each of the label values according to the label information to obtain the sequence number of each label value, and perform ascending order sorting on each of the identifiers according to the sequence numbers of each of the label values.

[0134] In one embodiment, the terminal further includes:

[0135] A determination module, configured to determine the label category to which the sample corresponding to each identifier in the adjacent first bin belongs according to the label value;

[0136] A determination module, configured to determine the merging value of the adjacent first bin according to the quantity of each label category in the adjacent first bin.

[0137] Wherein, the function implementation of each module in the above terminal corresponds to each step in the embodiment of the above method for binning sample features based on federated learning, and its function and implementation process will not be elaborated here one by one.

[0138] The present invention also provides a medium, on which a binning program is stored, and when the binning program is executed by a processor, the steps of the method for binning sample features based on federated learning as described in any one of the above embodiments are implemented.

[0139] The specific embodiment of the medium of the present invention is basically the same as each embodiment of the above method for binning sample features based on federated learning, and will not be elaborated here.

[0140] The present invention also provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, the method for binning sample features based on federated learning as described in the above embodiment is implemented.

[0141] The specific embodiment of the computer program product of the present invention is basically the same as each embodiment of the above method for binning sample features based on federated learning, and will not be elaborated here.

[0142] It should be noted that in this text, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or system comprising a series of elements not only includes those elements but also includes other elements not explicitly listed, or elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "comprising one..." does not exclude the presence of additional identical elements in the process, method, article or system comprising such element.

[0143] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.

[0144] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present invention.

[0145] The above are only the preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or equivalent process transformation made by using the description of the present invention and the drawings, or directly or indirectly applied in other related technical fields, are equally included in the patent protection scope of the present invention.

Claims

1. A method for binning sample features based on federated learning, characterized in that, The sample feature binning method based on federated learning includes: The first terminal obtains the sample information sent by the second terminal. Among them, the sample information includes the identifier corresponding to the sample feature. The second terminal obtains the feature value and identifier corresponding to the sample feature, determines the data type corresponding to the feature value, and packages the identifier corresponding to the feature value, the serial number of the identifier, and the data type as sample information and sends it to the first terminal. The data type includes continuous data type and discrete data type; Sort each of the identifiers, and perform binning operations on the sorted identifiers to obtain a plurality of first bins. Among them, the first terminal sorts each of the identifiers according to the data type associated with the identifier, and the sample information includes the data type corresponding to the feature value of the sample feature; Determine the label value corresponding to each bin according to the identifier, and determine the merge value of adjacent first bins according to the label values corresponding to the first bin; When each of the merge values does not meet the merge requirement, send each identifier corresponding to the first bin to the second terminal, so that the second terminal determines the feature values of each identifier belonging to the first bin as the same bin.

2. The sample feature binning method based on federated learning according to claim 1, wherein After the step of determining the merge value of adjacent first bins according to the label values corresponding to the first bin, it further includes: When there is a target merge value that meets the merge requirement, merge the adjacent first bins corresponding to the target merge value to obtain a second bin; Update each of the second bins and the unmerged first bins into each first bin, and return to execute the step of determining the merge value of adjacent first bins according to the label values corresponding to the first bin.

3. The sample feature binning method based on federated learning according to claim 2, wherein, After the step of updating each of the second bins and the unmerged first bins into each first bin, it further includes: Determine the number of each updated first bin; When the number is greater than the minimum number of bins, return to execute the step of determining the merge value of adjacent first bins according to the label values corresponding to the first bin; When the number is less than or equal to the minimum number of bins, send each identifier corresponding to each updated first bin to the second terminal, so that the second terminal determines the feature values corresponding to each identifier belonging to the updated first bin as the same bin.

4. The sample feature binning method based on federated learning according to claim 1, wherein The step of sorting each of the identifiers includes: Determine the data type of the feature value corresponding to the identifier according to the sample information; Sort each of the identifiers in ascending order according to the data type.

5. The sample feature binning method based on federated learning according to claim 4, wherein The step of sorting each of the identifiers in ascending order according to the data type includes: When the data type is a continuous data type, determine the sending order of each of the identifiers; Arrange each of the identifiers in ascending order according to the sending order.

6. The method for binning sample features based on federated learning according to claim 4, wherein, The step of sorting each of the identifiers in ascending order according to the data type includes: When the data type is a discrete data type, determine the label information of the label value corresponding to each identifier; Ascendingly sort each of the tag values according to the tag information to obtain the sequence number of each tag value, and ascendingly sort each of the identifiers according to the sequence numbers of each of the tag values.

7. The method for binning sample features based on federated learning according to any one of claims 1-6, wherein The step of determining the combined value of adjacent first bins according to each tag value corresponding to the first bin includes: Determine the tag category to which the sample corresponding to each identifier in the adjacent first bin belongs according to the tag value; Determine the combined value of adjacent first bins according to the quantity of each tag category in the adjacent first bin.

8. A terminal, characterized in that, The terminal includes: An acquisition module, configured to acquire, by a first terminal, various sample information sent by a second terminal, where the sample information includes an identifier corresponding to a sample feature, and where the second terminal is configured to acquire a feature value and an identifier corresponding to a sample feature, determine a data type corresponding to the feature value, and package the identifier corresponding to the feature value, the sequence number of the identifier, and the data type into sample information and send the sample information to the first terminal, and the data type includes a continuous data type and a discrete data type; A sorting module, configured to sort each of the identifiers, and perform a binning operation on the sorted identifiers to obtain a plurality of first bins, where the first terminal sorts each of the identifiers according to the data type associated with the identifier, and the sample information includes the data type corresponding to the feature value of the sample feature; A determination module, configured to determine a tag value corresponding to each bin according to the identifier, and determine the combined value of adjacent first bins according to each tag value corresponding to the first bin; A sending module, configured to, when each of the combined values does not meet the combination requirement, send each identifier corresponding to each first bin to the second terminal, so that the second terminal determines the feature values of each identifier belonging to the first bin as the same bin.

9. A device, characterized in that, The device includes a memory, a processor, and a binning program stored in the memory and executable on the processor. When the binning program is executed by the processor, it implements the method for binning sample features based on federated learning according to any one of claims 1-7.

10. A medium, characterized in that, The medium stores a binning program, and when the binning program is executed by a processor, it implements the method for binning sample features based on federated learning according to any one of claims 1-7.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for binning sample features based on federated learning according to any one of claims 1-7.

Citation Information

Patent Citations

  • Sample sampling method and device based on federated learning and readable storage medium

    CN111340614A

  • Multi-party joint modeling method and device based on federated learning and medium

    CN111368901A